Skip to content

Modules were resolved with conflicting cross-version suffixes #551

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

Open
apavlychev opened this issue Jan 16, 2025 · 2 comments
Open

Modules were resolved with conflicting cross-version suffixes #551

apavlychev opened this issue Jan 16, 2025 · 2 comments

Comments

@apavlychev
Copy link

apavlychev commented Jan 16, 2025

Hello, I have problem with a command migrateTypes module2 when module2 depends on module1 although migrateTypes module1 and migrateDependencies module2 are good:

[error] Modules were resolved with conflicting cross-version suffixes in ProjectRef(uri("file:/home/sirius/new-2/backend/"), "module2"):
[error]    org.typelevel:cats-effect-std _3, _2.13
[error]    eu.timepit:refined-pureconfig _3, _2.13
[error]    org.typelevel:otel4s-core-metrics _3, _2.13

My sbt is

lazy val module1 = project
  .in(file("common/module1"))
  .settings(commonSettings)
  .settings(
    name := "module1",
  )

lazy val module2 = project
  .in(file("common/module2"))
  .dependsOn(module1)
  .settings(commonSettings)
  .settings(
    name := "module2"
  )
@adpi2
Copy link
Member

adpi2 commented Jan 16, 2025

That probably means you don't have the same crossScalaVersions in module1 and module2. They should both have 2.13.x and 3.3.y.

@apavlychev
Copy link
Author

apavlychev commented Jan 16, 2025

@adpi2 thx, i have added the

crossScalaVersions := Seq("2.13.16", "3.3.4")

and project module2 +compile don't have compiler errors! (exists target folders scala-2.13.16 and scala-3.3.4 for both module1 и module2), but migrateTypes module2 have the same error. I think, sbt try to use module1 on scala 2.13.6 when i run migrateTypes module2, although it need scala-3.3.4

P.S. .settings(commonSettings) are same for this modules, sbt is 1.10.7 .

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