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

AssertionError on sbt 1.8.0 #440

Closed
oyvindberg opened this issue Nov 13, 2022 · 4 comments
Closed

AssertionError on sbt 1.8.0 #440

oyvindberg opened this issue Nov 13, 2022 · 4 comments
Assignees
Labels

Comments

@oyvindberg
Copy link

sbt:testProject> run
[info] Updating NPM dependencies
[info] yarn install v1.22.19
[info] info No lockfile found.
[info] [1/4] Resolving packages...
[error] warning semantic-ui-react > react-popper > popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
[error] warning webpack-dev-server > chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
[error] warning webpack-dev-server > webpack-log > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[error] warning webpack-dev-server > url > querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
[error] warning webpack-dev-server > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
[error] warning webpack-dev-server > http-proxy-middleware > micromatch > snapdragon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
[error] warning webpack-dev-server > http-proxy-middleware > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
[error] warning webpack-dev-server > http-proxy-middleware > micromatch > snapdragon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
[error] warning webpack-dev-server > http-proxy-middleware > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[info] [2/4] Fetching packages...
[info] [3/4] Linking dependencies...
[info] [4/4] Building fresh packages...
[info] success Saved lockfile.
[info] Done in 12.33s.
[error] (Zero / scalaJSLinkerImpl / fullClasspath) java.lang.AssertionError: version 0.21.0/1.8.0 contains invalid '/'
[error] Total time: 13 s, completed Nov 13, 2022, 11:04:36 PM
sbt:testProject> last Zero / scalaJSLinkerImpl / fullClasspath
[error] java.lang.AssertionError: version 0.21.0/1.8.0 contains invalid '/'
[error]   at lmcoursier.internal.shaded.coursier.core.Validation$.$anonfun$assertValid$1(Definitions.scala:421)
[error]   at scala.util.Either.fold(Either.scala:192)
[error]   at lmcoursier.internal.shaded.coursier.core.Validation$.assertValid(Definitions.scala:421)
[error]   at lmcoursier.internal.shaded.coursier.core.Dependency.<init>(Dependency.scala:24)
[error]   at lmcoursier.internal.shaded.coursier.core.Dependency$.apply(Dependency.scala:144)
[error]   at lmcoursier.internal.shaded.coursier.core.Dependency$.apply(Dependency.scala:178)
[error]   at lmcoursier.internal.shaded.coursier.package$Dependency$.apply(package.scala:24)
[error]   at lmcoursier.internal.SbtUpdateReport$.moduleReports(SbtUpdateReport.scala:209)
[error]   at lmcoursier.internal.SbtUpdateReport$.$anonfun$apply$1(SbtUpdateReport.scala:320)
[error]   at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
[error]   at scala.collection.Iterator.foreach(Iterator.scala:943)
[error]   at scala.collection.Iterator.foreach$(Iterator.scala:943)
[error]   at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
[error]   at scala.collection.IterableLike.foreach(IterableLike.scala:74)
[error]   at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
[error]   at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
[error]   at scala.collection.TraversableLike.map(TraversableLike.scala:286)
[error]   at scala.collection.TraversableLike.map$(TraversableLike.scala:279)
[error]   at scala.collection.AbstractTraversable.map(Traversable.scala:108)
[error]   at lmcoursier.internal.SbtUpdateReport$.apply(SbtUpdateReport.scala:306)
[error]   at lmcoursier.internal.UpdateRun$.$anonfun$update$1(UpdateRun.scala:87)
[error]   at lmcoursier.internal.Lock$.maybeSynchronized(Lock.scala:8)
[error]   at lmcoursier.internal.UpdateRun$.update(UpdateRun.scala:59)
[error]   at lmcoursier.CoursierDependencyResolution.$anonfun$update$37(CoursierDependencyResolution.scala:311)
[error]   at scala.util.Either.map(Either.scala:353)
[error]   at lmcoursier.CoursierDependencyResolution.$anonfun$update$36(CoursierDependencyResolution.scala:308)
[error]   at scala.util.Either.flatMap(Either.scala:341)
[error]   at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:306)
[error]   at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error]   at sbt.librarymanagement.DependencyResolution.retrieve(DependencyResolution.scala:129)
[error]   at scalajsbundler.sbtplugin.Settings$.$anonfun$globalSettings$1(Settings.scala:52)
[error]   at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]   at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error]   at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error]   at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error]   at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error]   at sbt.Execute.work(Execute.scala:291)
[error]   at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error]   at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]   at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error]   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]   at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[error]   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[error]   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[error]   at java.base/java.lang.Thread.run(Thread.java:833)
[error] (Zero / scalaJSLinkerImpl / fullClasspath) java.lang.AssertionError: version 0.21.0/1.8.0 contains invalid '/'

note in particular:

[error]   at scalajsbundler.sbtplugin.Settings$.$anonfun$globalSettings$1(Settings.scala:52)

repro

build.sbt

lazy val testProject =
  project
    .in(file("."))
    .enablePlugins(ScalaJSBundlerPlugin)
    .settings(
      useYarn := true,
      Compile / npmDependencies ++= Seq(
        "@types/react-dom" -> "16.9.1",
        "@types/react" -> "16.9.5",
        "@types/node" -> "12.12.14",
        "react-dom" -> "16.9",
        "react" -> "16.9",
        "semantic-ui-react" -> "0.88.1"
      ),
      organization := "net.leibman"
    )

project/plugins.sbt

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.21.0")

project/build.sbt

sbt.version=1.8.0
@eed3si9n
Copy link

I think the problem is
https://github.com/scalacenter/scalajs-bundler/blob/v0.21.0/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/Settings.scala#L43-L44

The latest Coursier no longer allows / character in the version number. If it's a dummy version number hopefully it could be changed to some other characters instead?

@sjrd sjrd self-assigned this Nov 14, 2022
@sjrd sjrd added the bug label Nov 14, 2022
sjrd added a commit to sjrd/scalajs-bundler that referenced this issue Nov 14, 2022
@sjrd sjrd closed this as completed in c213ef6 Nov 14, 2022
sjrd added a commit that referenced this issue Nov 14, 2022
Fix #440: Avoid using a '/' in the dummy version number for the linker.
@sjrd
Copy link
Collaborator

sjrd commented Nov 14, 2022

Version 0.21.0 is out and fixes this issue.

@oyvindberg
Copy link
Author

Awesome, thanks @sjrd :)

@mikla
Copy link

mikla commented Apr 13, 2023

Correction: fixed in 0.21.1. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants