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"
https://github.com/scala-wasm/component-example
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:compile
expectation
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.
|
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" |
Context: We publish custom Scala3 compiler that supports Wasm Component Model under
io.github.scala-wasmhttps://github.com/scala-wasm/scala3/tree/wasmsteps
https://github.com/scala-wasm/component-example
problem
sbt should resolve
org.scala-lang:scala3-sbt-bridge:3.8.3-RC1-bin-SNAPSHOT, but still tries to fetch the compiler bridge fromorg.scala-lang:scala3-sbt-bridge:3.8.3-RC1-bin-SNAPSHOT.expectation
sbt should fetch compiler bridge from
scalaOrganization(org.scala-lang:scala3-sbt-bridge:3.8.3-RC1-bin-SNAPSHOT) instead oforg.scala-lang.notes
ZincLmUtil.getDefaultBridgeModulehard-codesScalaArtifacts.Organization(org.scala-lang) for scala2 and scala3. We might want to passingscalaOrganizationvalue until here.sbt/zinc-lm-integration/src/main/scala/sbt/internal/inc/ZincLmUtil.scala
Lines 111 to 117 in 6d94d6d
sbt/lm-core/src/main/scala/sbt/librarymanagement/ScalaArtifacts.scala
Lines 3 to 4 in 6d94d6d