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

Fix #440: Avoid using a '/' in the dummy version number for the linker. #441

Merged
merged 1 commit into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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