Fix Windows test reporter path lookup (#3881) - #4191
Open
trippyogi wants to merge 1 commit into
Open
Conversation
Tolerate uri.fsPath vs Dir.pwd differences (separators and drive-letter casing) when resolving the reporter port from the temp DB so Test Explorer receives results on Windows.
trippyogi
marked this pull request as ready for review
August 12, 2026 21:14
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.
Motivation
Fixes #3881.
On Windows, VS Code stores Test Explorer reporter DB keys using
uri.fsPath, while Ruby'sDir.pwdcan represent the same path with different separators and drive-letter casing. The exact hash lookup then misses, causing the reporter to fall back toStringIOand leaving Test Explorer waiting for results even though the tests finished.Implementation
Normalize path separators and drive-letter casing when resolving the reporter port in
LspReporter.The change is reader-only: the VS Code writer continues storing native
uri.fsPathvalues, while the Ruby reporter tolerates equivalent Windows path representations.Automated Tests
d:\...andDir.pwdreturnsD:/....bundle exec ruby -Itest test/test_reporters/lsp_reporter_test.rb— 12 runs, 0 failures.Manual Tests
Tested against a small RSpec project on Windows:
Before (published gem):
After (this branch):