Inline snapshots - #12
Merged
Merged
Conversation
SettleInline stamps the running process's own framework as the origin, which here is this tool's rather than the test project's. The tool targets net10.0;net8.0 and the entry carries whatever the test project targets, so the two matched only by coincidence. On a mismatch the owner strips nothing and answers no differently than if it had, so the entry stayed pending against source that already held the snapshot, silently. SettleAppliedInline carries no framework, which is the true statement: the literal every variant was anchored to has gone, so none of them can apply. It also takes the patch, so MemberName goes along and the entry is still found once an earlier accept has pushed its line down the file.
SettleAppliedInline is not released yet. Points at DiffEngine's working tree via pack-local.ps1 so this branch builds. Revert this commit and pin DiffEngine to the published version once it ships. CI cannot build the branch until then.
DiffEngine 20.0.0-beta.33 carries SettleAppliedInline, so the working-tree feed the TEMPORARY commit added has nothing left to serve.
An Unknown accept with staged files falls back to applying the patch here, and a discard the owner could not be asked about is treated as done. Only the opposite of each was covered, so a mutation of either branch passed the suite. Both new tests were checked against such a mutation rather than only run green: flipping the condition each pins fails that test and nothing else.
The guard points every inline queue exchange this process makes at a port nothing listens on, but it lived in the integration Harness, so the unit tests had none: one that applies a staged patch settles it with the owner afterwards, and that settle went to whatever tray happened to be running on the machine. Now a module initializer in a file both test projects compile, so it runs before any test in either and cannot be skipped by one that builds no harness. The port is picked once per assembly rather than once per Harness: re-pointing per harness would clobber a live InlineQueueHost if one were ever constructed first, which is a worse risk than the OS reusing a port it just handed out.
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
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.
https://github.com/VerifyTests/Verify/blob/main/docs/inline-snapshots.md
Adds inline snapshot support, so
review,acceptandrejecthandle inline snapshots beside file snapshots and a run that produced both is dealt with in one pass.What changes
ISnapshotsplits the file-basedSnapshotfrom the newInlineSnapshot, and the finder, differ, renderer, manager and commands all work over the abstraction.reviewheads it with the call site and marks it(inline).obj/VerifyInline/when nothing answers. A tool that read one of them would report nothing pending for half its users.Snapshot(...)call itself changed.Notes
DiffEngine20.0.0-beta.34 and Verify 32.0.0-beta.14 — theSettleAppliedInlineverb this relies on ships there.