Skip to content

fix(migrations): avoid conflicts with some greek letters in control flow migration#55113

Closed
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:55085/control-flow-greek-characters
Closed

fix(migrations): avoid conflicts with some greek letters in control flow migration#55113
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:55085/control-flow-greek-characters

Conversation

@crisbeto
Copy link
Member

@crisbeto crisbeto commented Mar 29, 2024

The control flow migration was using a couple of Greek letters as placeholders. This ended up conflicting with templates authored in Greek.

These changes use a more obscure placeholder to make conflicts less likely. It also moves the placeholder generation to a centralized function so it's easier to make changes if we decide to update the pattern again.

Fixes #55085.

…low migration

The control flow migration was using a couple of Greek letters as placeholders. This ended up conflicting with templates authored in Greek.

These changes use a more obscure placeholder to make conflicts less likely. It also moves the placeholder generation to a centralized function so it's easier to make changes if we decide to update the pattern again.

Fixes angular#55085.
@crisbeto crisbeto added 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 area: migrations Issues related to `ng update`/`ng generate` migrations labels Mar 29, 2024
@crisbeto crisbeto requested a review from jessicajaniuk March 29, 2024 08:02
@ngbot ngbot bot added this to the Backlog milestone Mar 29, 2024
export function getPlaceholder(
value: string, kind: PlaceholderKind = PlaceholderKind.Default): string {
const name = `<<<ɵɵngControlFlowMigration_${kind}ɵɵ>>>`;
return `___${name}${value}${name}___`;
Copy link
Member Author

Choose a reason for hiding this comment

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

Technically things can still break if somebody is wrapping their content in ___<<<ɵɵngControlFlowMigration_0ɵɵ>>><<<ɵɵngControlFlowMigration_0ɵɵ>>>___ but hopefully it's a bit less likely than before.

@crisbeto crisbeto added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Mar 29, 2024
@crisbeto
Copy link
Member Author

Caretaker note: the presubmit is failing because of one unrelated flaky target.

@XhmikosR
Copy link

XhmikosR commented Mar 29, 2024

Nice, thanks for the fast response to the issue! I now wish had reported it sooner 😊

Copy link
Contributor

@jessicajaniuk jessicajaniuk left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for fixing this, @crisbeto

@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 Mar 29, 2024
atscott pushed a commit that referenced this pull request Mar 29, 2024
…low migration (#55113)

The control flow migration was using a couple of Greek letters as placeholders. This ended up conflicting with templates authored in Greek.

These changes use a more obscure placeholder to make conflicts less likely. It also moves the placeholder generation to a centralized function so it's easier to make changes if we decide to update the pattern again.

Fixes #55085.

PR Close #55113
@atscott
Copy link
Contributor

atscott commented Mar 29, 2024

This PR was merged into the repository by commit 0c20c40.

@atscott atscott closed this in 0c20c40 Mar 29, 2024
jessicajaniuk pushed a commit to jessicajaniuk/angular that referenced this pull request Mar 29, 2024
…low migration (angular#55113)

The control flow migration was using a couple of Greek letters as placeholders. This ended up conflicting with templates authored in Greek.

These changes use a more obscure placeholder to make conflicts less likely. It also moves the placeholder generation to a centralized function so it's easier to make changes if we decide to update the pattern again.

Fixes angular#55085.

PR Close angular#55113
@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 Apr 29, 2024
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: migrations Issues related to `ng update`/`ng generate` migrations merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@angular/core:control-flow migration breaks with Greek characters

4 participants