sbt-imported project: scalacOptions not updated?


I have more problems with the sbt-imported / auto-import projects.

I had, tentatively added the following flags to my build.sbt: -Xlint and -Xfatal-warnings. Now these produce a couple of stupid problems, for example I have a case where I have to have classes inside a package objects which for some unknown or illogic reason ( is disallowed. So I commented out these two flags again:

scalacOptions in ThisBuild ++= {
  // "-Xlint" -- produces problems with implicit objects and traits in package object
  // "-Xfatal-warnings" -- breaks for cross-scala-build and deprecations
  val xs
= Seq("-deprecation", "-unchecked", "-feature", "-encoding", "utf8", "-Xfuture")
  if (loggingEnabled || isSnapshot.value) xs else xs ++ Seq("-Xelide-below", "INFO")

But IntelliJ has those flags cached somewhere. I can't built my project any longer because I get the errors from the lint/fatal-warnings still. I tried refreshing the project, I closed and re-opened it. No luck.

So I think there is a bug with the plugin not synchronizing scalac flags properly. Once more I have to delete and recreate the .idea folder it seems :-(


Hi! Thanks for the report. This is known problem which, unfortunately, affects javac options too. There is related issue on Youtrack, you can upvote and watch its progress.

Permanently deleted user

I think the right one is this issue.


Please sign in to leave a comment.