Close V0 release blockers (#50, #52) and drop out-of-support TFMs#101
Merged
Conversation
#50/#52 were already implemented in the generator (V0 factories guard via Vector0Guards.EnsureNonNegative; V0 - V0 returns T.Abs(left - right)) but the covering tests were left [Ignore]d. Un-skip and rename them. Drop net5.0/net6.0/net7.0: System.Text.Json 10 and friends no longer ship assets for those runtimes (they are out of support). Strings/Paths keep netstandard2.0/2.1 so older consumers still resolve; Quantities goes to net8.0 floor (it needs INumber<T>). Document the TFM change in the 2.0 migration guide.
The committed Units.g.cs predated the catalogue's ordinal sort, so every build re-ordered one singleton (FootPerSecond) and showed the file dirty. The generator is deterministic (verified: two clean builds are byte-identical), so this is a one-time resync. Add a standalone verify-generated workflow that rebuilds and fails if anything under Semantics.Quantities/Generated/ drifts from its generator. Kept separate from the centrally-synced dotnet.yml.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Closes the two release blockers from #100
Blocker 1 — V0 non-negativity (#50) and absolute-difference subtraction (#52)
Both were already implemented in the generator, but the covering tests were left
[Ignore]d:From{Unit}factories guard viaVector0Guards.EnsureNonNegative(runs after unit conversion, throwsArgumentException).V0 - V0emitsCreate(T.Abs(left - right)), so magnitude subtraction stays non-negative.This un-skips and renames the three tests (
Mass_From_Negative_Throws,Speed_From_Negative_Throws,Mass_Minus_Mass_Returns_Absolute_Difference) and refreshes their now-stale comments. Closes #50, closes #52.Blocker 2 — drop out-of-support target frameworks
System.Text.Json10 (andSystem.IO.Pipelines,System.Text.Encodings.Web,System.Runtime.CompilerServices.Unsafe) no longer ship assets fornet5.0/net6.0/net7.0, which produced ~18 "doesn't support" warnings via Strings/Paths.Semantics.Strings,Semantics.Paths: dropnet5.0/net6.0/net7.0, keepnet8.0–net10.0+netstandard2.0/2.1(older consumers still resolve via netstandard, so this is non-breaking for them).Semantics.Quantities: dropnet7.0→net8.0–net10.0floor (it needsINumber<T>, so no netstandard target).docs/migration-guide-2.0.md.Result
dotnet build -c Release: 0 errors, warnings down from 20 to 1 (a pre-existingCS8600inLogarithmicScalesGenerator.cs:141, unrelated, not promoted to error).Known follow-up (not in this PR)
The committed generated
Units.g.csreorders nondeterministically on each build (theFootPerSecondsingleton moves). Worth making theUnitsGeneratoroutput order deterministic so generated files don't churn.