Skip to content
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

feat(SwingSet): loadSwingsetConfigFile detects missing files #7076

Closed
wants to merge 1 commit into from

Conversation

dckc
Copy link
Member

@dckc dckc commented Feb 25, 2023

refs: #7049, #6687
part of #7049

Description

rather than running for 20 seconds and failing with the mysterious:

SwingSet: xsnap: v1: Error#1: Archive failed sanity check: should contain at least a compartment map file and one module file in <unknown>

fail early with:

Error#1: spec for @agoric/vats/src/core/boot.js does not exist: /.../agoric-sdk/packages/solo/@agoric/vats/src/core/boot.js

Security Considerations

In its current state, this digs the ambient authority hole (#2160) a little deeper. Depending on feedback about whether this is wanted, I could clean that up.

Testing Considerations

makes testing bootstrap quite a bit faster

rather than the mysterious:

SwingSet: xsnap: v1: Error#1: Archive failed sanity check: should
contain at least a compartment map file and one module file in
<unknown>

fail early with:

Error#1: spec for @agoric/vats/src/core/boot.js does not exist:
/.../agoric-sdk/packages/solo/@agoric/vats/src/core/boot.js
@dckc dckc requested review from turadg and warner February 25, 2023 00:24
Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as an improvement. If you wanted to go farther you could factor the config file load and normalization out of initializeSwingset.js.

Copy link
Member

@warner warner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a great fix to me.

Also note endojs/endo#1206 which is about Endo (bundleSource) noticing this properly too. No reason to not do a pre-check, of course.

@turadg
Copy link
Member

turadg commented Mar 2, 2023

the commit here landed in master 64a3baa

leaving this PR open in case there are more diagnostics coming

@dckc
Copy link
Member Author

dckc commented Mar 3, 2023

perhaps I'll re-open another time...

@dckc dckc closed this Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants