-
Notifications
You must be signed in to change notification settings - Fork 12.8k
3.9.1-rc regression: Unable to specify rawText
when programmatically creating tagged template literals
#38485
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
Comments
Hi ya'all! This issue is currently blocking Angular from upgrading our ecosystem to TS3.9. We are exploring a workaround in case you can't fix this quickly, but we'd prefer a proper fix upstream. Thank you! |
Gotcha. We're planning a patch release later this month. If we could get something in the nightly and have something published at |
That would work if that's the best you can do. We are working towards cutting Angular v10-rc.0 next Wednesday, so we'll keep on pursuing our workaround for rc.0. Thanks! |
…messages In some versions of TypeScript, the transformation of synthetic `$localize` tagged template literals is broken. See microsoft/TypeScript#38485 We now compute what the expected final output target of the compilation will be so that we can generate ES5 compliant `$localize` calls instead of relying upon TS to do the downleveling for us. This is a workaround for the TS compiler bug, which could be removed when this is fixed. But since it only affects ES5 targeted compilations, which is now not the norm, it has limited impact on the majority of Angular projects. So this fix can probably be left in indefinitely.
…messages In some versions of TypeScript, the transformation of synthetic `$localize` tagged template literals is broken. See microsoft/TypeScript#38485 We now compute what the expected final output target of the compilation will be so that we can generate ES5 compliant `$localize` calls instead of relying upon TS to do the downleveling for us. This is a workaround for the TS compiler bug, which could be removed when this is fixed. But since it only affects ES5 targeted compilations, which is now not the norm, it has limited impact on the majority of Angular projects. So this fix can probably be left in indefinitely.
…messages In some versions of TypeScript, the transformation of synthetic `$localize` tagged template literals is broken. See microsoft/TypeScript#38485 We now compute what the expected final output target of the compilation will be so that we can generate ES5 compliant `$localize` calls instead of relying upon TS to do the downleveling for us. This is a workaround for the TS compiler bug, which could be removed when this is fixed. But since it only affects ES5 targeted compilations, which is now not the norm, it has limited impact on the majority of Angular projects. So this fix can probably be left in indefinitely.
…messages (#36989) In some versions of TypeScript, the transformation of synthetic `$localize` tagged template literals is broken. See microsoft/TypeScript#38485 We now compute what the expected final output target of the compilation will be so that we can generate ES5 compliant `$localize` calls instead of relying upon TS to do the downleveling for us. This is a workaround for the TS compiler bug, which could be removed when this is fixed. But since it only affects ES5 targeted compilations, which is now not the norm, it has limited impact on the majority of Angular projects. So this fix can probably be left in indefinitely. PR Close #36989
3.9.3 should be published with a fix. |
…messages (angular#36989) In some versions of TypeScript, the transformation of synthetic `$localize` tagged template literals is broken. See microsoft/TypeScript#38485 We now compute what the expected final output target of the compilation will be so that we can generate ES5 compliant `$localize` calls instead of relying upon TS to do the downleveling for us. This is a workaround for the TS compiler bug, which could be removed when this is fixed. But since it only affects ES5 targeted compilations, which is now not the norm, it has limited impact on the majority of Angular projects. So this fix can probably be left in indefinitely. PR Close angular#36989
Uh oh!
There was an error while loading. Please reload this page.
TypeScript Version: 3.9.1-rc
Search Terms: tagged template literal rawText raw ES5
Code
The problem occurs when synthesising tagged template literals programmatically, and then trying to render them in ES5.
The API provides a method for specifying the "raw" parts of the template:
But due to this regression this raw value is no longer being used.
An empty string is there, instead.
Here is a link to a reproduction: https://github.com/petebacondarwin/ts-3.9-rawtext-bug
Expected behavior:
Actual behavior:
Playground Link:
It is not possible to provide a Playground link because it only occurs when programmatically creating a tagged template literal AST node.
See the reproduction at https://github.com/petebacondarwin/ts-3.9-rawtext-bug
Related Issues:
This is a regression due to this commit: 70399e1#r39098346
The text was updated successfully, but these errors were encountered: