Skip to content

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

Closed
petebacondarwin wants to merge 1 commit into
angular:10.0.xfrom
petebacondarwin:ngtsc-filesystem-case-sensitive-fixes-backport
Closed

fix(compiler-cli): ensure file_system handles mixed Windows drives BACKPORT#38030
petebacondarwin wants to merge 1 commit into
angular:10.0.xfrom
petebacondarwin:ngtsc-filesystem-case-sensitive-fixes-backport

Conversation

@petebacondarwin

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown

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.

3 participants