📎 [Internal/DX] Inconsistent Windows path handling in tsconfig test suite #10308
anarefolio
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Description
While exploring the codebase on Windows, I noticed some internal
inconsistency regarding how paths are handled in the
tsconfig.jsontest suite.
Currently, the suite relies on Unix-style absolute paths (e.g.,
/test/tsconfig.json). On Windows, these are not recognized asabsolute, leading to "brittle" tests that require manual workarounds
to pass.
Technical Debt Identified
I found several places where we are currently "patching" this behavior
rather than solving it systemically:
1.
tsconfig_json.rs:89— a debug assertion is disabled on Windowsbecause of the path style:
2.
manifest_spec_tests.rs— backslashes are manually replaced insnapshot output:
Concrete Example
I wrote a small test to confirm the behavior on Windows:
Which fails with:
thread '...test_base_url_with_fake_unix_path_on_windows' panicked:
assertion failed: base_url resolved to '\test\src' instead of '/test/src'
left: "\test\src"
right: "/test/src"
Why This Matters
While real users are not affected (production code handles Windows paths
correctly), this infrastructure debt makes the test suite harder to
maintain. It creates a risk of masking real Windows-specific regressions
because we are accustomed to "working around" path issues in tests.
Since other parts of Biome already use
MemoryFileSystemfor OS-agnostictesting, it might be worth aligning these tests with that pattern in
the future.
Just flagging this for the team's awareness! 😊
Environment
Beta Was this translation helpful? Give feedback.
All reactions