Comments (3)
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.
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.
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)
- Ordering of `jsConfigure` call breaks CrossType configuration HOT 1
- Can't share main class between JS and JVM builds. HOT 1
- multiple shared modules HOT 2
- Cross ScalaJS Versions HOT 3
- version 0.6.1 is missing release notes HOT 1
- Benchmarks do not run under cross project. HOT 1
- Dependency Resolution in Root Project of Pure Cross Project HOT 2
- Modules were resolved with conflicting cross-version suffixes in sbt plugin HOT 2
- sbt version 1.13.17 in the readme HOT 3
- Classpath for JS project includes Java JARs too HOT 4
- crossProject.withId HOT 1
- +publish(Signed) fails with "Repository for publishing is not specified." when crossScalaVersions are not identical HOT 9
- README.md Scala Native version needs updating HOT 2
- Shared unmanaged jar HOT 1
- Unable to fix projectDir depreciation for custom sbtcrossproject.CrossType HOT 4
- Configuration dependencies between platforms HOT 1
- Release plugin powered with the new Scala Native `0.4.8` HOT 1
- Ambiguous toplevel definition EnableReflectiveInstantiation HOT 2
- Is there a command/task that only builds/compiles projects for a given platform?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbt-crossproject.