-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: contract bundles have duplicate dependencies #34
Conversation
- use 'resolutions' to ensure only one version of each package is installed - remove babel resolutions (fe only) from contract package.json - confirmed changes via 'find ./node_modules -type d -name 'endo''
- currently, the contract is built in the docker container. this change allows the consumer to build the contract outside the docker container, or in ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest documenting that the resolutions are a work-around.
@@ -18,5 +18,7 @@ jobs: | |||
run: yarn | |||
- name: yarn lint | |||
run: yarn lint | |||
- name: yarn build | |||
run: yarn build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should test that the bundle, when compressed, is <1MB.
Want to do it in this PR or leave it for later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our heads are in the same place!
I think a separate PR is best. I also wonder if agoric run
/ writeCoreProposal
should be responsible for enforcing this (or, at least warning)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New issue here: #36. Can move it to agoric-sdk
if you agree this should be a responsibility of agoric run
@@ -11,7 +11,7 @@ | |||
"docker:make": "docker compose exec agd make -C /workspace/contract", | |||
"make:help": "make list", | |||
"start": "yarn docker:make clean start-contract print-key", | |||
"build": "exit 0", | |||
"build": "agoric run scripts/build-game1-start.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little nervous about permissions conflicting with doing this build in docker, but I guess it's OK for now.
@@ -1381,31 +1338,6 @@ | |||
"@endo/zip" "^0.2.31" | |||
ses "^0.18.4" | |||
|
|||
"@endo/compartment-mapper@^0.8.4", "@endo/compartment-mapper@^0.8.5": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
many fewer dependencies
Co-authored-by: Dan Connolly <connolly@agoric.com>
yarn build
to ciI also tested with the changes in #28:
And am observing smaller bundles: