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

[BUGFIX] Convert component names after symbol allocation #1253

Merged

Conversation

pzuraq
Copy link
Member

@pzuraq pzuraq commented Jan 12, 2021

Currently component names are converted via the customizeComponentName
option prior to symbol allocation. This means that a component can end
up conflicting with an existing local variable, even though they
logically represent different things. This PR ensures that customization
happens after symbol allocation, as a final step within the symbol table
itself. This also means that the correct value is passed through the
rest of the AST and transformations, so it cannot conflict with keywords
as well as other language constructs.

Fixes: emberjs/ember.js#19334

@rwjblue
Copy link
Member

rwjblue commented Jan 12, 2021

Can you cross link the related ember issue for easier future archeology 😜

Currently component names are converted via the `customizeComponentName`
option prior to symbol allocation. This means that a component can end
up conflicting with an existing local variable, even though they
logically represent different things. This PR ensures that customization
happens after symbol allocation, as a final step within the symbol table
itself. This also means that the correct value is passed through the
rest of the AST and transformations, so it cannot conflict with keywords
as well as other language constructs.
@rwjblue rwjblue added the bug label Jan 12, 2021
@rwjblue
Copy link
Member

rwjblue commented Jan 12, 2021

Still need to cross link the Ember issue in the description.

@rwjblue rwjblue merged commit 89865a4 into master Jan 12, 2021
@rwjblue rwjblue deleted the bugfix-convert-component-names-after-symbol-allocation branch January 12, 2021 21:38
rwjblue added a commit to emberjs/ember.js that referenced this pull request Jan 21, 2021
rwjblue added a commit to emberjs/ember.js that referenced this pull request Jan 21, 2021
rwjblue added a commit to emberjs/ember.js that referenced this pull request Jan 22, 2021
kategengler pushed a commit to emberjs/ember.js that referenced this pull request Jan 25, 2021
@jamescdavis jamescdavis mentioned this pull request Jan 26, 2021
sly7-7 pushed a commit to sly7-7/ember.js that referenced this pull request Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug beta] angle bracket invocation incorrectly shadowed by local variable with different case
2 participants