fix(compiler-cli): only pass canonical genfile paths to compiler host #27062
Conversation
2dca81e
to
a755079
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
18ef5a4
to
57e136d
In a more specific scenario: Considering people use a custom TypeScript compiler host with `NGC`, they _could_ expect only posix paths in methods like `writeFile`. This at first glance sounds like a trivial issue that should be just fixed by the actual compiler host, but usually TypeScript internal API's just pass around posix normalized paths, and therefore it would be good to follow the same standards when passing JSON genfiles to the `CompilerHost`. For normal TypeScript files (and TS genfiles), this is already consistent because those will be handled by the actual TypeScript `Program` (see `emitCallback`).
57e136d
to
21021dc
|
You can preview 21021dc at https://pr27062-21021dc.ngbuilds.io/. |
alexeagle
approved these changes
Nov 12, 2018
|
looks like mine will finish first :) |
AndrewKushnir
added a commit
that referenced
this issue
Nov 13, 2018
…#27062) In a more specific scenario: Considering people use a custom TypeScript compiler host with `NGC`, they _could_ expect only posix paths in methods like `writeFile`. This at first glance sounds like a trivial issue that should be just fixed by the actual compiler host, but usually TypeScript internal API's just pass around posix normalized paths, and therefore it would be good to follow the same standards when passing JSON genfiles to the `CompilerHost`. For normal TypeScript files (and TS genfiles), this is already consistent because those will be handled by the actual TypeScript `Program` (see `emitCallback`). PR Close #27062
FrederikSchlemmer
pushed a commit
to FrederikSchlemmer/angular
that referenced
this issue
Jan 3, 2019
…angular#27062) In a more specific scenario: Considering people use a custom TypeScript compiler host with `NGC`, they _could_ expect only posix paths in methods like `writeFile`. This at first glance sounds like a trivial issue that should be just fixed by the actual compiler host, but usually TypeScript internal API's just pass around posix normalized paths, and therefore it would be good to follow the same standards when passing JSON genfiles to the `CompilerHost`. For normal TypeScript files (and TS genfiles), this is already consistent because those will be handled by the actual TypeScript `Program` (see `emitCallback`). PR Close angular#27062
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes that the compiler-cli passes non-posix paths for JSON genfiles to the currently set up
CompilerHost.In a more specific scenario: Considering people use a custom TypeScript compiler host with
NGC, they could expect only posix paths in methods likewriteFile. This at first glance sounds like a trivial issue that should be just fixed by the actual compiler host, but usually TypeScript internal API's just pass around POSIX normalized paths, and therefore it would be good to follow the same standards when passing JSON genfiles to theCompilerHost#writeFile.Fixes that the metadata for
NgModuledefinitions which are created on the fly (through Bazelgenrules) is not being written to the proper disk location.The normalization is necessary because otherwise the custom
CompilerHostwithin the Bazel TypeScript rules cannot flatten out thebazel-out/X-fastbuild/genfiles/path segment.See issue reproduction: devversion/issue-demo-genrule-ngmodule@363ec5a.
The text was updated successfully, but these errors were encountered: