Repository navigation
Conversation
alexeagle
left a comment
There was a problem hiding this comment.
Awesome, thanks a bunch for fitting this into the v10 release! It's nice to see the fix can be made without anything Bazel-specific like changing rules_typescript.
gregmagolan
left a comment
There was a problem hiding this comment.
Nice! Thanks @alxhub
|
FYI I patched that line into rules_nodejs to confirm that it's green downstream bazel-contrib/rules_nodejs#1932 |
`NgTscPlugin` wraps an incoming `ts.CompilerHost` in an `NgCompilerHost` which patches all `ts.SourceFile`s in the program with referenced shims. In order to not emit triple-slash `<reference>` directives that refer to shim files, these patches have to be cleaned up by calling `NgCompilerHost.postProgramCreationCleanup()` before emit. Previously, the `NgTscPlugin` was not doing this cleanup. This commit fixes the bug (which is a one-line change), plus adds a mechanism in the `NgtscTestEnvironment` to run compilation via the plugin, allowing for a test to be written.
27528e3 to
9128f92
Compare
|
Agh, this wasn't included in Angular 10? So anyone using Bazel will have problems upgrading. I wonder if any such issues were already reported |
|
oh it looks like maybe the fix went in #37690 already so this PR just adds a specific test case for the regression we saw in ts_library |
@alexeagle Yes, that's correct. 10.0.0 was still broken, but 10.0.1 fixed the issue in #37690. |
|
Cool we upgraded the Bazel example and removed the patch, all good on our end. |
|
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. |
NgTscPluginwraps an incomingts.CompilerHostin anNgCompilerHostwhich patches all
ts.SourceFiles in the program with referenced shims. Inorder to not emit triple-slash
<reference>directives that refer to shimfiles, these patches have to be cleaned up by calling
NgCompilerHost.postProgramCreationCleanup()before emit. Previously, theNgTscPluginwas not doing this cleanup.This commit fixes the bug (which is a one-line change), plus adds a
mechanism in the
NgtscTestEnvironmentto run compilation via the plugin,allowing for a test to be written.