-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Share package.json scripts across packages #239
Conversation
… wasm from bb and circuits.js
|
The script then would be able to copy scripts from a json to a set of packages given at command line. I guess it'd be nice if we had real inheritance, but this feels like a little too scrappy |
What I'm worried about that solution is that it's easy for packages to get out of sync, for a dev to foget to include a set of packages, etc. After all, the issue with the missing prepare step was only uncovered by pushing the same config all over the place. I agree that this feels scrappy, but manipulating the file directly is the only option given the lack of extensibility at the package.json level. Maybe adding a mechanism for individual packages to override a specific script would help? Or would it add to the scrappiness? |
I'm having trouble thinking of a better solution besides having some 'yarn common build' instead of yarn build, and routing everything through a common command. OK with this though for lack of a much better idea |
* fix bug in native kernel - contract logic was being skipped * zero-initialize all abi and kernel structs. helper function to zero-init arrays of frs * better struct initialization in app circuits files * dont need to do as much in base utils since structs are sanely zero-initialized * use fill to initialize array of fields to zero * fix native private kernel, refactor private kernel tests, add real logic in test setup for computing function/contract tree roots/siblings * new hash functions
* fix bug in native kernel - contract logic was being skipped * zero-initialize all abi and kernel structs. helper function to zero-init arrays of frs * better struct initialization in app circuits files * dont need to do as much in base utils since structs are sanely zero-initialized * use fill to initialize array of fields to zero * fix native private kernel, refactor private kernel tests, add real logic in test setup for computing function/contract tree roots/siblings * new hash functions
* fix bug in native kernel - contract logic was being skipped * zero-initialize all abi and kernel structs. helper function to zero-init arrays of frs * better struct initialization in app circuits files * dont need to do as much in base utils since structs are sanely zero-initialized * use fill to initialize array of fields to zero * fix native private kernel, refactor private kernel tests, add real logic in test setup for computing function/contract tree roots/siblings * new hash functions
Sets up a shared
package.scripts.json
at the project root, which gets injected into each individual package.json that extends from it (via aninherits
directive) wheneveryarn prepare
is run. Ended up using a custom script over https://github.com/microsoft/package-inherit since it didn't work with our workspace setup, seems unmaintained, and it was easier to write manually.Something funny that happened after setting this up: forcing all packages to have the same set of scripts revealed that circuits and bb.js didn't have a prepare step, so their entry in the build_manifest wasn't getting updated. However, their entries depend on non-packages (ie wasm build), which cannot be expressed from the package json. So I added a near-empty
yarn-project-base/package.json
, which does depend on the wasm build in the build manifest, and added devDeps to it from circuits and bb js. This ensures we have a transitive dependency to wasm builds from those packages.Fixes #202