Skip to content

Handle unixy paths in RWC tests#18585

Merged
weswigham merged 1 commit into
microsoft:masterfrom
weswigham:fix-rwc-unix-path-handling
Sep 20, 2017
Merged

Handle unixy paths in RWC tests#18585
weswigham merged 1 commit into
microsoft:masterfrom
weswigham:fix-rwc-unix-path-handling

Conversation

@weswigham
Copy link
Copy Markdown
Member

@weswigham weswigham commented Sep 20, 2017

Fixes an issue @sandersn was seeing with rooted unix paths outputting in the wrong directory. The issue was that combinePaths drops the LHS operand when the RHS is rooted (which is not what was desired here) - this never happens with windows-captured baselines as the paths are preprocessed to remove the root (by replacing the colon).

Fixes #18561

Copy link
Copy Markdown
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should ts.combinePaths handle this case too?

@sandersn
Copy link
Copy Markdown
Member

What I meant is: should combinedPaths drop the left side when it's rooted? When is this desirable?

@weswigham
Copy link
Copy Markdown
Member Author

@sandersn its current behavior seems very intentional, as there's an explicit check for it. We probably rely on this behavior somewhere?

@sandersn
Copy link
Copy Markdown
Member

Yeah, probably. I think the current fix is fine. I removed the getRootLength check in combinePaths and it does indeed break tests that exercise module resolution.

@weswigham weswigham merged commit 136a3ea into microsoft:master Sep 20, 2017
@weswigham weswigham deleted the fix-rwc-unix-path-handling branch October 12, 2017 08:07
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants