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

Ava configuration should init endo as necessary #843

Open
gibson042 opened this issue Aug 17, 2023 · 2 comments · May be fixed by #965
Open

Ava configuration should init endo as necessary #843

gibson042 opened this issue Aug 17, 2023 · 2 comments · May be fixed by #965
Assignees
Labels
Snippets Has to do with including code snippets technical-debt test

Comments

@gibson042
Copy link
Member

gibson042 commented Aug 17, 2023

(originally posted by @gibson042 in Agoric/agoric-sdk#8205 (review))

test-….js files in snippets/ expect an import of @agoric/zoe/tools/prepare-test-env.js (via prepare-test-env-ava.js) to initialize a Hardened JS environment (and possibly a vat-like one) via @agoric/zoe/tools/prepare-test-env.js importing @agoric/swingset-liveslots/tools/prepare-test-env.js, which imports @agoric/internal/src/install-ses-debug.js, which imports @endo/init/debug.js.

That's a brittle chain, and was temporarily broken during iteration on Agoric/agoric-sdk#8205 . Instead, this repository should adopt the pattern of that PR and init the expected environment in ava configuration.

@aj-agoric aj-agoric added the bug label Sep 13, 2023
@dckc dckc added Snippets Has to do with including code snippets devex test technical-debt and removed bug devex labels Dec 22, 2023
@aj-agoric
Copy link
Contributor

suggested @kbennett2000 work with @kriskowal or @gibson042 here

@dckc
Copy link
Member

dckc commented Mar 25, 2024

Prompted by endojs/endo#2109 , I asked around about this issue.

@erights says:

... in order to get informative stack traces, ... we need to purge almost all occurrences of

import test from 'ava';

from our code and our documentation. The combination

import '@endo/init';
import test from 'ava';

needs to be replaced with

import test from '@endo/ses-ava/prepare-endo.js';

in almost all cases. I’ll be curious to find out what the exceptions are, but they should be rare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Snippets Has to do with including code snippets technical-debt test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants