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

Linker fixes to handle @ syntax #51979

Closed
wants to merge 2 commits into from

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Oct 2, 2023

Includes some fixes in the linker to parse blocks for libraries compiled with v17 or above and to enable block parsing through the linker. Split into the following commits:

fix(compiler): enable block syntax in the linker

Adds some logic to enable parsing of block syntax in the linker. Note that the syntax is only enabled on code compiled with Angular v17 or later.

fix(compiler): update the minVersion if component uses block syntax

Increases the minVersion of component declarations that use blocks to v17 in order to indicate to users that they need to update if the library they're using is on the new syntax, while preserving backwards compatibility for libraries that do not use the syntax.

@crisbeto crisbeto requested a review from JoostK October 2, 2023 12:42
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release area: compiler Issues related to `ngc`, Angular's template compiler labels Oct 2, 2023
@ngbot ngbot bot added this to the Backlog milestone Oct 2, 2023
@crisbeto crisbeto modified the milestones: Backlog, v17-candidates Oct 2, 2023
@ngbot ngbot bot modified the milestones: v17-candidates, Backlog Oct 2, 2023
@crisbeto crisbeto marked this pull request as ready for review October 2, 2023 12:42
@crisbeto crisbeto changed the title Linker fixes to handle Linker fixes to handle @ syntax Oct 2, 2023
@@ -120,6 +120,48 @@ describe('FileLinker', () => {
});
});

describe('block syntax support', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Context for these tests: I couldn't find a better place to test the linker with different version strings.

@crisbeto crisbeto requested a review from alxhub October 2, 2023 16:33
Adds some logic to enable parsing of block syntax in the linker. Note that the syntax is only enabled on code compiled with Angular v17 or later.
Increases the `minVersion` of component declarations that use bloks to v17 in order to indicate to users that they need to update if the library they're using is on the new syntax, while preserving backwards compatibility for libraries that do not use the syntax.
@crisbeto crisbeto removed the request for review from alxhub October 2, 2023 20:56
@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 Oct 2, 2023
@crisbeto crisbeto modified the milestones: Backlog, v17-candidates Oct 3, 2023
crisbeto added a commit to crisbeto/angular that referenced this pull request Oct 3, 2023
Enables the new `@` block syntax by default by removing the `enabledBlockTypes` flags. There are still some internal flags that allow special use cases to opt out of the block syntax, like during XML parsing and when compiling older libraries (see angular#51979).
crisbeto added a commit to crisbeto/angular that referenced this pull request Oct 3, 2023
Enables the new `@` block syntax by default by removing the `enabledBlockTypes` flags. There are still some internal flags that allow special use cases to opt out of the block syntax, like during XML parsing and when compiling older libraries (see angular#51979).
crisbeto added a commit to crisbeto/angular that referenced this pull request Oct 3, 2023
Enables the new `@` block syntax by default by removing the `enabledBlockTypes` flags. There are still some internal flags that allow special use cases to opt out of the block syntax, like during XML parsing and when compiling older libraries (see angular#51979).
crisbeto added a commit to crisbeto/angular that referenced this pull request Oct 3, 2023
Enables the new `@` block syntax by default by removing the `enabledBlockTypes` flags. There are still some internal flags that allow special use cases to opt out of the block syntax, like during XML parsing and when compiling older libraries (see angular#51979).
@alxhub
Copy link
Member

alxhub commented Oct 3, 2023

This PR was merged into the repository by commit 1beef49.

@alxhub alxhub closed this in 9acd2ac Oct 3, 2023
alxhub pushed a commit that referenced this pull request Oct 3, 2023
…51979)

Increases the `minVersion` of component declarations that use bloks to v17 in order to indicate to users that they need to update if the library they're using is on the new syntax, while preserving backwards compatibility for libraries that do not use the syntax.

PR Close #51979
crisbeto added a commit to crisbeto/angular that referenced this pull request Oct 3, 2023
Enables the new `@` block syntax by default by removing the `enabledBlockTypes` flags. There are still some internal flags that allow special use cases to opt out of the block syntax, like during XML parsing and when compiling older libraries (see angular#51979).
crisbeto added a commit to crisbeto/angular that referenced this pull request Oct 3, 2023
Enables the new `@` block syntax by default by removing the `enabledBlockTypes` flags. There are still some internal flags that allow special use cases to opt out of the block syntax, like during XML parsing and when compiling older libraries (see angular#51979).
alxhub pushed a commit that referenced this pull request Oct 3, 2023
Enables the new `@` block syntax by default by removing the `enabledBlockTypes` flags. There are still some internal flags that allow special use cases to opt out of the block syntax, like during XML parsing and when compiling older libraries (see #51979).

PR Close #51994
@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 Nov 3, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
Adds some logic to enable parsing of block syntax in the linker. Note that the syntax is only enabled on code compiled with Angular v17 or later.

PR Close angular#51979
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…ngular#51979)

Increases the `minVersion` of component declarations that use bloks to v17 in order to indicate to users that they need to update if the library they're using is on the new syntax, while preserving backwards compatibility for libraries that do not use the syntax.

PR Close angular#51979
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: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants