Skip to content

Commit f156785

Browse files
Merge pull request #17 from scala-steward/update/scalajs-linker-1.11.0
Update scalajs-linker to 1.11.0
2 parents 9532482 + 4f71f1d commit f156785

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
fail-fast: false
5252
matrix:
5353
os: [ubuntu-latest, windows-latest, macos-latest]
54-
scalaJsVersion: ["1.9.0", "1.10.0", "1.10.1"]
54+
scalaJsVersion: ["1.9.0", "1.10.0", "1.10.1", "1.11.0"]
5555
steps:
5656
- uses: actions/checkout@v2
5757
with:
@@ -95,7 +95,7 @@ jobs:
9595
strategy:
9696
fail-fast: false
9797
matrix:
98-
scalaJsVersion: ["1.9.0", "1.10.0", "1.10.1"]
98+
scalaJsVersion: ["1.9.0", "1.10.0", "1.10.1", "1.11.0"]
9999
steps:
100100
- uses: actions/checkout@v2
101101
with:
@@ -129,7 +129,7 @@ jobs:
129129
strategy:
130130
fail-fast: false
131131
matrix:
132-
scalaJsVersion: ["1.9.0", "1.10.0", "1.10.1"]
132+
scalaJsVersion: ["1.9.0", "1.10.0", "1.10.1", "1.11.0"]
133133
steps:
134134
- uses: actions/checkout@v2
135135
with:

build.sc

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import scala.util.Properties.isWin
1818

1919
def scalaJsCliVersion = "1.1.1-sc5"
2020
def scala213 = "2.13.8"
21-
def latestScalaJsVersion = "1.10.1"
22-
def scalaJsVersions = Seq("1.9.0", "1.10.0", latestScalaJsVersion)
21+
def latestScalaJsVersion = "1.11.0"
22+
def scalaJsVersions = Seq("1.9.0", "1.10.0", "1.10.1", latestScalaJsVersion)
2323

2424
object cli extends Cross[Cli](scalaJsVersions: _*)
2525

cli/src/org/scalajs/cli/Scalajsld.scala

+5-5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ object Scalajsld {
4747
sourceMap: Boolean = false,
4848
relativizeSourceMap: Option[URI] = None,
4949
checkIR: Boolean = false,
50-
stdLib: Option[File] = None,
50+
stdLib: Seq[File] = Nil,
5151
jsHeader: String = "",
5252
logLevel: Level = Level.Info
5353
)
@@ -164,12 +164,12 @@ object Scalajsld {
164164
.action { (x, c) => c.copy(relativizeSourceMap = Some(x.toURI)) }
165165
.text("Relativize source map with respect to given path (meaningful with -s)")
166166
opt[Unit]("noStdlib")
167-
.action { (_, c) => c.copy(stdLib = None) }
167+
.action { (_, c) => c.copy(stdLib = Nil) }
168168
.text("Don't automatically include Scala.js standard library")
169-
opt[File]("stdlib")
169+
opt[String]("stdlib")
170170
.valueName("<scala.js stdlib jar>")
171171
.hidden()
172-
.action { (x, c) => c.copy(stdLib = Some(x)) }
172+
.action { (x, c) => c.copy(stdLib = x.split(File.pathSeparator).map(new File(_)).toSeq) }
173173
.text("Location of Scala.js standard libarary. This is set by the " +
174174
"runner script and automatically prepended to the classpath. " +
175175
"Use -n to not include it.")
@@ -208,7 +208,7 @@ object Scalajsld {
208208
}
209209

210210
for (options <- parser.parse(args, Options())) {
211-
val classpath = (options.stdLib.toList ++ options.cp).map(_.toPath())
211+
val classpath = (options.stdLib ++ options.cp).map(_.toPath())
212212
val moduleInitializers = options.moduleInitializers
213213

214214
val semantics =

tests/test/src/org/scalajs/cli/tests/Tests.scala

+5-3
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,24 @@ class Tests extends munit.FunSuite {
2626
|""".stripMargin
2727
)
2828

29+
val scalaJsLibraryCp = os.proc("cs", "fetch", "--classpath", "-E", "org.scala-lang:scala-library", s"org.scala-js::scalajs-library:$scalaJsVersion").call(cwd = dir).out.trim()
30+
2931
os.makeDir.all(dir / "bin")
3032
os.proc(
3133
"cs",
3234
"launch",
3335
"scalac:2.13.6",
3436
"--",
3537
"-classpath",
36-
os.proc("cs", "fetch", "--intransitive", s"org.scala-js::scalajs-library:$scalaJsVersion").call(cwd = dir).out.trim(),
38+
scalaJsLibraryCp,
3739
s"-Xplugin:${os.proc("cs", "fetch", "--intransitive", s"org.scala-js:scalajs-compiler_2.13.6:$scalaJsVersion").call(cwd = dir).out.trim()}",
3840
"-d", "bin", "foo.scala"
3941
).call(cwd = dir, stdin = os.Inherit, stdout = os.Inherit)
4042

4143
val res = os.proc(
4244
launcher,
4345
"--stdlib",
44-
os.proc("cs", "fetch", "--intransitive", s"org.scala-js::scalajs-library:$scalaJsVersion").call(cwd = dir).out.trim(),
46+
scalaJsLibraryCp,
4547
"-s", "-o", "test.js", "-mm", "Foo.main", "bin"
4648
).call(cwd = dir, stderr = os.Pipe)
4749
val expectedInOutput = "Warning: using a single file as output (--output) is deprecated since Scala.js 1.3.0. Use --outputDir instead."
@@ -60,7 +62,7 @@ class Tests extends munit.FunSuite {
6062
os.proc(
6163
launcher,
6264
"--stdlib",
63-
os.proc("cs", "fetch", "--intransitive", s"org.scala-js::scalajs-library:$scalaJsVersion").call(cwd = dir).out.trim(),
65+
scalaJsLibraryCp,
6466
"-s",
6567
"--outputDir",
6668
"test-output",

0 commit comments

Comments
 (0)