You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When cloning the latest version of scala-pet-store and changing build.sbt to only compile to Scala 2.13.6 (i.e., changing crossScalaVersions := Seq("2.12.14", "2.13.6") to scalaVersion := "2.13.6"), sbt compile gives the following error about the higher kinded type for Cats Effect Sync being unused:
[info] compiling 36 Scala sources to <LOCAL_PATH_REDACTED>/scala-pet-store/target/scala-2.13/classes ...
[error] <LOCAL_PATH_REDACTED>/scala-pet-store/src/main/scala/io/github/pauljamescleary/petstore/infrastructure/endpoint/OrderEndpoints.scala:19:26: parameter value evidence$2 in class OrderEndpoints is never used
[error] class OrderEndpoints[F[_]: Sync, Auth: JWTMacAlgo] extends Http4sDsl[F] {
[error] ^
[error] <LOCAL_PATH_REDACTED>/scala-pet-store/src/main/scala/io/github/pauljamescleary/petstore/infrastructure/endpoint/PetEndpoints.scala:21:24: parameter value evidence$2 in class PetEndpoints is never used
[error] class PetEndpoints[F[_]: Sync, Auth: JWTMacAlgo] extends Http4sDsl[F] {
[error] ^
[error] <LOCAL_PATH_REDACTED>/scala-pet-store/src/main/scala/io/github/pauljamescleary/petstore/infrastructure/endpoint/UserEndpoints.scala:21:25: parameter value evidence$2 in class UserEndpoints is never used
[error] class UserEndpoints[F[_]: Sync, A, Auth: JWTMacAlgo] extends Http4sDsl[F] {
[error] ^
[error] three errors found
[error] (Compile / compileIncremental) Compilation failed
This could be an upstream issue with sbt-tpolecat or some kind of incompatibility between the Scala compiler and/or Sync and/or higher kinded types. Or I could be interpreting this incorrectly. Anyway, the quick and dirty solution for anyone else having this problem is to disable the sbt-tpolecat plugin (comment it out in project/plugins.sbt) and declare your own scalac options in build.sbt.
The text was updated successfully, but these errors were encountered:
theoilie
changed the title
Scala 2.13.6 Unused False Positive
Scala 2.13.6 Unused Parameter Value for Higher Kinded Type
Jun 29, 2021
When cloning the latest version of scala-pet-store and changing build.sbt to only compile to Scala 2.13.6 (i.e., changing
crossScalaVersions := Seq("2.12.14", "2.13.6")
toscalaVersion := "2.13.6"
),sbt compile
gives the following error about the higher kinded type for Cats Effect Sync being unused:This could be an upstream issue with sbt-tpolecat or some kind of incompatibility between the Scala compiler and/or Sync and/or higher kinded types. Or I could be interpreting this incorrectly. Anyway, the quick and dirty solution for anyone else having this problem is to disable the sbt-tpolecat plugin (comment it out in project/plugins.sbt) and declare your own scalac options in build.sbt.
The text was updated successfully, but these errors were encountered: