Skip to content

Remove every deprecated member for 2.0 (#821) - #832

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
chore/remove-deprecated-members
Aug 9, 2026
Merged

Remove every deprecated member for 2.0 (#821)#832
Rafael-SOWNet merged 1 commit into
masterfrom
chore/remove-deprecated-members

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Collaborator

Part of #821 — the "remove deprecated functions" half. 2.0 follows semantic versioning, so all 28 members carrying [Obsolete] are gone, along with the call sites and the suppressions that kept them alive. The whole solution now builds with no CS0618 anywhere, and no pragma disabling it.

One replacement did not exist

MathS.Compute.DefiniteIntegral was deprecated in favour of "non-static methods at Entity" — and there was no Entity.DefiniteIntegral. Every other member of that group had a counterpart; this one did not. Removing it as it stood would have taken numeric definite integration out of the library with nothing to replace it.

So Entity.DefiniteIntegral(x, from, to, stepCount = 100) is added here, in real and complex bound overloads, and the three tests move onto it.

The library was using its own deprecated API

Two places, both behind #pragma warning disable CS0618:

  • MatrixOperations.Concat indexed the obsolete Matrix.Shape. It now asks RowCount/ColumnCount through a small local helper, since the axis is computed rather than literal.
  • CompilationProtocol carried six obsolete converter delegates plus the branches consulting them — with a comment saying to remove them when the converters went.

Corrections to what I told this issue

I reported the opposite of that last point, and it is worth being explicit about why. I checked for CS0618 warnings, found none, and concluded the library did not call its own deprecated API. The absence was manufactured by those pragmas. An absence of warnings proves nothing where warnings are suppressed — the pragma was the thing to grep for, and I did not.

The same mistake inflated my call-site count three times over:

  • The obsolete Matrices.Matrix is the Entity[,] overload, not the (rows, columns, params) one the tests actually use.
  • The obsolete Interval overloads live in MathS.**Matrices**, not MathS.Sets.
  • MathS.Derivative/Integral/Limit are node constructors and are not deprecated at all — entirely distinct from MathS.Compute.* of the same names.

Nineteen call sites was wrong: there were five, plus the two suppressed regions inside the library.

What moved

removed use instead
MathS.Matrices.Matrix(Entity[,]) MathS.Matrix
MathS.Matrices.Vector(params Entity[]) MathS.Vector
MathS.Matrices.MatrixMultiplication, DotProduct operator *
MathS.Matrices.ScalarProduct(a, b) a.T * b
MathS.Matrices.Interval(...) ×2 MathS.Interval
MathS.Compute.Derivative ×2 expr.Differentiate(x)
MathS.Compute.Integral ×2 expr.Integrate(x)
MathS.Compute.Limit ×2 expr.Limit(x, to)
MathS.Compute.DefiniteIntegral ×3 expr.DefiniteIntegral(x, from, to)new
Entity.Derive, "...".Derive Differentiate
Entity.Matrix.Shape RowCount, ColumnCount
Setting.Global, RollBackToDefault Setting.Set in a using
CompilationProtocol's six converter delegates inherit and override the methods
CompilationProtocolBuiltinConstantConverters CompilationProtocol

DefaultConverters.cs is deleted outright, being a single obsolete class with no other contents.

Tests

5928 passing, 0 failed, 14 skipped. F# 130 passing. No behavioural change — the removed members were forwarders or duplicates, and everything they forwarded to is unchanged.

BREAKING-CHANGES.md carries the full table and the note about the missing replacement.

Still open on #821

The other half — "redesign all APIs for consistency and correctness" — is untouched here. That wants your direction on what counts as inconsistent, and it is a much larger conversation than deleting what was already marked for deletion.

🤖 Generated with Claude Code

2.0 follows semantic versioning, so the twenty-eight members carrying [Obsolete]
are gone, along with the call sites and suppressions that kept them alive.

One of them could not simply be deleted. MathS.Compute.DefiniteIntegral was
deprecated in favour of "non-static methods at Entity" and there was no
Entity.DefiniteIntegral -- every other member of that group had a counterpart and
this one did not. Removing it as it stood would have taken numeric definite
integration out of the library with nothing to replace it, so the replacement is
added here in real and complex bound overloads, and the tests move onto it.

The library was using its own deprecated API in two places, both hidden behind
#pragma warning disable CS0618:

  MatrixOperations.Concat        indexed the obsolete Matrix.Shape; it now asks
                                 RowCount and ColumnCount through a small local
                                 helper, since the axis is computed rather than
                                 literal.
  CompilationProtocol            carried six obsolete converter delegates and the
                                 branches that consulted them, with a comment
                                 saying to remove them when the converters went.

That is worth naming because I reported the opposite on the issue. I had checked
for CS0618 warnings, found none, and concluded the library did not call its own
deprecated API -- but the absence was manufactured by those pragmas. An absence of
warnings proves nothing where warnings are suppressed, and the pragma was the
thing to grep for.

The same mistake inflated the call-site count three times over. The obsolete
Matrices.Matrix is the Entity[,] overload, not the (rows, columns, params) one
that the tests actually use; the obsolete Interval overloads live in
MathS.Matrices rather than MathS.Sets; and MathS.Derivative, Integral and Limit
are node constructors, entirely distinct from the deprecated MathS.Compute
functions of the same names. Nineteen call sites was wrong: there were five, plus
the two suppressed regions inside the library.

DefaultConverters.cs is deleted outright, being a single obsolete class with no
other contents.

Tests: 5928 passing, 0 failed, 14 skipped; F# 130. The whole solution builds with
no CS0618 anywhere, and no pragma disabling it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant