-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
ScalaJs tests fail with ECONNREFUSED
after 0.10.10 update
#2204
Comments
Bumping mill to 0.10.11 gives me this error:
My scalajs object in build.sc is like: object scalajs extends Cross[RiscvAssemblerScalajsModule](scalaJsVersions: _*)
class RiscvAssemblerScalajsModule(val crossScalaVersion: String, crossScalaJsVersion: String)
extends RiscvAssemblerLib
with RiscvAssemblerPublish
with ScalaJSModule {
def millSourcePath = super.millSourcePath / os.up / os.up
def scalaJSVersion = crossScalaJsVersion
def ivyDeps = Agg(ivy"org.scala-js::scalajs-dom::${versions.scalajsdom}")
def scalaJSUseMainModuleInitializer = true
def moduleKind = T(ModuleKind.CommonJSModule)
object test extends Tests with RiscvAssemblerTest {
// def moduleKind =
def jsEnvConfig = T(JsEnvConfig.JsDom())
}
}
} Complete build is at: https://github.com/carlosedp/riscvassembler/blob/ce78bd05e582a9c4542c2a874328b93e8dea93b0/build.sc#L70 If I comment the |
@lolgab Do you have some thought about this? |
I think your latest comment is another issue, as I can't see any |
Opened #2300 to address the previously error reported here by mistake. |
Using the second suggestion from @lolgab from #2300 worked (setting object scalajs extends Cross[RiscvAssemblerScalajsModule](scalaJsVersions: _*)
class RiscvAssemblerScalajsModule(val crossScalaVersion: String, crossScalaJsVersion: String)
extends RiscvAssemblerLib
with RiscvAssemblerPublish
with ScalaJSModule {
def millSourcePath = super.millSourcePath / os.up / os.up
def scalaJSVersion = crossScalaJsVersion
def ivyDeps = Agg(ivy"org.scala-js::scalajs-dom::${versions.scalajsdom}")
def scalaJSUseMainModuleInitializer = true
def moduleKind = T(ModuleKind.CommonJSModule)
def jsEnvConfig = T(JsEnvConfig.ExoegoJsDomNodeJs())
object test extends Tests with RiscvAssemblerTest {} |
Weird that this apparently returned (I'm on mill 0.10.11). I had to add to build.sc object frontend extends ScalaJSModule with Common {
def scalaVersion = versions.scala3
def scalaJSVersion = versions.scalajs
def ivyDeps = super.ivyDeps() ++ Agg(
ivy"org.scala-js::scalajs-dom::${versions.scalajsdom}",
ivy"com.softwaremill.sttp.client3::core::${versions.sttp}",
)
def scalaJSUseMainModuleInitializer = true
def moduleKind = T(ModuleKind.ESModule)
def jsEnvConfig = T(JsEnvConfig.JsDom(args = List("--dns-result-order=ipv4first")))
def moduleSplitStyle = ModuleSplitStyle.SmallModulesFor(List("com.carlosedp.zioscalajs.frontend"))
// These two tasks are used by Vite to get update path
def fastLinkOut() = T.command(println(fastLinkJS().dest.path))
def fullLinkOut() = T.command(println(fullLinkJS().dest.path))
object test extends Tests with Common with TestModule.ScalaTest {
// Test dependencies
def ivyDeps = Agg(
ivy"org.scalatest::scalatest::${versions.scalatest}",
)
def moduleKind = T(ModuleKind.NoModule)
def moduleSplitStyle = T(ModuleSplitStyle.FewestModules)
}
} Without the After adding it, build passes: https://github.com/carlosedp/zio-scalajs-stack/actions/runs/4583401680/jobs/8094220895 |
From my latest tests, bumping to Nodejs 20 fixed this. |
After updating mill to 0.10.10 (I was using 0.10.9 before and it worked fine), I started to get
ECONNREFUSED
for the ScalaJS tests in my project: carlosedp/riscvassembler#13My lib is built for Scala JVM, ScalaJS and ScalaNative. The error doesn't happen using 0.10.9 (for any platform) or with 0.10.10 for JVM / Native.
Also the error happens on all Scala/ScalaJS version combinations. It appears to be in the connection to Nodejs.
The text was updated successfully, but these errors were encountered: