Skip to content
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

fix(compiler-cli): Emit type annotations for synthesized decorator fi… #43021

Closed
wants to merge 1 commit into from

Conversation

nreid260
Copy link
Contributor

@nreid260 nreid260 commented Aug 2, 2021

…elds

Previously, the decorator transformer was annotating the synthesized properties with TS type annotations. However, because it ran after the JSDoc transformer, the TS types were just dropped from the emitted JS. Attempting to move the decorator transformer before the JSDoc transformer causes tsickle crashes because synthetic AST fragments are not attached to a SourceFile node.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@google-cla google-cla bot added the cla: yes label Aug 2, 2021
@pullapprove pullapprove bot requested a review from atscott August 2, 2021 21:19
@atscott atscott added the target: patch This PR is targeted for the next patch release label Aug 2, 2021
@nreid260 nreid260 force-pushed the decorator branch 3 times, most recently from 547dee8 to 5319f82 Compare August 3, 2021 22:22
Copy link

@blickly blickly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mprobst, hey Martin, do you know who would be an appropriate person to review this CL? This is currently on the critical path to improving checking of TypeScript libraries as a whole

@mprobst
Copy link
Contributor

mprobst commented Aug 5, 2021

@blickly I believe this has landed internally and we need to figure out why the sync is stuck.

@mprobst
Copy link
Contributor

mprobst commented Aug 5, 2021

@mprobst nope, I mixed this up with the tsickle change. Nevermind.

@AndrewKushnir AndrewKushnir added the area: compiler Issues related to `ngc`, Angular's template compiler label Aug 12, 2021
@ngbot ngbot bot added this to the Backlog milestone Aug 12, 2021
@IgorMinar IgorMinar requested a review from alxhub August 18, 2021 23:36
@alxhub alxhub requested review from clydin and removed request for atscott August 18, 2021 23:40
@alxhub
Copy link
Member

alxhub commented Aug 18, 2021

Also adding @clydin as I think this transform is used by the CLI as well.

…elds

Previously, the decorator transformer was annotating the synthesized properties with TS type annotations. However, because it ran after the JSDoc transformer, the TS types were just dropped from the emitted JS. Attempting to move the decorator transformer before the JSDoc transformer causes tsickle crashes because synthetic AST fragments are not attached to a SourceFile node.
@nreid260
Copy link
Contributor Author

These failures look like TAP noise.

@alxhub alxhub added the action: merge The PR is ready for merge by the caretaker label Aug 25, 2021
alxhub pushed a commit that referenced this pull request Aug 25, 2021
…elds (#43021)

Previously, the decorator transformer was annotating the synthesized properties with TS type annotations. However, because it ran after the JSDoc transformer, the TS types were just dropped from the emitted JS. Attempting to move the decorator transformer before the JSDoc transformer causes tsickle crashes because synthetic AST fragments are not attached to a SourceFile node.

PR Close #43021
@alxhub alxhub closed this in 4341a5f Aug 25, 2021
TeriGlover pushed a commit to TeriGlover/angular that referenced this pull request Sep 16, 2021
…elds (angular#43021)

Previously, the decorator transformer was annotating the synthesized properties with TS type annotations. However, because it ran after the JSDoc transformer, the TS types were just dropped from the emitted JS. Attempting to move the decorator transformer before the JSDoc transformer causes tsickle crashes because synthetic AST fragments are not attached to a SourceFile node.

PR Close angular#43021
TeriGlover pushed a commit to TeriGlover/angular that referenced this pull request Sep 22, 2021
…elds (angular#43021)

Previously, the decorator transformer was annotating the synthesized properties with TS type annotations. However, because it ran after the JSDoc transformer, the TS types were just dropped from the emitted JS. Attempting to move the decorator transformer before the JSDoc transformer causes tsickle crashes because synthetic AST fragments are not attached to a SourceFile node.

PR Close angular#43021
@angular-automatic-lock-bot
Copy link

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 Sep 25, 2021
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 area: compiler Issues related to `ngc`, Angular's template compiler cla: yes target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants