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

gen-idea can't always fix imports when changing libraries #301

Open
ShardPhoenix opened this issue Apr 28, 2014 · 2 comments
Open

gen-idea can't always fix imports when changing libraries #301

ShardPhoenix opened this issue Apr 28, 2014 · 2 comments

Comments

@ShardPhoenix
Copy link

I'm using sbt-idea 1.6.0. When adding new libaries or changing library versions, sometimes I'll naturally get "cannot find import" errors in IDEA even when it works on the command line. Usually, running gen-idea in sbt will fix this. However, sometimes this won't work no matter how many times I run gen-idea (or restart IDEA) - I'll keep getting the not-found errors in IDEA. I can only fix it by deleting the project's .iml file and running gen-idea again. May be related to switching between different versions of the same library, but I'm not 100% on that.

@SheliakLyr
Copy link
Contributor

I may have encountered the same bug. Whenever I change libraries, after gen-idea idea project becomes corrupted (some libraries are not visible / duplicated and imports are not resolved).

I found a workaround that does not require you to remove imls. Try this:

  • Close project
  • run sbt gen-idea and wait until it finishes
  • Open project

Works every time. Of course it is still very irritating... My only guess so far is that idea and gen-idea write to imls at the same time, which results in corrupted files.

@OlegYch
Copy link

OlegYch commented May 26, 2014

could it be this http://youtrack.jetbrains.com/issue/IDEA-121781 ?

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

3 participants