-
Notifications
You must be signed in to change notification settings - Fork 71
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
Need to thread configuration data through to lockdown #578
Comments
I'm manually editing @erights writes:
|
@erights inquired on keybase how one might do this without resorting to environment variables. My take is that the primary use case for needing this is tests, which may be a special case but it's a very important, very common case whose actual needs are simple. Tests know that they're tests and that (1) things go wrong in tests so we should be prepared to be maximally helpful when that happens, and (2) tests aren't usually a place where we care much about security rigor (except, of course, for tests that are testing the security rigor itself, but that's mostly not what we're dealing with here). In tests, for a control affordance I would kind of like to just replace Alternatively, replace Since there's already standard boilerplate at the top of each test file, it's not a particular burden to have to modify that boilerplate into something else, as long as there's a convenient something else available to modify it to. |
The other day we were chatting bout this as an enhancement to #2571 : import test from '@agoric/swingset-vat/tools/prepare-test-env'; for reference... https://github.com/Agoric/agoric-sdk/blob/master/packages/SwingSet/test/test-comms.js https://github.com/Agoric/agoric-sdk/blob/master/packages/SwingSet/tools/prepare-test-env.js |
ill just add that you can use esm query params to import a parameterized package and im sure its a marvelous foot gun that doesnt actually solve this problem |
esm query params... pointer to details? A quick search didn't find much. I don't think it helps in our use case (changing parameters without changing references to the package / module) but it seems interesting for cases when the reference can change. |
@dckc |
ah. so just inspection of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta |
See #488 for one of the uses that would benefit.
The text was updated successfully, but these errors were encountered: