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

Scala.js compiler crash when using macro api #116

Closed
yoohaemin opened this issue Oct 23, 2017 · 3 comments
Closed

Scala.js compiler crash when using macro api #116

yoohaemin opened this issue Oct 23, 2017 · 3 comments

Comments

@yoohaemin
Copy link
Contributor

Play JSON Version

2.6.5

API

scala-js

Operating System

JDK

  • openjdk version "1.8.0_131" on Ubuntu
  • Oracle JVM 1.8.0_141 on Mac (As far as I remember; I don't use a Mac anymore)

Library Dependencies

Nothing other than play-json and scala-js itself

Expected Behavior

  1. Create an ADT (sealed trait hierarchy)
  2. Create Format instances of the case classes by calling Json.format[Class] respectively, and have them in the implicit scope
  3. Call Json.format[Trait]
  4. Format[Trait] should have been created by macros

Actual Behavior

Compiler crash. Additional details are available here.

Reproducible Test Case

I have a separate repo.

@cchantep
Copy link
Member

As indicated in the details, the bug occurs in Json macro, but the cause is that the compilation gives an invalid symbol name at first.

A workaround can be added, anyway would be useful to understand by the name is not valid at first.

@cchantep
Copy link
Member

Considering that w/o Scala.JS there is no issue, it doesn't seem related : https://github.com/cchantep/scalajs-bugreport/tree/without_scalajs

cchantep pushed a commit to cchantep/play-json that referenced this issue Oct 26, 2017
@cchantep cchantep mentioned this issue Oct 26, 2017
3 tasks
cchantep pushed a commit to cchantep/play-json that referenced this issue Oct 26, 2017
cchantep pushed a commit to cchantep/play-json that referenced this issue Oct 26, 2017
gmethvin pushed a commit that referenced this issue Oct 26, 2017
* Add test code failing on compilation with Scala.JS (#117)

* Comment about #117

* Workaround for #116

* Sanity refactor (see #92)

* Update CI config
gmethvin pushed a commit that referenced this issue Oct 26, 2017
* Add test code failing on compilation with Scala.JS (#117)

* Comment about #117

* Workaround for #116

* Sanity refactor (see #92)

* Update CI config
@cchantep
Copy link
Member

A workaround is now on master (investigating why compiler with JS interop give such invalid owner name).

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

No branches or pull requests

2 participants