Launch the viewer without the test host's handles, and settle by value - #895
Closed
SimonCropp wants to merge 1 commit into
Closed
SimonCropp wants to merge 1 commit into
SimonCropp wants to merge 1 commit into
Conversation
- MemberLine prefers a declaration whose span holds the hint, the outermost where several do, over one that is merely nearer. A same-named test in the next nested type, or an F# local named like the test, put the floor past the hint. - NextMemberLine compares indentation as columns, with tab stops of four. A tab indented body under a space indented member ended the member at its first local. - F# escapes that are malformed or not F#'s (\d, \0, \12, \e, \x4, \u12) keep the backslash as text, as fsi does, rather than making the literal unreadable. A trigraph past 255 wraps into the byte range, as fsi does. - An F# regular literal is read as the snapshot it holds, with the layout convention applied as the test library applies it, and layout-shaped content that has to be written as a regular literal is wrapped in layout of its own. The patcher called such a literal already applied, so it was never updated. - WildcardFileFinder finds nothing, rather than throwing, under a root that does not exist: an undefined Program Files variable threw out of DiffTools' static constructor. - ViewerLaunchGate.LaunchAsync runs the launch on the pool and does not capture the caller's context while it holds the gate, so a sync Launch behind it on a single threaded context no longer deadlocks. - InlineApplier answers Failed where opening the mutex or the patcher throws, rather than unwinding a viewer's loop. - Staged file names cut the test name to fit 255 bytes, and on .NET Framework the whole path to MAX_PATH. Longer names were silently not staged. - A reply on the viewer port that is not the protocol marks the port unowned and says once which variable moves DiffEngine off it, rather than being taken for an owner that silently took nothing.
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.
This fixes the last two "Library and inline" items from
todo.md, which #894 left open because each needed a design decision. That section oftodo.mdis now empty and removed.dotnet testdoes not return until the launched viewer is closedThe viewer inherited the pipe
dotnet testreads the test host's output from, anddotnet testreads it until every writer has closed it.--payload. The viewer reads the file and deletes it. With no--payload, it still reads stdin, so the documented< the.inlinepatchform and an older DiffEngine keep working.WinExe. The SDK only infers that for a-windowsframework, so the apphost was a console executable, and ShellExecute would have given it a console window beside the viewer. It attaches to its parent's console only to print a usage error.Tests:
ViewerLauncherTests.OnWindowsTheViewerInheritsNothing,ElsewhereTheViewerHasStandardStreamsOfItsOwn,AnInlineLaunchNamesItsPayloadFile, andCommandLineTests.InlineWithPayload,APayloadFileIsReadAndDeleted,AMissingPayloadFileIsNoPayload. The stand-in host measurement is not a committed test: a real one would open a console window during the run.Settle-by-member counts queue entries, not call sites
A settle can now carry the passing call's value, through a new optional
valueargument onDiffRunner.SettleInlineand avaluefield on the wire. When the line names no entry, the member fallback then only takes an entry that value settles (InlinePatch.IsSettledBy): one anchored to it, or one waiting to become it. A value also picks one entry out of several in a member.InlineStaging.Cleartakes the same value for the same fallback on disk.Without a value, behaviour is unchanged, so nothing regresses until Verify passes one. An owner that predates the field skips it, as it skips any unknown field.
Tests:
InlineQueueTests.SettleFromAPassingSiblingKeepsTheFailingSiblingsEntry,SettleByMemberTakesAnEntryAnchoredToTheValue,SettleByMemberTakesAnEntryWaitingForTheValue,SettleByMemberWithAValueChoosesAmongSeveral,ASettleValueRoundTrips, andInlineStagingTests.ClearFromAPassingSiblingKeepsTheFailingSiblingsStagedTrio,ClearByMemberTakesACallSiteTheValueSettles.Verify needs a follow-up: pass the expected value to
SettleInline(afterSnapshotValuefor F#) and toInlineStaging.Clear.The full solution passes locally in Release: 2,154 passed, 22 skipped.