fix: normalize paths in get-options-overrides
#331
Merged
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.
Summary
get-options-overrides.ts
had some paths that were not normalized, resulting in mixed separators on Windows in certain cases.get-options-overrides
(createFilter
) #329 (comment)get-options-overrides
(createFilter
) #329 (comment)Details
the
outDir
was not normalized after the/placeholder
part was added tocacheRoot
cacheRoot
could have\
directory separators on it on Windows, which caused some tests to fail on Windows beforeexpandIncludeWithDirs
usedpath.join
without normalizing afterpath.join
uses the OS's native separators (posix.join
would do POSIX separators only), so when the paths were already normalized and thenpath.join
ed, this would cause mixed separators on WindowscreateFilter
tests (rootDirs
andprojectReferences
, which useexpandIncludeWithDirs
)Review Notes
This should just be a bugfix and not breaking, but per the linked discussions, I'm really not sure how these bugs haven't been found yet by consumers -- I'm guessing that TS does normalization on
outDir
(lots of redundant normalization necessary due to ambiguous inputs) and thatrootDirs
andprojectReferences
just aren't used by many Windows users.