Repository navigation
DEMO, do not merge: showing the #1034 gate go red - #1125
Closed
Rafael-SOWNet wants to merge 2 commits into
Closed
Rafael-SOWNet wants to merge 2 commits into
Rafael-SOWNet wants to merge 2 commits into
Conversation
…d matching Nothing rebuilt the checked-in generated files and compared, so a template could stop matching its output and the build stayed green -- the file only being discovered to be unregenerable the next time somebody actually tried. That had already happened once, to `EquationSystemFunctionPattern.txt`, repaired by #1029. It had happened twice. `TupleToIntervalTest.txt` still named `MathS.Matrices.Interval`, which does not exist, so regenerating `TupleToIntervalTest.cs` produced eighteen CS0117 errors -- measured, not inferred. The generator had also drifted on the namespace, writing `UnitTest.Extensions` where the test project uses `AngouriMath.Tests.Extensions`, and had lost the `Area` trait every test class here carries so that `dotnet test --filter` can select by area. All three are repaired. **And two of the three T4 templates did not emit the copyright header**, which is worse than cosmetic: IDE0073 is an error in this repository, so regenerating either of them produced a file that failed the build outright. The issue proposed excluding the header block when diffing; emitting it is better, because then the generated file is the committed file and there is no exclusion that could quietly grow to hide a real difference. `MathAllMethods.tt` already emitted it and already reproduced exactly, so this makes the other two match the one that worked -- BOM included, which that file does not have either and which no `.editorconfig` rule asks for. `Sources/Utils/regenerate_all.sh` regenerates everything in place. The three T4 templates are read out of `AngouriMath.csproj` rather than listed in the script, because a list written twice is a list that drifts, and this one would drift in the direction of covering less. It resolves paths from its own location rather than from the working directory, and it looks `t4` up rather than assuming it is on PATH -- `dotnet tool install -g dotnet-t4` installs a binary called `t4`, so `dotnet t4` fails with a message that reads as a typo. `GeneratedFilesUpToDate.yml` runs it and fails on any difference, printing the diff rather than "files differ". Demonstrated by breaking a template without regenerating its output: the job's diff step exits 1 and names `TupleToIntervalTest.cs`. The ANTLR parser keeps its own job, `GrammarUpToDate.yml`, because it needs a Java runtime where this needs a dotnet tool -- so neither goes red for the other's reason. Part of #1034.
Member
Author
|
Its job is done: the gate went red on the intended step and named the file. Evidence linked on #1124. |
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.
Not for merge. This is acceptance criterion 1 of #1034, which asks that the gate be "demonstrated by pushing exactly that and showing the red".
The only change over #1124 is one line of
Sources/Utils/Utils/TupleToIntervalTest.txt— a template edited without regenerating its output. Expected: Generated Files Up To Date fails, namingSources/Tests/UnitTests/Convenience/TupleToIntervalTest.csand printing the diff.Will be closed once it has gone red.