-
Notifications
You must be signed in to change notification settings - Fork 249
refactor: stop using deprecated "sloppy" interface option #11931
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
base: master
Are you sure you want to change the base?
Conversation
Deploying agoric-sdk with
|
Latest commit: |
0ca5765
|
Status: | ✅ Deploy successful! |
Preview URL: | https://6fa28407.agoric-sdk.pages.dev |
Branch Preview URL: | https://markm-stop-using-sloppy-opti.agoric-sdk.pages.dev |
}; | ||
|
||
const ZCFSeatI = M.interface('ZCFSeat', {}, { sloppy: true }); | ||
const ZCFSeatI = M.interface('ZCFSeat', {}, { defaultGuards: 'passable' }); |
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 strikes me as a particular dangerous place to omit explicit method guards. Am I missing 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 question is not relevant to this PR though. Just asking.
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.
Pull Request Overview
This PR refactors the codebase to replace the deprecated "sloppy" interface option with the newer "defaultGuards: 'passable'" option in Marshal interface definitions.
- Updates interface definitions from
{ sloppy: true }
to{ defaultGuards: 'passable' }
- Updates associated comments to reflect the new interface option terminology
- Maintains the same functional behavior while using the current API
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/zoe/src/contractFacet/zcfSeat.js | Updates ZCFSeat interface to use defaultGuards instead of sloppy |
packages/internal/src/typeGuards.js | Updates UnguardedHelperI interface and comment |
packages/inter-protocol/src/vaultFactory/vaultManager.js | Updates helper interface definition and comment |
packages/inter-protocol/src/price/fluxAggregatorKit.js | Updates creator interface to use defaultGuards with multi-line formatting |
Refs: #1831, Agoric/agoric-sdk#11931 ## Description We wish to visibly deprecate the `sloppy` option of `@endo/patterns` interface guards. To avoid an explosion of `@typedef` blocks, we migrate the `@endo/patterns` types to TypeScript and then add the minimally required `@deprecated` tags. ### Security Considerations N/A ### Scaling Considerations N/A ### Documentation Considerations N/A ### Testing Considerations This modifies the implementation of the `@endo/patterns` types, but should not modify them. Since the number of lines changed is larged, we should attempt to convince ourselves that the types are in fact the same. ### Compatibility Considerations N/A ### Upgrade Considerations Deprecates but does not remove the `sloppy` option. `NEWS.md` is updated.
closes: #XXXX
refs: #XXXX
Description
Security Considerations
Scaling Considerations
Documentation Considerations
Testing Considerations
Upgrade Considerations