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: support for watchedPromises in fakeVirtualSupport #8618

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

Chris-Hibbert
Copy link
Contributor

refs: #8488

Description

Make it possible for convertValToSlot() to handle vals that are promises. This is needed for WatchedPromises, as used in #8488. The issue has also arisen in 8563, in connection with whenables.

Security Considerations

N/A

Scaling Considerations

N/A

Documentation Considerations

N/A

Testing Considerations

fixed one existing test. If it should have a test specifically related to watchedPromises, please help me construct one.

Upgrade Considerations

smartWallet upgrade (#8488) depends on watched Promises. Tests don't pass without a fix to fakeVirtual.

@Chris-Hibbert Chris-Hibbert added the cosmic-swingset package: cosmic-swingset label Dec 5, 2023
@Chris-Hibbert Chris-Hibbert self-assigned this Dec 5, 2023
@Chris-Hibbert Chris-Hibbert requested a review from FUDCo December 6, 2023 00:08
Copy link
Contributor

@FUDCo FUDCo left a comment

Choose a reason for hiding this comment

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

LGTM modulo my comment.

@@ -348,6 +356,7 @@ export function makeFakeVirtualStuff(options = {}) {
vom.initializeKindHandleKind();
const cm = makeFakeCollectionManager(vrm, fakeStuff, actualOptions);
const wpm = makeFakeWatchedPromiseManager(vrm, vom, cm, fakeStuff);
wpm.preparePromiseWatcherTables();
Copy link
Contributor

Choose a reason for hiding this comment

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

I remain suspicious that this call should not be here. However, it is normally done from startVat, which I suppose is always going to be absent from tests using the fake virtual stuff, so providing the call here is certainly a convenience. Just beware that this might come back later to bite us.

@Chris-Hibbert Chris-Hibbert added the automerge:rebase Automatically rebase updates, then merge label Dec 6, 2023
@Chris-Hibbert Chris-Hibbert force-pushed the 8455-fakeVirtual-watchedPromises branch from 588d6a1 to 8129d45 Compare December 6, 2023 01:24
@mergify mergify bot merged commit 241c60a into master Dec 6, 2023
67 checks passed
@mergify mergify bot deleted the 8455-fakeVirtual-watchedPromises branch December 6, 2023 01:55
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 cosmic-swingset package: cosmic-swingset
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants