Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NoWarn Is Not A Valid Choice for -Wunused Compiler Error

Tags:

scala

sbt

I added sbt-toplecat to my repo and I fixed most of the errors with my code but there is one issue I'm not sure how to fix:

'nowarn' is not a valid choice for '-Wunused'

I am running Scala 2.13. How do I resolve this error?

like image 792
Mojo Avatar asked Jun 08 '20 10:06

Mojo


1 Answers

nowarn is available from Scala 2.13.2. I am guessing you updated to sbt-tpolecat 0.1.12, which added this option in Add -Wunused:nowarn to 2.13 builds. #21

addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.12")

however kept your Scala version at 2.13.1 or 2.13.0

scalaVersion := "2.13.1"

To fix the issue try updating Scala version to 2.13.2

scalaVersion := "2.13.2"
like image 112
Mario Galic Avatar answered Nov 06 '22 08:11

Mario Galic