silencer icon indicating copy to clipboard operation
silencer copied to clipboard

Install instructions are not universal

Open dhorkin opened this issue 5 years ago • 2 comments
trafficstars

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-plugin was enabled but @silent annotation was not found on classpath - have you added silencer-lib as 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: SBT configuration graph

In fact, replacing % Provided with % Compile seems to work. I imagine that's potentially better than removing the specifier entirely?

dhorkin avatar Jun 04 '20 22:06 dhorkin

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.

ghik avatar Jul 01 '20 09:07 ghik

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.

solarmosaic-kflorence avatar Jan 13 '21 02:01 solarmosaic-kflorence