-
Notifications
You must be signed in to change notification settings - Fork 503
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: deconflict for duplicate canonical names #365
fix: deconflict for duplicate canonical names #365
Conversation
} else { | ||
Cow::Owned(format!("{}${}", original_name, *count).into()) | ||
}; | ||
while self.used_canonical_names.contains(&canonical_name) { | ||
*count += 1; | ||
canonical_name = Cow::Owned(format!("{}${}", original_name, *count).into()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix can be work, but it isn't efficient at some cases. If the scope has a/a$1/a$2
symbols declared. The fix will caused a/a$1/a$2
every symbol need rename. Please read the esbuild implementiontion, it will only rename once a
-> a$3
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my point of view, it's efficient enough. Feel free to open a team meeting for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember we need to follow esbuild implementation, it will reduce our different ideas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here has lots of issue need to merge, I just approved it. I open a new issue to track this #389.
146e192
to
454e905
Compare
Description
Fixes #364
Test Plan