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

test: snapshot of runtime exports #10202

Merged
merged 2 commits into from
Oct 3, 2024
Merged

test: snapshot of runtime exports #10202

merged 2 commits into from
Oct 3, 2024

Conversation

turadg
Copy link
Member

@turadg turadg commented Oct 2, 2024

closes: #10086

Description

#10086 has been fixed by other PRs but still needed a regression test showing that runtime importing from @agoric/orchestration does not fail.

This goes a step further and snapshots the list of exports, so that any changes are seen in code review.

It also does it for a number of other active packages that tend to be imported outside the repo.

Security Considerations

none

Scaling Considerations

none

Documentation Considerations

none

Testing Considerations

It's a fast test. I also considered making a test in boot that iterated over the whole workspace, but I thought this would be an easier workflow and allow for more local tailoring.

Upgrade Considerations

none

@turadg turadg requested review from mhofman and 0xpatrickdev October 2, 2024 23:05
@turadg turadg requested a review from a team as a code owner October 2, 2024 23:05
Copy link

cloudflare-workers-and-pages bot commented Oct 2, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 636b357
Status: ✅  Deploy successful!
Preview URL: https://8adbdfe0.agoric-sdk.pages.dev
Branch Preview URL: https://10086-regression.agoric-sdk.pages.dev

View logs

@turadg turadg added the automerge:rebase Automatically rebase updates, then merge label Oct 2, 2024
Copy link
Member

@mhofman mhofman left a comment

Choose a reason for hiding this comment

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

Oh this is neat!

One small observation: this doesn't allow us to detect default exports, but I believe none of our packages would ever do that. Dynamic import would allow us to detect this (while also enabling us to handle more explicitly import issues), but it would open us to thenable module risks, so I'm split.

I wish we could do the same for type exports. Maybe with the help of something like https://gist.github.com/Glavin001/6281f12ee97f40fb8fbde5a319457119 ?

@turadg turadg force-pushed the 10086-regression branch 2 times, most recently from a65f0cb to 95e0b4a Compare October 3, 2024 13:47
@turadg turadg mentioned this pull request Oct 3, 2024
ava-xs lacks t.snapshot
@mergify mergify bot merged commit 5b3e4d0 into master Oct 3, 2024
80 checks passed
@mergify mergify bot deleted the 10086-regression branch October 3, 2024 14:39
mergify bot added a commit that referenced this pull request Oct 4, 2024
incidental

## Description
While working on #10202 I got a CI error that "no function" for the Zoe tests. It turned out to be that ava-xs doesn't support `t.snapshot`. So I added it to the voluminous "exclude" value and pushed again. Later I see CI [fails again](https://github.com/Agoric/agoric-sdk/actions/runs/11162498228/job/31027478876?pr=10202) because ava-xs is confused by the `snapshots` directory.

The `test:xs-unit` job is not carrying its weight. I can't recall it ever detecting an error that wasn't detected in Node. Maybe a while ago it did and it was an important line of defense. In the past year we've developed much more integration testing and I'm confident these tests are redundant. 

It generally doesn't hurt to test more, but ava-xs is so different from XS that the cost of reconciliation is too great.

### Security Considerations
none
### Scaling Considerations
none

### Documentation Considerations
none

### Testing Considerations
see above

### Upgrade Considerations
none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

import @agoric/orchestration fails to find types.js
2 participants