-
Notifications
You must be signed in to change notification settings - Fork 36
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
consider not adding antlr4 generated files to managedSourceDirectories
#17
Comments
@mpollmeier Thanks for your comment. I think it's okay to remove |
Interesting how everything revolves around intellij on this issue. |
Is there a workaround for this? Can I just set javaSource in Antlr4 such that modern IntelliJ with the built-in SBT support will play nice? |
I have found that
helps, but I still need to run Is there a better way to do this? |
The recommendation is now against using |
It looks to me like adding the antlr specific sources to sbt's
managedSourceDirectories
(https://github.com/ihji/sbt-antlr4/blob/3d36e6c/src/main/scala/com/simplytyped/Antlr4Plugin.scala#L80) isn't a good idea, since sbt already has the root directorysrc_managed
in the classpath (tested only with sbt 1.0.3). The resulting classpath contains the antlr generated sources twice then:src_managed
andsrc_managed/antlr4
.While sbt deals with that fine, Intellij compiles the classes twice and fails, complaining about "duplicate classes".
Changing this might be a can of worms though, and I haven't tested the zoo of different sbt versions and IDEs. Maybe it's best to just add a note in the readme? You probably know this topic better than me - what's your thoughts?
The text was updated successfully, but these errors were encountered: