-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adding scalajs-linker as a dependency introduces unexpected error #21560
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
Comments
I believe you're mixing two unrelated things. One does not add the linker to a project to produce JavaScript. Instead we add the I suggest you follow a Scala.js tutorial or template project for the correct setup. |
Thanks for looking into this. I use a customized approach extending I assumed the codebase to be self-documenting, and what can be found suggested to go in that direction. If the plugin works with the latest versions, respectively 3.5.0 for Scala compiler and 1.16.0 for ScalaJs, then I could find the needed parts in plugin internals. I'll check and revert if there is more information to see the reasons for this crash. |
OK, then it's because you mix two incompatible versions of the Note the |
I'll do that. After further examining this issue, I found that we're not dealing with a missing |
I ran the Scala 3 compiler (version: 3.5.0) successfully with the
-scalajs
option,sjsir
files appear in the target directory as expected.After this step, I wanted to create human-readable JavaScript. Therefore I added
scalajs-linker
as a dependency to the SBT project.Running the first step again with the
scalajs-linker
being added, I unexpectedly get an error:I assume the source to be compiled was OK, as
sjsir
files were generated.Dependencies were set up with cross-version settings in SBT:
The
scalajs-library
dependency did not introduce binary compatibility issues (Scala 2.13 and 3 should be binary compatible https://docs.scala-lang.org/overviews/core/binary-compatibility-of-scala-releases.html) while the linker (or an IR related dependency of it) did.Looks like a nested case does not get an
unapply
method generated when it was compiled, this may cause the linker jar file to be binary incompatible, if there is no other circumstance that could cause this error.The text was updated successfully, but these errors were encountered: