Skip to content

build: remove workaround for decorator metadata in universal-app #19840

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

Merged

Conversation

devversion
Copy link
Member

In the past, Angular removed tsickle from the build pipeline. This meant
that decorators were not downleveled, and executed immediately. This
caused errors in SSR as parameters or input types are accessed on
file load as runtime values. e.g. consider an input that used
HTMLElement as type. The TypeScript decorator output would access
HTMLElement on file load directly. This breaks on the server as such
DOM specific globals do not exist there.

We worked around this by providing global mocks for these symbols. Now
with Angular v10 though, Angular processes decorators by default without
requiring tsickle. This means that we can remove the workaround.

In the past, Angular removed tsickle from the build pipeline. This meant
that decorators were not downleveled, and executed immediately. This
caused errors in SSR as parameters or input types are accessed on
file load as runtime values. e.g. consider an input that used
`HTMLElement` as type. The TypeScript decorator output would access
`HTMLElement` on file load directly. This breaks on the server as such
DOM specific globals do not exist there.

We worked around this by providing global mocks for these symbols. Now
with Angular v10 though, Angular processes decorators by default without
requiring tsickle. This means that we can remove the workaround.
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 2, 2020
@devversion devversion marked this pull request as ready for review July 2, 2020 12:44
@devversion devversion added merge safe target: patch This PR is targeted for the next patch release labels Jul 2, 2020
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@crisbeto crisbeto added lgtm action: merge The PR is ready for merge by the caretaker labels Jul 2, 2020
@mmalerba mmalerba merged commit 6db1134 into angular:master Jul 8, 2020
mmalerba pushed a commit that referenced this pull request Jul 8, 2020
)

In the past, Angular removed tsickle from the build pipeline. This meant
that decorators were not downleveled, and executed immediately. This
caused errors in SSR as parameters or input types are accessed on
file load as runtime values. e.g. consider an input that used
`HTMLElement` as type. The TypeScript decorator output would access
`HTMLElement` on file load directly. This breaks on the server as such
DOM specific globals do not exist there.

We worked around this by providing global mocks for these symbols. Now
with Angular v10 though, Angular processes decorators by default without
requiring tsickle. This means that we can remove the workaround.
@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 Aug 8, 2020
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 cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants