You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several files in this repository are generated and checked in. Nothing rebuilds them and compares,
so a template can stop matching its output and the build stays green — the file is only discovered to
be unregenerable the next time somebody actually tries.
That happened. Sources/Utils/Utils/EquationSystemFunctionPattern.txt still said Tensor? long after
the type was renamed to Matrix?, so nobody could have regenerated AdditionalExtensions.cs as it
stood; the same file had also silently lost its // This file is auto-generated banner. Both were
found only because #1029 needed to put documentation into the generator rather than into its output,
and both are repaired there.
What is and is not stale today
Measured on 6b93b401 (master, v2.3.0) with dotnet-t4, regenerating each template and diffing
against the committed file:
In each of the three T4 cases the whole diff is the six-line copyright header, which no template
emits and which is added separately. So the T4 half is green today — and nothing would tell us
the day it stopped being.
What to build
A CI job that regenerates every checked-in generated file and fails if the result differs from what
is committed, ignoring the copyright header block that the generators do not produce.
dotnet tool install -g dotnet-t4, then run each .tt and diff. The three templates are listed in AngouriMath.csproj under <None Update="...tt">, so the job can read them from there rather than
hard-coding a list that will itself go stale.
Run Sources/Utils/Utils for AdditionalExtensions.cs and the generated test file, and diff.
ANTLR is the awkward one and can be a second step or a separate issue: regeneration needs the ANTLR
tool at a pinned version and AntlrPostProcessor.cs runs over the output, so getting a
byte-reproducible result needs care. Do not include it until it is reproducible, because a gate
that is red for reasons nobody can fix gets disabled.
The failure message names the file and shows the diff, not just "files differ".
The header block that generators do not emit is excluded deliberately and the exclusion is
commented, so it cannot quietly grow to hide a real difference.
It does not require a tool the other jobs cannot install.
Dependencies
#1029 must merge first — it is what makes the Utils generator reproducible again. The T4 half
could land before it, but a gate that covers half the generators and is silent about the half that
actually broke is the wrong shape; better to land it whole.
Independent of everything else currently open. Relates to #746's third standing condition — correctness coverage grows with the surface — and to its item 77.
What is wrong
Several files in this repository are generated and checked in. Nothing rebuilds them and compares,
so a template can stop matching its output and the build stays green — the file is only discovered to
be unregenerable the next time somebody actually tries.
That happened.
Sources/Utils/Utils/EquationSystemFunctionPattern.txtstill saidTensor?long afterthe type was renamed to
Matrix?, so nobody could have regeneratedAdditionalExtensions.csas itstood; the same file had also silently lost its
// This file is auto-generatedbanner. Both werefound only because #1029 needed to put documentation into the generator rather than into its output,
and both are repaired there.
What is and is not stale today
Measured on
6b93b401(master, v2.3.0) withdotnet-t4, regenerating each template and diffingagainst the committed file:
Convenience/CompilationExtensions.ttCompilationExtensions.csFunctions/Compilation/Compile.Linq.Definition.ttCompile.Linq.Definition.csFunctions/Compilation/IntoLinq/MathAllMethods.ttMathAllMethods.csUtils/ExtensionGenerator.cs+*.txttemplatesAdditionalExtensions.csCore/Antlr/AngouriMath.gIn each of the three T4 cases the whole diff is the six-line copyright header, which no template
emits and which is added separately. So the T4 half is green today — and nothing would tell us
the day it stopped being.
What to build
A CI job that regenerates every checked-in generated file and fails if the result differs from what
is committed, ignoring the copyright header block that the generators do not produce.
dotnet tool install -g dotnet-t4, then run each.ttand diff. The three templates are listed inAngouriMath.csprojunder<None Update="...tt">, so the job can read them from there rather thanhard-coding a list that will itself go stale.
Sources/Utils/UtilsforAdditionalExtensions.csand the generated test file, and diff.tool at a pinned version and
AntlrPostProcessor.csruns over the output, so getting abyte-reproducible result needs care. Do not include it until it is reproducible, because a gate
that is red for reasons nobody can fix gets disabled.
Acceptance criteria
masterafter Give every member of AngouriMath.Extensions a worked, executed example (#585, #746 item 4) #1029 merges, and fails if a template is edited without itsoutput being regenerated — demonstrated by pushing exactly that and showing the red.
commented, so it cannot quietly grow to hide a real difference.
Dependencies
#1029 must merge first — it is what makes the
Utilsgenerator reproducible again. The T4 halfcould land before it, but a gate that covers half the generators and is silent about the half that
actually broke is the wrong shape; better to land it whole.
Independent of everything else currently open. Relates to
#746's third standing condition —
correctness coverage grows with the surface — and to its item 77.