Closed dvgica closed 2 years ago
ThisBuild / scalaVersion := scala212Version in build.sbt
With projectmatrix global Scala versions are not really something you should use (as the projects no longer have "crossScalaVersions" set, and you can't use stateful +
or ++
to override scalaversions).
I would recommend removing that settings
The second issue is a somewhat easier to understand (albeit the error message is not fantastic):
[error] no rows were found in project matching ProjectRow(true, List(PlatformAxis(jvm,JVM,jvm), ScalaVersionAxis(2.12.12,2.12))): List(ProjectRow(true, List(PlatformAxis(jvm,JVM,jvm), ScalaVersionAxis(2.13.8,2.13))))
It means that in your build you have a projectMatrix which is only defined for Scala 2.13, but it depends on another projectMatrix that is only defined for 2.12. (or vice versa, basically a mismatch of scala versions)
Which means the plugin cannot reconcile the dependencies, and it crashes.
It might also be the global Scala setting.
I'd recommend removing the global scalaVersion
first (as it has no effect on how projectmatrix works), and then checking your inter-project dependencies.
Thanks for the reply @keynmol !
With projectmatrix global Scala versions are not really something you should use
Makes sense, but I will note that the README does include them - I was following that, but perhaps I misunderstood?
It means that in your build you have a projectMatrix which is only defined for Scala 2.13, but it depends on another projectMatrix that is only defined for 2.12.
I can't for the life of me find where I might have this mismatch. What is further confusing is the reference to project
, which is dynamic. Doesn't that denote the meta-build? I don't actually have a project called project
in my top-level build.
At any rate... I reverted to crossScalaVersions
and got that to work (or rather my colleague did). I'll close out this issue since it's still probably an error on my end.
I appreciate the guidance nonetheless.
Hi, apologies for the probably stupid "issue", but I've run rather stuck.
I have a fairly complex (17 sub-projects) build with a mix of Scala 2.12 and 2.13. Most sub-projects are 2.12, and I've set
ThisBuild / scalaVersion := scala212Version
inbuild.sbt
. There are a number of plugins already loaded as well. SBT version is 1.5.8 andsbt-projectmatrix
is0.9.0
(I tried with 0.8.0 as well).After converting all sub-projects to use
projectMatrix
, I'm unable to load the project. Any pointers anyone can give would be much appreciated. Here's the full error log:The best I can tell is that this has something to do with the meta-build? The meta-build contains a
build.sbt
like:and an
AutoPlugin
. FWIW I tried removing them temporarily, and that didn't seem to help.