Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading compilation errors when using no root src folder #81

Open
struong opened this issue Jun 9, 2023 · 1 comment
Open

Misleading compilation errors when using no root src folder #81

struong opened this issue Jun 9, 2023 · 1 comment

Comments

@struong
Copy link

struong commented Jun 9, 2023

I am trying out projectmatrix for a CE2->CE3 upgrade. When the src folder is under root sbt-projectmatrix will fail to compile.

To reproduce:
Clone https://github.com/lrodero/cats-effect-tutorial, add the plugin: addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.0")

Change build.sbt to:

val scala213 = "2.13.5"
val scala212 = "2.12.12"
val supportedScalaVersions = Seq(scala212, scala213)

lazy val main =
  projectMatrix
    .in(file("."))
    .configs(IntegrationTest)
    .settings(libraryDependencies += "org.typelevel" %% "cats-effect" % "2.2.0")
    .jvmPlatform(scalaVersions = supportedScalaVersions)

sbt clean compile will result in:

[error] 100 errors found
[warn] there were 35 feature warnings; re-run with -feature for details
[warn] one warning found
[error] (Compile / compileIncremental) Compilation failed

Oddly you can run the compile steps individually and they will work:

main / compile -> works
main2_12 / Compile / compile -> works
Compile / compileIncremental -> breaks

The workaround is easy enough, I just moved the src folder into another directory e.g. app and changes the build.sbt with:

  projectMatrix
    .in(file("app"))
@tarmath
Copy link

tarmath commented Feb 2, 2024

Thank you for your report.

I just ran into this myself and was pretty confused for a while, and after finding this and moving the sources everything worked great...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants