Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler-cli): ensure file_system handles mixed Windows drives BACKPORT #38030

Conversation

petebacondarwin
Copy link
Member

This is a backport of #37959

The fs.relative() method assumed that the file-system is a single tree,
which is not the case in Windows, where you can have multiple drives,
e.g. C:, D: etc.

This commit changes fs.relative() so that it no longer forces the result
to be a PathSegment and then flows that refactoring through the rest of
the compiler-cli (and ngcc). The main difference is that now, in some cases,
we needed to check whether the result is "rooted", i.e an AbsoluteFsPath,
rather than a PathSegment, before using it.

Fixes #36777

@petebacondarwin petebacondarwin added type: bug/fix action: merge The PR is ready for merge by the caretaker PR target: patch-only labels Jul 13, 2020
@pullapprove pullapprove bot requested a review from alxhub July 13, 2020 20:05
The `fs.relative()` method assumed that the file-system is a single tree,
which is not the case in Windows, where you can have multiple drives,
e.g. `C:`, `D:` etc.

This commit changes `fs.relative()` so that it no longer forces the result
to be a `PathSegment` and then flows that refactoring through the rest of
the compiler-cli (and ngcc).  The main difference is that now, in some cases,
we needed to check whether the result is "rooted", i.e an `AbsoluteFsPath`,
rather than a `PathSegment`, before using it.

Fixes angular#36777
@petebacondarwin petebacondarwin force-pushed the ngtsc-filesystem-case-sensitive-fixes-backport branch from ef415c9 to 25b9696 Compare July 13, 2020 20:36
@petebacondarwin petebacondarwin changed the title fix(compiler-cli): ensure file_system handles mixed Windows drives fix(compiler-cli): ensure file_system handles mixed Windows drives BACKPORT Jul 14, 2020
AndrewKushnir pushed a commit that referenced this pull request Jul 15, 2020
…38030)

The `fs.relative()` method assumed that the file-system is a single tree,
which is not the case in Windows, where you can have multiple drives,
e.g. `C:`, `D:` etc.

This commit changes `fs.relative()` so that it no longer forces the result
to be a `PathSegment` and then flows that refactoring through the rest of
the compiler-cli (and ngcc).  The main difference is that now, in some cases,
we needed to check whether the result is "rooted", i.e an `AbsoluteFsPath`,
rather than a `PathSegment`, before using it.

Fixes #36777

PR Close #38030
@AndrewKushnir
Copy link
Contributor

This PR is now merged into the patch branch (10.0.x).

@petebacondarwin petebacondarwin deleted the ngtsc-filesystem-case-sensitive-fixes-backport branch July 15, 2020 19:42
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants