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

Forbid custom decorators in local compilation mode #53983

Closed
wants to merge 1 commit into from

Conversation

pmvald
Copy link
Member

@pmvald pmvald commented Jan 19, 2024

Eventually we will support custom decorators in local compilation mode. But for now we forbid it since there are little usage of it in g3.

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

@demike
Copy link

demike commented Jan 19, 2024

What would be the benefit of forbidding custom decorators?
Could you elaborate.
I mean this draft makes me nervous because our application(s) heavily rely on custom decorators.

We use decorators to put our components (with meta information) into registries, which in turn are used for completely dynamic json based custom templates

@devversion devversion changed the title forbid custom decorators Experiment: forbid custom decorators for local compilation Jan 19, 2024
@eneajaho
Copy link
Contributor

What would be the benefit of forbidding custom decorators? Could you elaborate. I mean this draft makes me nervous because our application(s) heavily rely on custom decorators.

We use decorators to put our components (with meta information) into registries, which in turn are used for completely dynamic json based custom templates

Local compilation is a feature that is used internally at Google so it doesn't affect how we build Angular apps.

@pmvald pmvald changed the title Experiment: forbid custom decorators for local compilation Forbid custom decorators in local compilation mode Jan 26, 2024
@pmvald pmvald added action: review The PR is still awaiting reviews from at least one requested reviewer area: compiler Issues related to `ngc`, Angular's template compiler target: minor This PR is targeted for the next minor release PullApprove: disable labels Jan 26, 2024
@ngbot ngbot bot modified the milestone: Backlog Jan 26, 2024
@pmvald pmvald marked this pull request as ready for review January 26, 2024 04:02
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

LGTM conceptually, just some nits

…ompilation mode

At the moment local compilation mode does not support custom decorators, and it leads to unhandled errors. In this change a compile time diagnostic is produced in local mode for custom decorators. This is a temporary solution since there are few custom decorators are in use in g3. Custom decorators will be eventually supported in local mode.
@devversion devversion added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 26, 2024
@devversion devversion removed the request for review from crisbeto January 26, 2024 18:26
@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit 0970129.

nikvarma pushed a commit to nikvarma/angular that referenced this pull request Jan 31, 2024
…ompilation mode (angular#53983)

At the moment local compilation mode does not support custom decorators, and it leads to unhandled errors. In this change a compile time diagnostic is produced in local mode for custom decorators. This is a temporary solution since there are few custom decorators are in use in g3. Custom decorators will be eventually supported in local mode.

PR Close angular#53983
@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 Feb 26, 2024
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 PullApprove: disable target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants