[Breaking] Bugfixes and improvements for new unit language
- small fixes related to the minimization of groups and fractions
- exponent expression now doesn't use references as the base anymore
- improvement and fixes in substitute menus
- small adaptions to the standard libraries
- improvements in the NewUnitLanguageMigrationHelper to support migrating custom libraries
- fixes https://github.com/IETS3/iets3.opensource/issues/882
There is one unintuitive case with dimensions that I read about: If I define unit specialUnit = °/m for unspecified quantity, the dimension is calculated based on the quantity and therefore 1 and not 1/L.
Why is it necessary to hardcode these references here?
This is explained in the comment: There would be a cyclic dependency between org.iets3.core.expr.typetags.units.si and org.iets3.core.expr.typetags.units.si which is disallowed in the IETS3 build script (http://127.0.0.1:63320/node?ref=r%3Ac3d6ae0c-8b10-477f-a3e9-5dc8700ceb13%28org.iets3.opensource.build.build%29%2F4699376143909127101).
Why was the sorting at the end removed in sortByExponent
It didn't fully work and it seems to me that we are dealing with only multiplications at the point, so I recreated the multiplications from the sorted nodes. I have to admit that I didn't test the code when we have the reduction set to fractions.
Explanations for the name-based comparisons: we know that the names are unique in the standard libraries and this way we fix any issues with transient nodes that should be compared to nodes in the standard libraries but have different node IDs.