UnitsNet/4.0.0
4.0.0 Release
This PR will serve as the list of items to complete and it will be updated to show the progress before finally merged into master
when completed. We all have busy schedules, so if you want to help move this work forward then that is much appreciated!
The main theme is to reduce binary size
In two years it has grown from 280 kB to 1.4 MB and a lot of it is due to unnecessary syntactic sugar with many method overloads for various number types and nullable types - for every of our 800+ units! It simply adds up to a big total.
These items are chosen from #180, trying to include as many of the low hanging fruits as possible, while still keeping the list short and realistic to complete in a reasonably short time - we are all busy in our daily lives. We can always have more major version bumps later than trying to perfect it all now.
Feature complete before November, merged before mid-December
I would like to aim for a "beta" pre-release nuget sometime in October with all the items completed, so we can have some time to test it before releasing the final, stable 4.0.0 version before Christmas holidays.
We should have the work items list more or less final before Monday, October 8th.
Changes
Added
- UnitSystem with a different meaning, now defines the base units for a unit system (#524)
Removed
- Replace netstandard1.0 target with netstandard2.0, to avoid the extra dependencies (#477)
- Remove code marked as
[Obsolete]
, such asVolumeUnit.Teaspoon
(#490) - Remove nullable
From
factory methods (#483) - Remove extension methods on nullable number types (#483)
- Remove all number extension methods (#497)
- Remove
Length2d
, replaced byArea
(#501) - Remove static methods on
UnitSystem
, should useUnitSystem.Default
instead (#496) - Remove unit parameter from
ToString()
methods (#546)
Changed
- Throw exception on NaN values in static constructor methods, like
FromMeters()
(#502, see #176 (comment)) - Throw if unit was not specified when constructing quantities, (#499 - #389 (comment))
- Stricter parsing (#343 and #180 (comment))
- Remove unit parameter from
ToString()
methods (#546) - Change Temperature arithmetic back to use base unit Kelvin (#550, see #518)
Renamed
- Correct SingularName for some Flow unit definitions (#494, see #360)
- Split/rename UnitSystem into UnitParser, GlobalConfiguration, UnitAbbreviationsCache (#511)
Fixed
- Search for any TODO comments in the code to address, remove comment and either fix or create issue (5d24432)
- Update README with v4 changes #498
- Do not try/catch in UnitConverter.Try-methods (#506)
- Do not try/catch in
Length.TryParse()
and for other quantities (#507) - Add/update changelog in wiki for v4 with some summary copied from this issue, some v3 to v4 migration instructions and briefly explain why some stuff were removed
Milestones
- Finalize work items list (Monday, October 8)
- Release 4.0.0-beta1, feature complete (Wednesday, October 31)
-
Show release notes and upgrade guide when upgrading to 4.x nuget, if possible - Release 4.0.0 (Monday, December 17)