silencer
silencer copied to clipboard
Install instructions are not universal
The docs say to add this to build.sbt:
libraryDependencies ++= Seq(
compilerPlugin("com.github.ghik" % "silencer-plugin" % silencerVersion cross CrossVersion.full),
"com.github.ghik" % "silencer-lib" % silencerVersion % Provided cross CrossVersion.full
)
This didn't work for me. I kept getting this:
[error]
silencer-pluginwas enabled but @silent annotation was not found on classpath - have you addedsilencer-libas a library dependency?
It turns out my issue was the % Provided in there. Remove that, and everything works. I don't know exactly what part of my build configuration is the issue, but that solved it.
I'm suspect my issue was related to this image: 
In fact, replacing % Provided with % Compile seems to work. I imagine that's potentially better than removing the specifier entirely?
I think % Compile is the same thing as no specifier at all. Provided was used because silencer is a compile-time only dependency. It's weird that it wasn't on compile classpath - Provided dependencies should definitely be there.
I have also noticed this issue, especially when running tests. The most recent time I have seen this, I have closed the project, removed the IntelliJ project files (.idea and .bsp) and re-imported the project, and then it worked. So at least sometimes this is due to an IntelliJ caching issue.