Skip to content

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

Closed
ayazhafiz wants to merge 2 commits into
angular:masterfrom
ayazhafiz:fix/template-binding-abs-span
Closed

ayazhafiz wants to merge 2 commits into
angular:masterfrom
ayazhafiz:fix/template-binding-abs-span

Conversation

@ayazhafiz

@ayazhafiz ayazhafiz commented Oct 15, 2019 •

Copy link
Copy Markdown
Contributor

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 review from a team, alxhub, kara and kyliau October 15, 2019 22:08
@ayazhafiz ayazhafiz self-assigned this Oct 15, 2019
@ngbot ngbot Bot modified the milestone: needsTriage Oct 15, 2019

@kara kara left a comment

Copy link
Copy Markdown
Contributor

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

kyliau commented Oct 17, 2019

Copy link
Copy Markdown
Contributor

@matsko matsko closed this in fd4fed1 Oct 17, 2019
@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 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.

7 participants