-
Notifications
You must be signed in to change notification settings - Fork 1k
Compiler bridge resolution ignores scalaOrganization #8731
Description
Context: We publish custom Scala3 compiler that supports Wasm Component Model under io.github.scala-wasm https://github.com/scala-wasm/scala3/tree/wasm
steps
resolvers += "Sonatype Central Snapshots" at "https://central.sonatype.com/repository/maven-snapshots/"
scalaOrganization := "io.github.scala-wasm"
scalaVersion := "3.8.3-RC1-bin-SNAPSHOT"problem
sbt should resolve org.scala-lang:scala3-sbt-bridge:3.8.3-RC1-bin-SNAPSHOT, but still tries to fetch the compiler bridge from org.scala-lang:scala3-sbt-bridge:3.8.3-RC1-bin-SNAPSHOT.
sbt> compile
...
[error] Missing org.scala-lang:scala3-sbt-bridge:3.8.3-RC1-bin-SNAPSHOT:compile
[error] (scalaCompilerBridgeBinaryJar) Missing org.scala-lang:scala3-sbt-bridge:3.8.3-RC1-bin-SNAPSHOT:compileexpectation
sbt should fetch compiler bridge from scalaOrganization (org.scala-lang:scala3-sbt-bridge:3.8.3-RC1-bin-SNAPSHOT) instead of org.scala-lang.
notes
ZincLmUtil.getDefaultBridgeModule hard-codes ScalaArtifacts.Organization (org.scala-lang) for scala2 and scala3. We might want to passing scalaOrganization value until here.
sbt/zinc-lm-integration/src/main/scala/sbt/internal/inc/ZincLmUtil.scala
Lines 111 to 117 in 6d94d6d
| def getDefaultBridgeModule(scalaVersion: String): ModuleID = { | |
| if (ScalaArtifacts.isScala3(scalaVersion)) { | |
| ModuleID(ScalaArtifacts.Organization, "scala3-sbt-bridge", scalaVersion) | |
| .withConfigurations(Some(Compile.name)) | |
| } else if (hasScala2SbtBridge(scalaVersion)) { | |
| ModuleID(ScalaArtifacts.Organization, "scala2-sbt-bridge", scalaVersion) | |
| .withConfigurations(Some(Compile.name)) |
| object ScalaArtifacts { | |
| final val Organization = "org.scala-lang" |