Skip to content

Input/output refactors#60036

Closed
crisbeto wants to merge 3 commits intoangular:mainfrom
crisbeto:inputs-split
Closed

Input/output refactors#60036
crisbeto wants to merge 3 commits intoangular:mainfrom
crisbeto:inputs-split

Conversation

@crisbeto
Copy link
Copy Markdown
Member

Includes the following refactors around how we store inputs and outputs internally:

refactor(core): rework how inputs/outputs are initialized

Reworks the functions that create the initialInputs, inputs and outputs structures to initilize them within the function, instead of returning them to be initialized later. This will simplify future refactors where they'll produce more than one piece of information.

refactor(core): separate host directive inputs from selector-matched ones

Currently TNode.inputs/TNode.outputs store all of the available bindings on that node, no matter if they came from a directive that the user applied directly or from a host directive. This has a couple of drawbacks:

  1. We need to store more information that necessary. For example, the only reason we have strings in the arrays is to facilitate host directive aliasing.
  2. It doesn't allow us to distinguish which host directives belong to which selector-matched directives.

These changes are a step towards resolving both issues by storing the host directive binding information in separate data structures.

refactor(core): do not store input/output public names

Reworks the TNode.inputs and TNode.outputs to not store the public names of bindings. The only reason they were stored was for host directive re-aliasing which is handled through a different data structure now.

@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Feb 20, 2025
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Feb 20, 2025
@ngbot ngbot bot added this to the Backlog milestone Feb 20, 2025
@crisbeto crisbeto added the action: review The PR is still awaiting reviews from at least one requested reviewer label Feb 20, 2025
@crisbeto crisbeto marked this pull request as ready for review February 20, 2025 18:00
@crisbeto
Copy link
Copy Markdown
Member Author

crisbeto commented Feb 21, 2025

Passing-ish TGP. There were a couple of targets that were failing at runtime, but I think they're irrelevant because:

  1. One target was failing in the same way in other unrelated TGP run.
  2. Another target passed when running locally and was marked as flaky so it's likely a flaky test.

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate and removed 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 labels Feb 21, 2025
Reworks the functions that create the `initialInputs`, `inputs` and `outputs` structures to initilize them within the function, instead of returning them to be initialized later. This will simplify future refactors where they'll produce more than one piece of information.
…ones

Currently `TNode.inputs`/`TNode.outputs` store all of the available bindings on that node, no matter if they came from a directive that the user applied directly or from a host directive. This has a couple of drawbacks:
1. We need to store more information that necessary. For example, the only reason we have strings in the arrays is to facilitate host directive aliasing.
2. It doesn't allow us to distinguish which host directives belong to which selector-matched directives.

These changes are a step towards resolving both issues by storing the host directive binding information in separate data structures.
Reworks the `TNode.inputs` and `TNode.outputs` to not store the public names of bindings. The only reason they were stored was for host directive re-aliasing which is handled through a different data structure now.
@kirjs
Copy link
Copy Markdown
Contributor

kirjs commented Feb 21, 2025

This PR was merged into the repository by commit 628ab40.

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

@kirjs kirjs closed this in 0cac2a2 Feb 21, 2025
kirjs pushed a commit that referenced this pull request Feb 21, 2025
…ones (#60036)

Currently `TNode.inputs`/`TNode.outputs` store all of the available bindings on that node, no matter if they came from a directive that the user applied directly or from a host directive. This has a couple of drawbacks:
1. We need to store more information that necessary. For example, the only reason we have strings in the arrays is to facilitate host directive aliasing.
2. It doesn't allow us to distinguish which host directives belong to which selector-matched directives.

These changes are a step towards resolving both issues by storing the host directive binding information in separate data structures.

PR Close #60036
kirjs pushed a commit that referenced this pull request Feb 21, 2025
Reworks the `TNode.inputs` and `TNode.outputs` to not store the public names of bindings. The only reason they were stored was for host directive re-aliasing which is handled through a different data structure now.

PR Close #60036
kirjs pushed a commit that referenced this pull request Feb 21, 2025
Reworks the functions that create the `initialInputs`, `inputs` and `outputs` structures to initilize them within the function, instead of returning them to be initialized later. This will simplify future refactors where they'll produce more than one piece of information.

PR Close #60036
kirjs pushed a commit that referenced this pull request Feb 21, 2025
…ones (#60036)

Currently `TNode.inputs`/`TNode.outputs` store all of the available bindings on that node, no matter if they came from a directive that the user applied directly or from a host directive. This has a couple of drawbacks:
1. We need to store more information that necessary. For example, the only reason we have strings in the arrays is to facilitate host directive aliasing.
2. It doesn't allow us to distinguish which host directives belong to which selector-matched directives.

These changes are a step towards resolving both issues by storing the host directive binding information in separate data structures.

PR Close #60036
kirjs pushed a commit that referenced this pull request Feb 21, 2025
Reworks the `TNode.inputs` and `TNode.outputs` to not store the public names of bindings. The only reason they were stored was for host directive re-aliasing which is handled through a different data structure now.

PR Close #60036
@angular-automatic-lock-bot
Copy link
Copy Markdown

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 28, 2025
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: core Issues related to the framework runtime target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants