-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Java 9 support for other profiles #42
Comments
As said in previous discussion, I strongly object against splitting the 27 kb
Inconvenient is module path pollution. It makes the module path longer (forcing users to think about more elements) and increase the risk of incompatible version numbers between different parts of the API. This is likely to happen for example when using two libraries depending on different versions of JSR-363: we may have library A loading So splitting JSR-363 API in many modules increase maintenance cost for all users for no advantage I can see. |
Based on the modularity and optionality those who only need the smallest part of the API they shall be able to do that using dedicated modules. The "all" or "full" jar currently won't be split into those modules, thus there are separate modules like "java.measure.base" similar to the JDK. Those who need it ma use matching Maven profiles to build individual module jars. As described in https://docs.oracle.com/javase/9/tools/jlink.htm or https://jaxenter.de/java-9-tutorial-jlink-59103 (German) |
Shall we close this one, given the comment above? |
No it's not done yet. It is for extremely small IoT devices that need a minimal size and only use the "core/base" part of the JSR or base + format. By using JLink they're able to create an optimized app for their needs. We probably won't put those on MavenCentral, but we allow (and shall document in https://github.com/unitsofmeasurement/uom-guide like other things, e.g. "Compound" quantities) users who need this optimization to use the relevant profiles for that. |
The |
I'm a little bit confused about those profiles stuff. Are we talking about Maven modules or Jigsaw modules? I'm neutral about Maven profiles or modules, as long as it is possible for projects like GeoAPI to depends on a single JAR file for the full API from Maven Central. However for Jigsaw modules, I would still like a single module in a single JAR for full API. But if we provide both a "single module for all" and "many nano-modules", we will have conflicts if those two distributions appear together on the module path (the JVM will refuse to start). So is it only about Maven profiles (I have no objection to that), or is it also about Jigsaw modules? |
A bit of both. Jigsaw (based on how improved it for the "Full" module ;-) defines specific modules that are different from the "all" module, e.g. Again we are talking about tiny devices at or below the Raspberry Pi Zero. Intel Curie (which I think may now also run Java) or similar chips/devices or https://github.com/siemens/meta-iot2000. These are Industrial IoT Boards and according to the GitHub repo it seems that some also run Java, but most are so constrained, you must create or use a slimmed-down JDK. And everything else is also tiny, so it matters, even if the API is |
https://maven.apache.org/plugins/maven-compiler-plugin/multirelease.html could be of help. |
The "profile jar" profiles make little sense and they mix the base |
Based on #41 the other profiles in https://github.com/unitsofmeasurement/unit-api/blob/master/pom.xml (to create smaller JARs according to profiles from the Spec) should also be able to expose a module like
java.measure.core
or similar to distinguish them from other modules.At the moment these are subsets exposing the relevant packages only and we don't aim to make the "Full Profile" a collection of these modules (though Jigsaw technically would allow that)
The text was updated successfully, but these errors were encountered: