Use cross-platform separators for the FSharp.Core.dll test path - #3788
Merged
Conversation
CopyFSharpCoreDll built the ILSpy-tests path with hardcoded Windows backslashes
("..\\..\\..\\ILSpy-tests\\FSharp\\FSharp.Core.dll"). On non-Windows, '\' is a
normal filename character, so the whole string became a single bogus path,
File.Exists always returned false, and the FSharp ILPretty tests were silently
Assert.Ignore'd even when ILSpy-tests was checked out. Build the path from
Path.Combine segments instead so it resolves on every platform (same target:
three levels up from the ILPretty test-case directory).
Assisted-by: Claude:claude-opus-4-8:Claude Code
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.
Problem
ILPrettyTestRunner.CopyFSharpCoreDll()locatesILSpy-tests/FSharp/FSharp.Core.dllwith a hardcoded Windows path:On non-Windows,
\is an ordinary filename character, so this becomes a single bogus path,File.Existsalways returnsfalse, and the FSharp ILPretty tests (FSharpLoops,FSharpUsing) getAssert.Ignore'd — even whenILSpy-testsis checked out. They have effectively never run on Linux/macOS.Fix
Build the path from
Path.Combinesegments so it resolves on every platform. Same target (three levels up from theILPrettytest-case directory, which is where theILSpy-testssubmodule lives), just no embedded separators.Verification (Linux)
With
ILSpy-testschecked out,FSharpLoops_Debug/_Releasenow run and pass instead of being skipped:Test-only change; no production code affected.