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

fix(compiler): absolute source span for template attribute expressions #33189

Closed

Conversation

ayazhafiz
Copy link
Member

@ayazhafiz ayazhafiz commented Oct 15, 2019

Prior to this commit, the absolute spans (relative to template source
file rather than the start of an expression) of expressions in a
template attribute like *ngIf were generated incorrectly, equating to
the relative spans.
This fixes the bug by passing an absoluteOffset parameter when parsing
template bindings.

Through some levels of indirection, this is required for the Language
Service to support text replacement in #33091.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • Yes
  • No

Prior to this commit, the absolute spans (relative to template source
file rather than the start of an expression) of expressions in a
template attribute like `*ngIf` were generated incorrectly, equating to
the relative spans.
This fixes the bug by passing an `absoluteOffset` parameter when parsing
template bindings.

Through some levels of indirection, this is required for the Language
Service to support text replacement in
angular#33091.
@ayazhafiz ayazhafiz added type: bug/fix target: major This PR is targeted for the next major release area: compiler Issues related to `ngc`, Angular's template compiler labels Oct 15, 2019
@ayazhafiz ayazhafiz requested a review from a team as a code owner October 15, 2019 22:08
@ayazhafiz ayazhafiz self-assigned this Oct 15, 2019
@ngbot ngbot bot modified the milestone: needsTriage Oct 15, 2019
Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

LGTM

@kara kara added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Oct 17, 2019
@kara kara removed the request for review from alxhub October 17, 2019 21:42
@kara kara removed the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Oct 17, 2019
@matsko matsko added the action: presubmit The PR is in need of a google3 presubmit label Oct 17, 2019
@kyliau kyliau removed the action: presubmit The PR is in need of a google3 presubmit label Oct 17, 2019
@kyliau
Copy link
Contributor

kyliau commented Oct 17, 2019

@matsko matsko closed this in fd4fed1 Oct 17, 2019
ODAVING pushed a commit to ODAVING/angular that referenced this pull request Oct 18, 2019
angular#33189)

Prior to this commit, the absolute spans (relative to template source
file rather than the start of an expression) of expressions in a
template attribute like `*ngIf` were generated incorrectly, equating to
the relative spans.
This fixes the bug by passing an `absoluteOffset` parameter when parsing
template bindings.

Through some levels of indirection, this is required for the Language
Service to support text replacement in
angular#33091.

PR Close angular#33189
AndrusGerman pushed a commit to AndrusGerman/angular that referenced this pull request Oct 22, 2019
angular#33189)

Prior to this commit, the absolute spans (relative to template source
file rather than the start of an expression) of expressions in a
template attribute like `*ngIf` were generated incorrectly, equating to
the relative spans.
This fixes the bug by passing an `absoluteOffset` parameter when parsing
template bindings.

Through some levels of indirection, this is required for the Language
Service to support text replacement in
angular#33091.

PR Close angular#33189
@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 17, 2019
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: major This PR is targeted for the next major release type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants