Skip to content

Commit 901e632

Browse files
committed
Fix #2875: Remove JSEnv.loadLibs, resolvedJSEnv and loadedJSEnv.
We remove `resolvedJSEnv` simply by initializing `jsEnv` by default in the project scope, and using `jsEnv` instead of `resolvedJSEnv`. We remove `loadedJSEnv` by using instead the pair `jsEnv` + `jsExecutionFiles` explicitly. Finally, we can remove `JSEnv.loadLibs`, as it was only useful for `loadedJSEnv`.
1 parent d651df7 commit 901e632

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sbt-plugin-test/project/Jetty9Test.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ object Jetty9Test {
2121
private val jettyPort = 23548
2222

2323
val runSetting = run <<= Def.inputTask {
24-
val jsEnv = (loadedJSEnv in Compile).value.asInstanceOf[ComJSEnv]
24+
val env = (jsEnv in Compile).value.asInstanceOf[ComJSEnv]
25+
val files = (jsExecutionFiles in Compile).value
2526
val jsConsole = scalaJSConsole.value
2627

2728
val code = new MemVirtualJSFile("runner.js").withContent(
@@ -42,7 +43,7 @@ object Jetty9Test {
4243
"""
4344
)
4445

45-
val runner = jsEnv.comRunner(code :: Nil)
46+
val runner = env.comRunner(files :+ code)
4647

4748
runner.start(streams.value.log, jsConsole)
4849

0 commit comments

Comments
 (0)