Skip to content

refactor(compiler): some small compiler refactorings - #43129

Closed
petebacondarwin wants to merge 7 commits into
angular:masterfrom
petebacondarwin:compiler-refactorings
Closed

petebacondarwin wants to merge 7 commits into
angular:masterfrom
petebacondarwin:compiler-refactorings

Conversation

@petebacondarwin

Copy link
Copy Markdown
Contributor

These commits were extracted from the reverted #42062 PR since they do not change any behaviour.
This PR let's us land those commits now, and will make the reworking of #42062 simpler.

This import is not used in the file, so can be removed.
The compliance tests can check source-map segments against expectations
encoded into the expectation files. Previously, the encoding of the expected
segment was only delimited by whitespace, but this made it difficult to identify
segments that started or ended with whitespace.

Now these segment expectations are wrapped in double-quotes which makes
it easier to read and understand the expectation files.
This commit removes 9 cycles in the dependency graph of the compiler code.
This function is general purpose and by moving it into the
`chars.ts` file along with similar helpers, it can be reused
in the lexer, for instance.
This is a simple tidy up commit to move to the more specific `===`
comparison operator in the HTML lexer/parser.
… interpolations

Such interpolations turned up during internal testing at Google, so this
commit adds a test to prevent regressions.
…butes

This tests a scenario that was failing in an internal project.
@pullapprove
pullapprove Bot requested a review from JoostK August 12, 2021 10:50
@petebacondarwin
petebacondarwin requested review from AndrewKushnir and removed request for JoostK August 12, 2021 10:50
@google-cla google-cla Bot added the cla: yes label Aug 12, 2021
@petebacondarwin petebacondarwin added action: presubmit The PR is in need of a google3 presubmit 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 Aug 12, 2021
@AndrewKushnir AndrewKushnir added the area: compiler Issues related to `ngc`, Angular's template compiler label Aug 12, 2021
@ngbot ngbot Bot added this to the Backlog milestone Aug 12, 2021
@AndrewKushnir

Copy link
Copy Markdown
Contributor

Presubmit.

@AndrewKushnir

Copy link
Copy Markdown
Contributor

Global Presubmit.

@AndrewKushnir AndrewKushnir removed the action: presubmit The PR is in need of a google3 presubmit label Aug 16, 2021
@AndrewKushnir

Copy link
Copy Markdown
Contributor

@petebacondarwin FYI presubmits went well + I also verified that there are no changes in the extracted message IDs for the app that was affected previously by #42062.

@AndrewKushnir
AndrewKushnir removed their request for review August 16, 2021 19:48
@AndrewKushnir AndrewKushnir removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Aug 16, 2021
@AndrewKushnir

Copy link
Copy Markdown
Contributor

Note to Caretaker: since this is a part of the PR that was reverted earlier (due to g3 issues), please sync this PR into g3 as a separate change to minimize the risks and simplify the rollback if needed.

@petebacondarwin petebacondarwin added the action: merge The PR is ready for merge by the caretaker label Aug 16, 2021
dylhunn pushed a commit that referenced this pull request Aug 16, 2021
This import is not used in the file, so can be removed.

PR Close #43129
dylhunn pushed a commit that referenced this pull request Aug 16, 2021
…ts (#43129)

The compliance tests can check source-map segments against expectations
encoded into the expectation files. Previously, the encoding of the expected
segment was only delimited by whitespace, but this made it difficult to identify
segments that started or ended with whitespace.

Now these segment expectations are wrapped in double-quotes which makes
it easier to read and understand the expectation files.

PR Close #43129
dylhunn pushed a commit that referenced this pull request Aug 16, 2021
This commit removes 9 cycles in the dependency graph of the compiler code.

PR Close #43129
dylhunn pushed a commit that referenced this pull request Aug 16, 2021
This function is general purpose and by moving it into the
`chars.ts` file along with similar helpers, it can be reused
in the lexer, for instance.

PR Close #43129
dylhunn pushed a commit that referenced this pull request Aug 16, 2021
This is a simple tidy up commit to move to the more specific `===`
comparison operator in the HTML lexer/parser.

PR Close #43129
dylhunn pushed a commit that referenced this pull request Aug 16, 2021
… interpolations (#43129)

Such interpolations turned up during internal testing at Google, so this
commit adds a test to prevent regressions.

PR Close #43129
dylhunn pushed a commit that referenced this pull request Aug 16, 2021
…butes (#43129)

This tests a scenario that was failing in an internal project.

PR Close #43129
@dylhunn dylhunn closed this in c5250ae Aug 16, 2021
dylhunn pushed a commit that referenced this pull request Aug 16, 2021
…ts (#43129)

The compliance tests can check source-map segments against expectations
encoded into the expectation files. Previously, the encoding of the expected
segment was only delimited by whitespace, but this made it difficult to identify
segments that started or ended with whitespace.

Now these segment expectations are wrapped in double-quotes which makes
it easier to read and understand the expectation files.

PR Close #43129
dylhunn pushed a commit that referenced this pull request Aug 16, 2021
This commit removes 9 cycles in the dependency graph of the compiler code.

PR Close #43129
dylhunn pushed a commit that referenced this pull request Aug 16, 2021
This function is general purpose and by moving it into the
`chars.ts` file along with similar helpers, it can be reused
in the lexer, for instance.

PR Close #43129
dylhunn pushed a commit that referenced this pull request Aug 16, 2021
This is a simple tidy up commit to move to the more specific `===`
comparison operator in the HTML lexer/parser.

PR Close #43129
dylhunn pushed a commit that referenced this pull request Aug 16, 2021
… interpolations (#43129)

Such interpolations turned up during internal testing at Google, so this
commit adds a test to prevent regressions.

PR Close #43129
dylhunn pushed a commit that referenced this pull request Aug 16, 2021
…butes (#43129)

This tests a scenario that was failing in an internal project.

PR Close #43129
@petebacondarwin
petebacondarwin deleted the compiler-refactorings branch August 17, 2021 15:09
@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 Sep 17, 2021
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 cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants