Ignoring certain Scala 2.13 compiler options for build to succeed
05:29 23 Dec 2024

I have a Scala sbt project where I'm using the sbt-tpolecat plugin:

// scalac options for the enlightened @see https://github.com/typelevel/sbt-tpolecat
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2")

When I compile against my project using

sbt clean compile

I get this wierd warning showing up as error:

[info] compiling 41 Scala sources and 2 Java sources to /Users/user/Projects/Private/scala-projects/open-electrons/cpo-platform/ocpp-gateway-server/target/scala-2.13/classes ...
[error] bad option: '-no-link-warnings'
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 2 s, completed Dec 23, 2024, 11:37:46 AM

How can I suppress this error using the sbt-tpolecat plugin? Is there any other better way to do this?

EDIT: I tried to suppress it by adding this to my build.sbt:

Compile / doc / scalacOptions += "-no-link-warnings"

But this has no effect and the build continues to fail.

scala sbt