Repository navigation
Design document: which capabilities belong in the kernel package, and which ship separately (#746 item 78) #1008
Description
Activity
- addedOpinions wantedWe are interested in your opinion about the topicWe are interested in your opinion about the topicDesign documentFor issues representing detailed design of new API or featureFor issues representing detailed design of new API or feature
on Aug 23, 2026 The document this asks for exists.
Docs/Contributing/Packaging.md(#1023), plus
NodeContract.md(#1040) andTrimming.md. Every acceptance criterion here is met except one — a
way to fail a build that violates the dependency rule. I would close this and open one small issue
for that gate.Re-measuring the central claim rather than quoting it
Trimmed self-contained
linux-x64,TrimMode=full:app trimmed AngouriMath.dlluntrimmed 1,449,472 B parse only 1,021,440 B parse + Simplify1,021,440 B (137 bytes differ — header and MVID) AotSmokeTest(44 checks over parse,Simplify,Solve,Differentiate,Integrate,Limit,Compile)1,177,600 B The whole spread between the narrowest and the broadest use of the library is 156,160 B — 10.8% of
the assembly, against 8.4% at 2.3.0. AddingSimplifyto a parse-only app changes the trimmed size
by zero bytes: parsing already drags in the whole simplifier.So no boundary should move on size grounds, and I would move none. §4's rule holds.
The kernel has grown since the boundary was decided — 211 files / 53,665 lines → 234 / 68,683 (+28%),
Core/Transformations2,899 → 10,138, the shipped net10.0 assembly 1,184,256 → 1,449,472 B (+22.4%) —
and that changes nothing here. Large and inert is exactly the case §4 permits.Two things have drifted
The recorded dependency list is already stale.
GetReferencedAssemblies()is now 14, not 13:
System.Text.Jsonarrived withCore/Serialization. The NuGet groups are unchanged, so nothing
reached a consumer's restore — but this is precisely the change §7's gate was proposed to catch, and
nothing caught it. There is no such test, noNetArchTest, noDirectory.Packages.props. That gate
is the one piece of work I would do, and it is small.Domain packages are blocked by more than #1026 records. Eight non-public abstract members now, not
five: the original five plusStringizeNode,LatexizeNode(#1047) andSet.SpecialSet.ToDomain.
NodeContract.mddecides this, but the decision is unimplemented — every one is stillinternalor
private protected. Moving the LaTeX printer or the SymPy export out is impossible until it ships.One thing has been fixed:
EverythingBuild.ymlnow builds the Terminal, so §7's gap there is closed.MathS.ExperimentalFeatures— 191 lines, in the kernel under a pinnedAssemblyVersion— remains the
only move that buys anything, and it is a judgement rather than a measurement.Where the evidence does not settle it
Restore and download time, the Blazor WebAssembly payload, and whether the ~11% spread survives an
e-graph landing. Also worth saying plainly: this issue has no comments and neither does #783, so no
consumer has asked for a subset build. The demand side is unmeasured, not absent.Closing as answered.
Docs/Contributing/Packaging.md(#1023) is the document this asked for, withNodeContract.mdandTrimming.mdbeside it, and every acceptance criterion is met except one — a way to fail a build that violates the dependency rule.Re-measured before closing rather than quoting: the whole trimmed-size spread between the narrowest and broadest use of the library is 10.8% of the assembly, and adding
Simplifyto a parse-only app costs zero bytes. So no boundary should move, which is the substantive answer.The missing gate is worth having on its own — the recorded dependency list has already drifted from 13 assemblies to 14 with nothing noticing — and I am building it rather than leaving it filed.
- added a commit that references this issue
on Sep 5, 2026
Item 78 of #746, filed as its own issue because it is the one thing that roadmap names as "worth settling before v2.0 adds anything large, because published package boundaries cannot be moved afterwards" — and three releases have since added large subsystems to the kernel without it being settled.
This is a request for a decision, not for code. Nothing here proposes moving anything yet.
Where we actually are
Measured on
masterat6b93b401(2.3.0).Four packages are published, by
.github/workflows/Nuget.yml:AngouriMath,AngouriMath.FSharp,AngouriMath.Interactive,AngouriMath.Terminal.Two corrections to #746's own premise, which describes the existing split as "kernel,
FSharp,Interactive,Terminal,CPPandExperimental":Experimentalis not a package. It isSources/AngouriMath/Convenience/Experimental/MathS.Experimental.cs, a folder inside the kernel.AngouriMath.CPP.Exportingand.Importingbuild and are tested in CI; neither is pushed to NuGet.So the pattern the roadmap says to extend is narrower than it was described as, which is worth knowing before extending it.
The kernel is now 211 files and 53,665 lines, and this is what has arrived in it since the roadmap was written, none of it with a boundary decision in front of it:
Functions/Algebra/PolynomialsCore/TransformationsFunctions/Algebra/GroebnerFunctions/Boolean(incl. the Quine–McCluskey minimiser)Functions/Output/ToSympyFunctions/QuantumFunctions/Algebra/MonoidAlgebraCore/Entity/GenericMathPartial mitigation, and it is real: the polynomial and Gröbner layers are
internal, so they add size without adding surface. That caps the compatibility cost of moving them later — it does not cap the download.What the design document has to answer
Simplify, or is even that a layer above the tree and the rules?PublishTrimmed,IsTrimmableorIsAotCompatibleanywhere in the tree and the compilation path still resolves methods by string at run time (AOT-supported Linq compilation #363). Settling that may change the answer here, so the two want deciding together.Acceptance criteria
Sources/AngouriMath/Docs/Contributing/, besideCanonicalForm.mdandSimplificationContract.md, which are the precedent for a decision written down and checkable — naming, for every top-level area of the kernel, whether it stays or moves, and why.Related
#ifas the mechanism for feature subsets and proposes trait-based test selection plus package-ready seams. It is adjacent and it does not answer this: it says how not to do it and how to stay ready, not where the line goes.Raised originally by @darkfader in the #746 thread, and named there as a precondition rather than a task.