Skip to content

Normalize basepath in parseJsonConfigFileContent()#9138

Closed
otbe wants to merge 3 commits into
microsoft:masterfrom
otbe:fix-for-wrong-normalized-basepath
Closed

Normalize basepath in parseJsonConfigFileContent()#9138
otbe wants to merge 3 commits into
microsoft:masterfrom
otbe:fix-for-wrong-normalized-basepath

Conversation

@otbe
Copy link
Copy Markdown

@otbe otbe commented Jun 13, 2016

This PR fixes #9123 by normalizing the path with normalizeSlashes().
Im not sure if this enough, please review :)

@msftclas
Copy link
Copy Markdown

Hi @otbe, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.

TTYL, MSBOT;

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Jun 13, 2016

@otbe
Copy link
Copy Markdown
Author

otbe commented Jun 13, 2016

I would like to do so, but its a bit tricky.
My proposed fix is a quickfix for the readDirectory function from sys.ts (here and here). In tsconfigParsing.ts this specific part (the buggy code) is mocked away, so no chance to test it :(

Explanation:
All occurrences of

const name = combinePaths(path, current);

use the wrong (non-normalized) path. I wil change my PR to fix the concrete bug, but I don't know how to test this, because there is no test for readDirectory or sys.ts at all!?

Btw: I know nothing about the WScript subsystem, so maybe this fix is only needed for the Node subsystem.

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Dec 30, 2016

Superseded by #12667

@mhegazy mhegazy closed this Dec 30, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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.

TypeScript 1.9.0 API assumes wrong files to parse if used on windows in conjunction with exclude

3 participants