Skip to content

Commit

Permalink
Fix #440: Avoid using a '/' in the dummy version number for the linker.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrd committed Nov 14, 2022
1 parent 0d3c553 commit c213ef6
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private[sbtplugin] object Settings {
val retrieveDir = s.cacheDirectory / "scalajs-bundler-linker"
val lm = (dependencyResolution in scalaJSLinkerImpl).value
val dummyModuleID =
"ch.epfl.scala" % "scalajs-bundler-linker-and-scalajs-linker_2.12" % s"${BuildInfo.version}/$scalaJSVersion"
"ch.epfl.scala" % "scalajs-bundler-linker-and-scalajs-linker_2.12" % s"${BuildInfo.version}-$scalaJSVersion"
val dependencies = Vector(
// Load our linker back-end
"ch.epfl.scala" % "scalajs-bundler-linker_2.12" % BuildInfo.version,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name := "newer-linker"

enablePlugins(ScalaJSBundlerPlugin, ScalaJSJUnitPlugin)

scalaVersion := "2.13.1"

scalaJSUseMainModuleInitializer := true

// Adds a dependency on the uuid npm package
npmDependencies in Compile += "uuid" -> "3.1.0"

ivyLoggingLevel in ThisBuild := UpdateLogging.Quiet
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.8.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
val scalaJSVersion = sys.props.getOrElse("scalajs.version", sys.error("'scalajs.version' environment variable is not defined"))
val scalaJSBundlerVersion = sys.props.getOrElse("plugin.version", sys.error("'plugin.version' environment variable is not set"))

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)

addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % scalaJSBundlerVersion)

ivyLoggingLevel in ThisBuild := UpdateLogging.Quiet
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package example

import org.junit.Assert._
import org.junit.Test

class BasicTest {

@Test def newerLinker(): Unit = {
assertEquals("1", 1.0.toString())
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> test

0 comments on commit c213ef6

Please sign in to comment.