-
Notifications
You must be signed in to change notification settings - Fork 44
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
feat(custom-mutators): maintain and fork ivm through pull, mutate, refresh #3934
Open
tantaman
wants to merge
3
commits into
main
Choose a base branch
from
mlaw/call-zero-option
base: main
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 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Branch | mlaw/call-zero-option |
Testbed | localhost |
Click to view all benchmark results
Benchmark | File Size | Benchmark Result kilobytes (KB) (Result Δ%) | Upper Boundary kilobytes (KB) (Limit %) |
---|---|---|---|
zero-package.tgz | 📈 view plot 🚷 view threshold | 1,007.19 KB(+0.17%)Baseline: 1,005.50 KB | 1,025.61 KB (98.20%) |
zero.js | 📈 view plot 🚷 view threshold | 181.82 KB(+0.26%)Baseline: 181.34 KB | 184.97 KB (98.30%) |
zero.js.br | 📈 view plot 🚷 view threshold | 50.80 KB(+0.34%)Baseline: 50.63 KB | 51.64 KB (98.38%) |
a3ca3a4
to
d04f2d4
Compare
fc4777e
to
d244a22
Compare
tantaman
commented
Mar 7, 2025
@@ -65,6 +66,7 @@ export async function persistDD31( | |||
mutators: MutatorDefs, | |||
closed: () => boolean, | |||
formatVersion: FormatVersion, | |||
_getZeroData: ZeroOption['getTxData'] | undefined, |
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.
to be used in the next PR. Getting persist
to work requires changes to LazyRead
and LazyStore
which wouldn't fit well to be reviewed in this context.
ed66b00
to
e6fe7ee
Compare
e6fe7ee
to
375f2e1
Compare
…ot provided If the user of Zero has not defined any custom mutators, do not fork the IVM sources and return `undefined` instead. This is mainly a safety thing. We want there to be a minimal chance of breaking existing users while we're still stabilizing custom mutators. CRUD mutators also do not need forks of the IVM sources since they do not issue reads during mutations.
375f2e1
to
ccbfca6
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.
Persist requires some more invasive changes and will be in a separate PR.
Calls to
advance
are the key thing to review.advance
replaces our use ofexperimentalWatch
to update the main IVM sources. The main difference from experimentalWatch is thatadvance
sends in the expected hash we're advancing from and the hash we're advancing to. This allowsadvance
to set an invariant that we always advance in order. The IVMBranch also keeps track of its current hash so it can compute diffs to use to patch forks inforkToHead(hash)
.I'm surprised we never ran into problems with
experimentalWatch
as I would imagine there would have been cases where arefresh
diff against HEAD-1 jumps ahead of apullEnd
diff against HEAD-0 (due to awaits) or vice-versa.