Closed keilw closed 3 years ago
I'm afraid this is too early for OC1, there is no official release of Commons Numbers as of now.
Wow, I was again in a rush and read "has not released any newer version after 1.0" instead; I should stop checking issues in the middle of the night 😂
Cool, reverted everything!
For the really daring who know a bit about OpenJDK you could have a look at this branch https://github.com/unitsofmeasurement/indriya/tree/multi_release_jar and https://github.com/unitsofmeasurement/indriya/issues/25 if you like at OC1.
If Apache Commons Numbers is lightweight and self-contained, that's great. But please avoid bloating any final distribution that depends on UoM. IE: please weigh the number of additional jars and added megabytes of payload against the benefit.
It's still in snapshot, so don't worry about it. Not sure, how active it is because even the last 1.0-SNAPSHOT binaries are unavailable at Apache, so while there is a lot of activity and it seems a beta-1 is in the making soon, let's wait till a binary was released either to download at Apache or a Maven repository. Commons CVS 1 is just 35kB in JAR size, Commons Math 3 over 2MB, I would not seriously consider a JAR that is much bigger than Indriya itself which is currently around 250kB. With at least a few dependencies like uom-lib-common also just around 25kB at the moment.
Should there ever be a release of Apache Commons Numbers
, we could provide a new (optional) maven artifact that provides just another NumberSystem
implementation that integrates with Apache Commons Numbers
.
This would not bloat UoM dependencies, while giving people the freedom of choice on which NumberSystem
they prefer to use.
We could do this via some SPI mechanism yes, that's a good idea. AFAIR at least NumberSystem
is already part of the Indriya SPI.
I am currently working on Eclipse UOMo to get versions 0.8 and 1.0 out soon. Hoping 1.0 might graduate it from the Incubator. The focus in 0.8 is UCUM also because that is very important for HL7 and medical research (including Corona) but for 1.0 I also hope to add ICU and ICU4J because that is very big under Eclipse. And build a "bridge" from our UoM extension module "Unicode CLDC" to ICU4J but as a separate module or bundle, because ICU4J is roughly 20 MB in size ;-)
The Commons Number project released a 1.0.0-beta1 to MavenCentral, so it could also be used for experiments if we consider using it.
While Apache Commons Numbers has not released its 1.0 version and there is a bit of slow activity in recent months, it seems Fraction or BigFraction in particular covers most of what
RationalNumber
does here. Could we use it and (where contributors like @andi-huber were happy to help) maybe offer improvements or actual code contribution to the Commons Numbers project instead?