Skip to content

Conversation

@crisbeto
Copy link
Member

Fixes that the runtime implementation of ɵɵngDeclareDirective was interpreting the hostDirectives mapping incorrectly. Instead of treating the inputs/outputs as ['binding', 'alias'] arrays, it was parsing them as ['binding: alias']. This was leading to runtime errors if a user is consuming a partially-compiled library in JIT mode.

Fixes #54096.

…guration in partial compilation

Fixes that the runtime implementation of `ɵɵngDeclareDirective` was interpreting the `hostDirectives` mapping incorrectly. Instead of treating the inputs/outputs as `['binding', 'alias']` arrays, it was parsing them as `['binding: alias']`. This was leading to runtime errors if a user is consuming a partially-compiled library in JIT mode.

Fixes angular#54096.
@crisbeto crisbeto 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 Jul 16, 2024
@ngbot ngbot bot modified the milestone: Backlog Jul 16, 2024
};
}

function convertHostDirectivesToMetadata(
Copy link
Member Author

@crisbeto crisbeto Jul 16, 2024

Choose a reason for hiding this comment

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

I ended up inlining this function into the two call sites to avoid confusion in the future since we have two different representations of host directives depending on the compilation format.

@crisbeto crisbeto marked this pull request as ready for review July 16, 2024 15:16
@crisbeto crisbeto 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 Jul 16, 2024
@atscott
Copy link
Contributor

atscott commented Jul 16, 2024

This PR was merged into the repository by commit 9167fc8.

The changes were merged into the following branches: main, 18.1.x

atscott pushed a commit that referenced this pull request Jul 16, 2024
…guration in partial compilation (#57002)

Fixes that the runtime implementation of `ɵɵngDeclareDirective` was interpreting the `hostDirectives` mapping incorrectly. Instead of treating the inputs/outputs as `['binding', 'alias']` arrays, it was parsing them as `['binding: alias']`. This was leading to runtime errors if a user is consuming a partially-compiled library in JIT mode.

Fixes #54096.

PR Close #57002
@atscott atscott closed this in 9167fc8 Jul 16, 2024
crisbeto added a commit to crisbeto/angular that referenced this pull request Jul 16, 2024
…guration in partial compilation (angular#57002)

Fixes that the runtime implementation of `ɵɵngDeclareDirective` was interpreting the `hostDirectives` mapping incorrectly. Instead of treating the inputs/outputs as `['binding', 'alias']` arrays, it was parsing them as `['binding: alias']`. This was leading to runtime errors if a user is consuming a partially-compiled library in JIT mode.

Fixes angular#54096.

PR Close angular#57002
atscott pushed a commit that referenced this pull request Jul 16, 2024
…guration in partial compilation (#57002) (#57003)

Fixes that the runtime implementation of `ɵɵngDeclareDirective` was interpreting the `hostDirectives` mapping incorrectly. Instead of treating the inputs/outputs as `['binding', 'alias']` arrays, it was parsing them as `['binding: alias']`. This was leading to runtime errors if a user is consuming a partially-compiled library in JIT mode.

Fixes #54096.

PR Close #57002

PR Close #57003
@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 16, 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.

NG0311: Input/output object literal mapping to array breaks host directive validation

3 participants