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

Import alias flagged as unused import #526

Closed
gabrielittner opened this issue Jul 15, 2019 · 9 comments
Closed

Import alias flagged as unused import #526

gabrielittner opened this issue Jul 15, 2019 · 9 comments

Comments

@gabrielittner
Copy link
Contributor

Something like import a.b.c.MyClass as SomeOtherName is marked as an unused import after upgrading to 0.34.0.

@shashachu
Copy link
Contributor

@gabrielittner this is a regression in 0.34.0?

@gabrielittner
Copy link
Contributor Author

Yes. 0.33 was working without this issue on the same code

@shashachu
Copy link
Contributor

@gabrielittner could you provide a more complete code snippet? it looks like the rule attempts to handle import aliases (and tests that have import aliases are passing), so I want to understand what broke.

@gabrielittner
Copy link
Contributor Author

I will try to put together something reproducible tomorrow

@shashachu
Copy link
Contributor

@gabrielittner I'm going to revert the changes to the unused imports rule that we made in 0.34.0, and I suspect it will fix your issue, but when you have a repro case let me know and I can test.

@shashachu
Copy link
Contributor

@gabrielittner if you can provide your repro case, #535 is attempting to fix the regressions in 0.34.0, so we want to make sure your case is covered.

@k3muri84
Copy link

k3muri84 commented Jul 19, 2019

i also have this case.
import com.product....JavaClass as AnotherName in a Kotlin unit test in our case
will be removed with 0.34 and worked with 0.33.
I might also try to put something together in case @gabrielittner doesn't have something already.

@sowmyav24
Copy link
Contributor

Similar example was provided in the PR review. It has been added as a test case and fixed now.

@romtsn
Copy link
Collaborator

romtsn commented Jun 21, 2020

Fixed via #535

@romtsn romtsn closed this as completed Jun 21, 2020
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

No branches or pull requests

5 participants