Giter Club home page Giter Club logo

Comments (3)

sjrd avatar sjrd commented on June 14, 2024

Sorry, this has been debated long ago in Scala.js core. There's no guarantee that the class files produced through Scala.js are workable on the JVM. Plus, even if the sources are the same, the metadata aren't. Scala.js doesn't guarantee anything here.

Given the lack of guarantee, sbt-crossproject is not going to allow this easily. It will be too easy for users to shoot themselves in the foot.

If your particular build and sources happen to produce the same class files, and you're willing to bet that this will remain true in the future, you can figure out how to hack your build to do it (not using sbt-crossproject, then, but your own mechanism). I am not going to give hints on how to do that, because I don't want to be blamed if and when things go wrong with that approach.

from sbt-crossproject.

matthughes avatar matthughes commented on June 14, 2024

Are there any links to that discussion? I thought surely this must have been discussed or I completely misunderstood the issue but I couldn't find the discussions.

So why does ScalaJS generate class files in the first place if it doesn't use them? Is it just a side-effect of generating the sjsir files? What part of the process generates the class files and how could/would that be different than regular JVM project?

from sbt-crossproject.

sjrd avatar sjrd commented on June 14, 2024

Those discussions are really old. They date back from the first year of Scala.js. I'm on vacation with only a mobile phone, so I can't really look them up at the moment. You can try in the oldest closed issues of the core Scala.js repo.

from sbt-crossproject.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.