-
Notifications
You must be signed in to change notification settings - Fork 12k
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
jit-prod
test is failing CI
#17264
Comments
Some extra context from @clydin: Rolling back just @angular/core to 9.1.0-next.5 seems to fix it. Appears related to the optimization of the changes from this PR: angular/angular#35534 I think working around it on the FW side may be the quicker option. Renaming jitOptions to jitCompilerOptions seems to solve the problem (https://github.com/angular/angular/pull/35534/files#diff-c8ff2ff244e44ddf22d9df5edcacc9b1R15) |
Might be related to terser/terser#612 |
I can confirm that disabling Terser inlining makes the error go away. |
Made a reproduction of the exact Terser bug in terser/terser#615. |
Submitted angular/angular#36200 in FW to change the name of the variable, which gets around this bug. This sounds like the best approach while Terser still has the bug. |
This variable name change works around terser/terser#615, which was causing the JIT production tests to fail in the Angular CLI repository (angular/angular-cli#17264). PR Close #36200
This variable name change works around terser/terser#615, which was causing the JIT production tests to fail in the Angular CLI repository (angular/angular-cli#17264). PR Close #36200
Thanks everyone for the investigation and quick fix! |
Roll-forward of CLI RC0 release referencing FW RC1, which includes a necessary fix for #17264.
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. |
CI is failing on most branches and blocking RC. https://app.circleci.com/pipelines/github/angular/angular-cli/6157/workflows/14f7b0bd-d3d5-442c-ae94-56d2a6eed305/jobs/146745
I started some preliminary investigation and am able to reproduce by running:
There is a glob argument to choose the offending test and run just that, but I can't seem to get it to work. This pauses when the test fails and keeps the temporary directory where it ran open.
Going into that directory,
ng e2e --prod
fails, which is what CI is trying to run. This appears to be testing the exampleng new
app prod build after settingaot
andbuildOptimizer
tofalse
.https://github.com/angular/angular-cli/blob/master/tests/legacy-cli/e2e/tests/build/jit-prod.ts
Changing either setting or running without
--prod
passes the test, so it appears to be coming from this specific set of options.Running
ng serve --prod
and visiting the app I can see the full error:Jumping to place in the code and formatting nicely I see:
This appears to be the compiled form of this line which is throwing the error. The source file looks reasonable to me.
I'm pretty sure this optimized format is just wrong. I don't see any scenario where
const <identifier> = <same identifier>;
would be valid.I'm not sure how to debug this further, but it seems to be a prod optimization issue when
buildOptimizer
/aot
is disabled.The text was updated successfully, but these errors were encountered: