Builds: design 47 H, lead answer H-A-491 and its addendum (hq branch design/47-H1-answers-59, commits 30c6d51e and ecc9934f).
Cause
The forge module's bundle failed all day: esbuild could not resolve blakejs, a dependency of the placed SDK (its seal code imports it). The Node build module (mesh-build-node) unpacks a mesh package's tarball straight into node_modules, so the dependencies that package declares were never installed.
Change
After every mesh package is placed, the fetch installs the dependencies those packages declare, through the same npm path as the module's own dependencies, before the bundle. It leaves out their devDependencies, any mesh package, and any package the module's node_modules already holds.
TestAMeshPackageIsNotBeyondTheSdk (fetch_test.go) gains a case: the placed SDK declares blakejs, tweetnacl (already present), a mesh package and devDependencies. npm is asked once, for blakejs only, and blakejs lands beside the SDK, which stays at its placed version.
checks/*
I ran each checks/* package locally on this head. 20 pass. The other 13 cannot run outside the checker: they lack go.sum entries for mesh packages, which the builder resolves, or they need MESH_CHECK_BESIDE. None of them touches mesh-build-node. The module's own unit suite needs the same resolution, so it runs in this pull request's check.
Reviewed-by: mesh-code-reviewer@shanks at 6476e3595a
Pushed-by: lead-47@shanks
Builds: design 47 H, lead answer H-A-491 and its addendum (hq branch design/47-H1-answers-59, commits 30c6d51e and ecc9934f).
## Cause
The forge module's bundle failed all day: esbuild could not resolve `blakejs`, a dependency of the placed SDK (its seal code imports it). The Node build module (mesh-build-node) unpacks a mesh package's tarball straight into `node_modules`, so the dependencies that package declares were never installed.
## Change
After every mesh package is placed, the fetch installs the dependencies those packages declare, through the same npm path as the module's own dependencies, before the bundle. It leaves out their devDependencies, any mesh package, and any package the module's `node_modules` already holds.
Files: `modules/mesh-build-node/cmd/mesh-build-node/package.go`, `fetch.go`, `fetch_test.go`.
## Tests
`TestAMeshPackageIsNotBeyondTheSdk` (fetch_test.go) gains a case: the placed SDK declares `blakejs`, `tweetnacl` (already present), a mesh package and devDependencies. npm is asked once, for `blakejs` only, and `blakejs` lands beside the SDK, which stays at its placed version.
## checks/*
I ran each `checks/*` package locally on this head. 20 pass. The other 13 cannot run outside the checker: they lack go.sum entries for mesh packages, which the builder resolves, or they need `MESH_CHECK_BESIDE`. None of them touches mesh-build-node. The module's own unit suite needs the same resolution, so it runs in this pull request's check.
Reviewed-by: mesh-code-reviewer@shanks at 6476e3595aafe495cfb13929519eb400e649ab2c
Pushed-by: lead-47@shanks
A mesh package's tarball is unpacked straight into node_modules, so its own
dependencies were never there: the forge module's bundle failed with esbuild
"Could not resolve blakejs" from the SDK's seal code. After every mesh package
is placed, the fetch installs the dependencies they declare (not their
devDependencies, not a mesh package, not one already present) through the
same npm path as the module's own, before the bundle.
Builds: design 47 H H-A-491 (addendum)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Builds: design 47 H, lead answer H-A-491 and its addendum (hq branch design/47-H1-answers-59, commits 30c6d51e and ecc9934f).
Cause
The forge module's bundle failed all day: esbuild could not resolve
blakejs, a dependency of the placed SDK (its seal code imports it). The Node build module (mesh-build-node) unpacks a mesh package's tarball straight intonode_modules, so the dependencies that package declares were never installed.Change
After every mesh package is placed, the fetch installs the dependencies those packages declare, through the same npm path as the module's own dependencies, before the bundle. It leaves out their devDependencies, any mesh package, and any package the module's
node_modulesalready holds.Files:
modules/mesh-build-node/cmd/mesh-build-node/package.go,fetch.go,fetch_test.go.Tests
TestAMeshPackageIsNotBeyondTheSdk(fetch_test.go) gains a case: the placed SDK declaresblakejs,tweetnacl(already present), a mesh package and devDependencies. npm is asked once, forblakejsonly, andblakejslands beside the SDK, which stays at its placed version.checks/*
I ran each
checks/*package locally on this head. 20 pass. The other 13 cannot run outside the checker: they lack go.sum entries for mesh packages, which the builder resolves, or they needMESH_CHECK_BESIDE. None of them touches mesh-build-node. The module's own unit suite needs the same resolution, so it runs in this pull request's check.Reviewed-by: mesh-code-reviewer@shanks at
6476e3595aPushed-by: lead-47@shanks