-
Notifications
You must be signed in to change notification settings - Fork 207
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
Use prepare-test-env and ses-ava in SwingSet where possible #2709
Conversation
63979e6
to
8306b3c
Compare
d5b8982
to
20b04a4
Compare
@michaelfig for some reason, it fails in pegasus. It seems related to tape or tap ! |
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 think that one duplicate import is the only thing that really needs to change.
The inconsistency of the lint override for import ordering bugs me, it makes me think I don't understand what prettier
wants to do. I'd be happiest if none of the files had an override. I'd be second happiest if all of the files had an override. If the override is really only necessary in some and not others, I'll be unhappy until I understand what makes a difference.. is it the spelling of the second import and whether it would sort before/after ../../tools/something
?
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.
This looks pretty good. And many thanks for shouldering the tedium!
Have you looked into what would be involved in making this work with test-message-patterns.js
? That's the biggest gap for me so far, if only because that test is currently the primary exercise point for what I've been in the middle of working on (and likely will continue to be for a while yet).
(I should add that if it's just a matter of wrapping a few more Ava API entry points in ses-ava, I'm willing to take that on, assuming it's not too deeply weird.) |
8306b3c
to
b83d7fa
Compare
61c3bdf
to
38133a1
Compare
@warner Done. PTAL @michaelfig please look at the Pegasus error and advise. Thanks. |
Pegasus doesn't use AVA. This failure was caused by a combination of well-intentioned changes: @katelynsills changed Pegasus tests to use This is either a regression we should deal with some other way, or you can say it's acceptable to force users of In my mind, this might be a misstep, and |
Easiest way to solve this is to create a |
As long as the mechanism is there to fix the Pegasus situation, go ahead and ignore the error and merge. I can apply the fix soon. |
3b5baba
to
d284664
Compare
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.
That makes me happy!
Are there reasons there are some test files that still have:
import 'prepare-test-env-ava';
import test from 'ava';
? If you're trying not to change semantics, that's a good enough reason.
Likewise! This separation you suggested is definitely nice.
Yup, that's why. In this PR trying to set the stage for that change, but wanted to do that change in a succeeding PR. Coming soon! |
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.
Looks good. In the long run I'm slightly nervous about encouraging the deep import (with tools/
in the name), which might impose some constraints on how we organize swingset's internals. OTOH I think there's a mechanism in package.json
to make arbitrary mappings from the name in the import
to the location of the file within the package directory, so if we want to rearrange files, we could use that mechanism to keep the external name stable. The pattern we're thus establishing is that @agoric/swingset-vat/X
is the actual vat/controller/VM facility, and @agoric/swingset-vat/tools/Y
is where you get tools to run tests that exercise code which wants to run in a swingset vat environment. Which seems fine to me.
341cc51
to
91a09db
Compare
This sound good. But this PR made no progress towards that. |
Enhance prepare-test-env beyond #2703 to also bundle in ses-ava.
Use it in SwingSet tests where possible. This does not include the metering tests.
Progress on #2662 but does not yet close it.