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

Remove star import of the packages, which contain conflicting declarations #4258

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

mvicsokolova
Copy link
Contributor

Star imports of java.util.concurrent.atomic.* and kotlin.concurrent.* will lead to the compilation error: once Atomic classes are introduced in kotlin.concurrent package, they will conflict with Java atomic classes, which have the same names.

…tions.

Star imports of `java.util.concurrent.atomic.*` and `kotlin.concurrent.*` will lead to the compilation error: once Atomic classes are introduced in `kotlin.concurrent` package, they will conflict with Java atomic classes, which have the same names.
@mvicsokolova
Copy link
Contributor Author

And I'll need this commit in kotlin-community/dev branches too, when we merge it)

Copy link
Collaborator

@dkhalanskyjb dkhalanskyjb left a comment

Choose a reason for hiding this comment

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

git grep -lF 'kotlin.concurrent.*' | xargs git grep -lF 'java.util.concurrent.atomic.*' confirms that only this file has both of the star imports.

Normally, I'd ask for a comment near the import (so as to avoid accidentally reverting the change), but in this case, the stakes don't seem high: in the worst case, the CI will fail, but we'll likely upgrade to the new atomics before we touch the file for any reason, so even that is far-fetched.

We can merge this once the CI passes.

@dkhalanskyjb dkhalanskyjb merged commit fa3076f into develop Oct 24, 2024
1 check failed
tbogdanova pushed a commit that referenced this pull request Oct 28, 2024
…tions. (#4258)

Star imports of `java.util.concurrent.atomic.*` and `kotlin.concurrent.*` will lead to the compilation error: once Atomic classes are introduced in `kotlin.concurrent` package, they will conflict with Java atomic classes, which have the same names.
tbogdanova pushed a commit that referenced this pull request Oct 28, 2024
…tions. (#4258)

Star imports of `java.util.concurrent.atomic.*` and `kotlin.concurrent.*` will lead to the compilation error: once Atomic classes are introduced in `kotlin.concurrent` package, they will conflict with Java atomic classes, which have the same names.
tbogdanova pushed a commit that referenced this pull request Oct 28, 2024
…tions. (#4258)

Star imports of `java.util.concurrent.atomic.*` and `kotlin.concurrent.*` will lead to the compilation error: once Atomic classes are introduced in `kotlin.concurrent` package, they will conflict with Java atomic classes, which have the same names.
tbogdanova pushed a commit that referenced this pull request Oct 28, 2024
…tions. (#4258)

Star imports of `java.util.concurrent.atomic.*` and `kotlin.concurrent.*` will lead to the compilation error: once Atomic classes are introduced in `kotlin.concurrent` package, they will conflict with Java atomic classes, which have the same names.
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 this pull request may close these issues.

2 participants