Skip to content

refactor: use guard getters#8339

Merged
mergify[bot] merged 2 commits into
masterfrom
markm-use-guard-getters
Sep 16, 2023
Merged

refactor: use guard getters#8339
mergify[bot] merged 2 commits into
masterfrom
markm-use-guard-getters

Conversation

@erights

@erights erights commented Sep 16, 2023

Copy link
Copy Markdown
Member

To pave the way for endojs/endo#1712 , switch from directly accessing the fields of guards to using the guard type's validating payload getter, and then accessing the fields of the payload.

See also endojs/endo#1771, which would enable us to remove the two @ts-expect-errors that we had to add.

@erights

erights commented Sep 16, 2023

Copy link
Copy Markdown
Member Author

See #8340

@erights
erights force-pushed the markm-use-guard-getters branch from ec34450 to 111c33a Compare September 16, 2023 09:19
M.remotable('instanceAdmin'),
).returns(M.promise()),
deleteInstanceAdmin: M.call(InstanceAdminI).returns(),
deleteInstanceAdmin: M.call(InstanceAdminShape).returns(),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This bug was only caught by seeing #8340 fail , because it uses the stricter endojs/endo#1712

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

See #8341

@michaelfig michaelfig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! I'd love to see this land in the SDK.

Comment thread packages/internal/src/callback.js Outdated
@erights erights added automerge:rebase Automatically rebase updates, then merge and removed automerge:rebase Automatically rebase updates, then merge labels Sep 16, 2023
@erights erights added the automerge:rebase Automatically rebase updates, then merge label Sep 16, 2023
@mergify
mergify Bot merged commit b5a2ed1 into master Sep 16, 2023
@mergify
mergify Bot deleted the markm-use-guard-getters branch September 16, 2023 20:09
Comment thread packages/internal/src/callback.js
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.

2 participants