-
Notifications
You must be signed in to change notification settings - Fork 242
feat(zoe): zoe part of minimal want patterns using M.containerHas(el,n)
#10952
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
Draft
erights
wants to merge
1
commit into
markm-want-patterns-only-ertp
Choose a base branch
from
markm-min-want-patterns-3
base: markm-want-patterns-only-ertp
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffd5cdd
to
b2b30dc
Compare
a2c8801
to
b8ebc19
Compare
2 tasks
c1fbfcf
to
3698a77
Compare
a04ee47
to
20b287d
Compare
erights
added a commit
to endojs/endo
that referenced
this pull request
Mar 19, 2025
Closes: #XXXX Refs: #2002 #2008 #2113 #1739 Agoric/agoric-sdk#10952 ## Description This PR adds a new `M.containerHas(elementPatt, positiveBigint)` matcher, and exported `containerHasSplit` function. This is motivated to support Agoric/agoric-sdk#10952 , which introduces a minimal form of want pattern in terms of `M.containerHas`. - [x] Actually merging this must happen only after we've decided either to move forward with #2008 or to give up on it. Once a decision is made, and even before it is acted on, then this PR can move forward. (Any decision to move forward or not with #2008 should also consider changing the default of the feature flag introduced by #2002 .) ### Security Considerations none ### Scaling Considerations Might help due to early termination of the split operations, which Agoric/agoric-sdk#10952 uses for `AmountMath.isGTE`. ### Documentation Considerations Already doc-documents `M.containerHas` in the types.js file for `M`. That's probably good enough for this PR. The interesting documentation will be explaining want patterns in Agoric/agoric-sdk#10952 ### Testing Considerations Added tests for `M.containerHas` ### Compatibility Considerations The reason to postpone merging this PR until decisions are made on #2008 is that this PR will further expose `rankOrder` in the API, amplifying the danger that changing the string order will cause surprising observable changes. ### Upgrade Considerations This PR itself does not introduce any BREAKING changes or Upgrade issues. - [x] Update `NEWS.md` for user-facing changes.
1efc171
to
27b3006
Compare
bc8b038
to
bbd4873
Compare
Base branch is changed to master. Please re-run the integration tests by adding 'force:integration' label. |
a91d27c
to
28f79dd
Compare
kriskowal
added a commit
to endojs/endo
that referenced
this pull request
Mar 24, 2025
# `ses` v1.12.0 - The `evalTaming:` option values are renamed: - from `'safeEval'`, `'unsafeEval'`, and `'noEval'` - to `'safe-eval'`, `'unsafe-eval'`, and `'no-eval'` in order to follow the convention that lockdown option values use kebob-case rather than camelCase. To avoid breaking old programs during the transition, the old names are deprecated, but continue to work for now. - The value of expressions like `typeof unlikelyGlobal` is now `undefined` instead of producing a `ReferenceError` because it proves impossible to do so without revealing what properties exist on the host `globalThis` to compartmentalized code. # `@endo/patterns` v1.5.0 - New pattern: `M.containerHas(elementPatt, bound = 1n)` motivated to support want patterns in Zoe, to pull out only `bound` number of elements that match `elementPatt`. `bound` must be a positive bigint. - Closely related, `@endo/patterns` now exports `containerHasSplit` to support ERTP's use of `M.containerHas` on non-fungible (`set`, `copySet`) and semifungible (`copyBag`) assets, respectively. See Agoric/agoric-sdk#10952 . # `@endo/import-bundle` v1.4.0 - Adds support for `test` format bundles, which simply return a promise for an object that resembles a module exports namespace with the objects specified on the symbol-named property @exports, which is deliberately not JSON serializable or passable. - Adds a `typedImportBundle<ExpectedExportsNamespace>` function with a proper type signature, to provide a narrower signature than `any` without disrupting existing usage. # `@endo/bundle-source` v4.0.0 - Replaces the implementation for the `nestedEvaluate` and `getExport` formats with one based on Endo's Compartment Mapper instead of Rollup, in order to obviate the need to reconcile source map transforms between Rollup and the underlying Babel generator. As a consequence, we no longer generate a source map for the bundle, but Babel ensures that we preserve line and column numbers between the original source and the bundled source. # `@endo/compartment-mapper` v1.6.0 - Accommodates CommonJS modules that use `defineProperty` on `exports`. - Divides the role of `makeBundle` into `makeScript` and `makeFunctor`. The new `makeScript` replaces `makeBundle` without breaking changes, producing a JavaScript string that is suitable as a `<script>` tag in a web page. - The new `makeFunctor` produces a JavaScript string that, when evaluated, produces a partially applied function, so the caller can provide runtime options. - Both `makeScript` and `makeFunctor` now accept `format`, `useEvaluate` and `sourceUrlPrefix` options. - The functor produced by `makeFunctor` now accepts `evaluate`, `require`, and `sourceUrlPrefix` runtime options. - Both `makeScript` and `makeFunctor` now accept a `format` option. Specifiying the `"cjs"` format allows the bundle to exit to the host's CommonJS `require` for host modules. - Adds `sourceDirname` to compartment descriptors in the compartment maps generated by `mapNodeModules` and uses these to provide better source URL comments for bundles generated by `makeScript` and `makeFunctor`, by default. These changes collectively allow us to replace the implementation of `nestedEvaluate` and `getExports` formats in `@endo/bundle-source`, including the preservation of useful line numbers and file names in stack traces. - `mapNodeModules`, `importLocation` and `loadLocation` now accept a `log` option for users to define a custom logging function. As of this writing, _only `mapNodeModules`_ will potentially call this function if provided. Expansion of log messaging and support for the `log` option in more APIs is expected _in the future_. # `@endo/evasive-transform` v1.4.0 - Adds a `sourceMap` option so that the generated sourcemap can project back to the original source code without `unmapLoc`. - Removes support for sourcemap `unmapLoc` because it is not used by contemporary Endo packages. The option is now ignored.
5260960
to
43794cc
Compare
7e865f7
to
113653c
Compare
a1ed11d
to
6f54123
Compare
1 task
6f54123
to
67b544c
Compare
M.containerHas(el,n)
M.containerHas(el,n)
M.containerHas(el,n)
ae6b40c
to
2e4d932
Compare
67b544c
to
89b0caa
Compare
2e4d932
to
979da2a
Compare
89b0caa
to
e13d700
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Staged on #11235 , which provides the E part
closes: #XXXX
refs: endojs/endo#2710 #1905 #1913 #1915 #2155 #2156 #2230 #4212 #4217 #10951 #11235
Description
Implements minimal want patterns, where the only supported pattern is
M.containerHas
Security Considerations
none
Scaling Considerations
By allowing want patterns, might this make the processing of wants more expensive?
Documentation Considerations
Need to update the Zoe API docs to explain want-patterns
Testing Considerations
Upgrade Considerations
None