Skip to content

Resolve the same tool synchronously and asynchronously - #800

Merged
SimonCropp merged 1 commit into
mainfrom
fix-sync-launch-tool-resolution
Aug 22, 2026
Merged

Resolve the same tool synchronously and asynchronously#800
SimonCropp merged 1 commit into
mainfrom
fix-sync-launch-tool-resolution

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

Launch asked TryFindByExtension and LaunchAsync asks TryFindForInputFilePath.
The two differ: only the second can see a text file convention, since the first
is handed an extension and a convention matches on the whole path.

So a file matched by a convention rather than by its extension opened a diff
tool through LaunchAsync and reported NoDiffToolFound through Launch. Kill used
the extension lookup too, so it then logged that it could not find a tool for a
pair LaunchAsync had opened - leaving the tool on screen for a test that had
started passing, which is the one thing Kill exists to prevent.

Both now go through TryFindForInputFilePath. Kill's log message changes with it,
since "Extension not found" was already describing a lookup it no longer does.

The test pins the gap between the two lookups rather than driving DiffRunner. A
convention matched file can only resolve to the first text tool installed on the
machine - a fake one cannot be registered for it - so a behavioural test would
launch the developer's real diff tool. The change itself is which of the two
calls these make, and is verified by reading.

Launch asked TryFindByExtension and LaunchAsync asks TryFindForInputFilePath.
The two differ: only the second can see a text file convention, since the first
is handed an extension and a convention matches on the whole path.

So a file matched by a convention rather than by its extension opened a diff
tool through LaunchAsync and reported NoDiffToolFound through Launch. Kill used
the extension lookup too, so it then logged that it could not find a tool for a
pair LaunchAsync had opened - leaving the tool on screen for a test that had
started passing, which is the one thing Kill exists to prevent.

Both now go through TryFindForInputFilePath. Kill's log message changes with it,
since "Extension not found" was already describing a lookup it no longer does.

The test pins the gap between the two lookups rather than driving DiffRunner. A
convention matched file can only resolve to the first text tool installed on the
machine - a fake one cannot be registered for it - so a behavioural test would
launch the developer's real diff tool. The change itself is which of the two
calls these make, and is verified by reading.
@SimonCropp SimonCropp added this to the 20.0.0 milestone Aug 22, 2026
@SimonCropp
SimonCropp merged commit 1c1ea6e into main Aug 22, 2026
10 checks passed
@SimonCropp
SimonCropp deleted the fix-sync-launch-tool-resolution branch August 22, 2026 02:50
This was referenced Aug 26, 2026
This was referenced Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant