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

OrganizeImports with coalesceToWildcardImportThreshold > 0 uses wildcard pattern "_" instead of "*" in Scala 3 #1894

Closed
longliveenduro opened this issue Nov 21, 2023 · 6 comments · Fixed by #1896

Comments

@longliveenduro
Copy link

longliveenduro commented Nov 21, 2023

I use coalesceToWildcardImportThreshold but the generated groups have the _ wildcard instead of the * wildcard of Scala 3 which I use in my project

@bjaglin
Copy link
Collaborator

bjaglin commented Nov 22, 2023

Syntax of wildcard is currently preserved (see this and this), so I assume you are referring to the wildcards generated by coalesceToWildcardImportThreshold, which you expect to be * in Scala 3 (and Scala 2 with -Xsource:3?), but _ otherwise?

@longliveenduro
Copy link
Author

longliveenduro commented Nov 22, 2023

@bjaglin Thanks for coming back to this. Yes you are right.

I use coalesceToWildcardImportThreshold but the generated groups have the _ wildcard instead of the * wildcard of Scala 3.

I have updated the desciption, thanks for the heads up.

@longliveenduro longliveenduro changed the title OrganizeImports uses wildcard pattern "_" instead of asteriks in Scala 3 OrganizeImports with coalesceToWildcardImportThreshold > 0 uses wildcard pattern "_" instead of asteriks in Scala 3 Nov 22, 2023
@longliveenduro longliveenduro changed the title OrganizeImports with coalesceToWildcardImportThreshold > 0 uses wildcard pattern "_" instead of asteriks in Scala 3 OrganizeImports with coalesceToWildcardImportThreshold > 0 uses wildcard pattern "_" instead of "*" in Scala 3 Nov 22, 2023
@bjaglin
Copy link
Collaborator

bjaglin commented Jan 20, 2024

@longliveenduro I am about to introduce a new configuration flag in #1896 to address that, let me know what you think

@longliveenduro
Copy link
Author

@bjaglin That is a big PR. Where is the relevant part for this issue?

@bjaglin
Copy link
Collaborator

bjaglin commented Jan 22, 2024

@longliveenduro The PR is the fix for this issue, nothing more. I understand the implementation is a bit technical, so I was only asking for your feedback on the UI - namely what's documented in the first markdown file appearing in the diff.

@longliveenduro
Copy link
Author

@bjaglin Thanks for your reply. That would do the job for me. LGTM. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants