sbt-typelevel icon indicating copy to clipboard operation
sbt-typelevel copied to clipboard

scalacOptions don't work properly when combined with sbt-projectmatrix

Open etspaceman opened this issue 2 years ago • 2 comments

Per a discussion with @armanbilge - we noticed that the crossScalaVersions will only display 1 scalaVersion when combined with the sbt-projectMatrix plugin. This means that this conditional is met, which is incorrect for projects that also contain Scala 2 cross builds:

https://github.com/typelevel/sbt-typelevel/blob/series/0.4/settings/src/main/scala/org/typelevel/sbt/TypelevelSettingsPlugin.scala#L153

etspaceman avatar Feb 05 '23 02:02 etspaceman

Could you elaborate a bit more please on how to reproduce this?

satorg avatar Feb 05 '23 03:02 satorg

@satorg here's a reproducer: https://github.com/armanbilge/scala-native-config-brew/blob/656793d295782ca893e6afd500c347161d1e61b1/build.sbt

If you open that project in sbt and do show core3/scalacOptions, you will see it is setting compiler flags that don't make sense for code that is cross-compiling with Scala 2 (e.g. the underscore mode for kind-projector).

armanbilge avatar Feb 05 '23 03:02 armanbilge