Skip to content

fix(compiler-cli): do not error due to multiple components named equally#54273

Closed
devversion wants to merge 2 commits intoangular:mainfrom
devversion:fix-multiple-names
Closed

fix(compiler-cli): do not error due to multiple components named equally#54273
devversion wants to merge 2 commits intoangular:mainfrom
devversion:fix-multiple-names

Conversation

@devversion
Copy link
Member

Currently, when two components are named TestComponent, and both would use
e.g. control flow. Templates would be generated by the compiler and those would
conflict at runtime because the names for the template functions are not ensured to be unique.

This seems like a more general problem that could be tackled in the future in the
template pipeline by always using the ConstantPool, but for now, we should be
good already, given us ensuring the baseName's are always unique.

Currently, when two components are named `TestComponent`, and both would
use e.g. control flow. Templates would be generated by the compiler and
those would conflict at runtime because the names for the template
functions are not ensured to be unique.

This seems like a more general problem that could be tackled in the
future in the template pipeline by always using the `ConstantPool`, but
for now, we should be good already, given us ensuring the `baseName`'s are
always unique.
@devversion devversion added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release area: compiler Issues related to `ngc`, Angular's template compiler labels Feb 6, 2024
@devversion devversion requested review from JoostK and crisbeto February 6, 2024 14:11
@ngbot ngbot bot modified the milestone: Backlog Feb 6, 2024
@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 Feb 6, 2024
jessicajaniuk pushed a commit that referenced this pull request Feb 6, 2024
…lly (#54273)

Currently, when two components are named `TestComponent`, and both would
use e.g. control flow. Templates would be generated by the compiler and
those would conflict at runtime because the names for the template
functions are not ensured to be unique.

This seems like a more general problem that could be tackled in the
future in the template pipeline by always using the `ConstantPool`, but
for now, we should be good already, given us ensuring the `baseName`'s are
always unique.

PR Close #54273
@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit bfbb306.

@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 Mar 8, 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 target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants