Skip to content

Can't publish SJS code under 3.0.0 #12581

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

Closed
catap opened this issue May 23, 2021 · 1 comment
Closed

Can't publish SJS code under 3.0.0 #12581

catap opened this issue May 23, 2021 · 1 comment

Comments

@catap
Copy link

catap commented May 23, 2021

Compiler version

3.0.0

Minimized code

sealed class DomWebSocketException(e: dom.Event) extends IOException(s"Dom Web Socket error event: ${JSON.stringify(e)}")

Output

[error] 17 |sealed class DomWebSocketException(e: dom.Event) extends IOException(s"Dom Web Socket error event: ${JSON.stringify(e)}")
[error]    |                                                                                                     ^^^^^^^^^^^^^^^^
[error]    |undefined: scala.scalajs.js.JSON.stringify # -1: TermRef(TermRef(TermRef(ThisType(TypeRef(NoPrefix,module class scalajs)),object js),JSON),stringify) at readTasty

Expectation

Should be compiled and work as it is.

The only way to get this error is sbt publishLocal and this is happened on stage like Main Scala API documentation to ...

Workaround

JSON.stringify(e, null)

@smarter
Copy link
Member

smarter commented May 23, 2021

Duplicate of #11943

@smarter smarter marked this as a duplicate of #11943 May 23, 2021
@smarter smarter closed this as completed May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants