From 9a56140500bc57a80a12ef076d56a55154370e37 Mon Sep 17 00:00:00 2001 From: Rafael Vuijk Date: Sun, 9 Aug 2026 15:34:48 +0000 Subject: [PATCH] Build the samples against the source, not a package from two majors ago SampleNet5 referenced AngouriMath 1.3.0 and FSharpSample AngouriMath.FSharp 1.3.0, while every other project in the solution uses a ProjectReference. The pin did not serve the purpose a PackageReference usually has -- demonstrating what a consumer gets -- because it demonstrated neither the current source nor the current release, only January's 1.3.0. What it did do was keep the samples out of every tree-wide change: the Latexise rename swept the whole repository and silently skipped them. Both now reference the projects. SampleNet5 needed the rename applied; F# needed nothing. Running them, rather than only building them, turned up something the pin had been hiding for seven months. Both samples called integral(f, x, 1), which 1.3.0 accepted and read as integral(f, x). It has thrown FunctionArgumentCountException since 1.4.0, so both samples have been broken against the current release since January and nobody could see it. Measured across three published versions rather than inferred. They now use the two-argument form, which is what 1.3.0 turned the three-argument one into anyway, so the samples are unchanged in meaning. Both run to completion against 2.0. Co-Authored-By: Claude Opus 5 (1M context) --- .../Samples/FSharpSample/FSharpSample.fsproj | 2 +- Sources/Samples/FSharpSample/Program.fs | 2 +- Sources/Samples/SampleNet5/Program.cs | 20 +++++++++---------- Sources/Samples/SampleNet5/SampleNet5.csproj | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Sources/Samples/FSharpSample/FSharpSample.fsproj b/Sources/Samples/FSharpSample/FSharpSample.fsproj index 9db88ebe8..4aa9aa615 100644 --- a/Sources/Samples/FSharpSample/FSharpSample.fsproj +++ b/Sources/Samples/FSharpSample/FSharpSample.fsproj @@ -10,7 +10,7 @@ - + diff --git a/Sources/Samples/FSharpSample/Program.fs b/Sources/Samples/FSharpSample/Program.fs index 05884dbcf..929b51120 100644 --- a/Sources/Samples/FSharpSample/Program.fs +++ b/Sources/Samples/FSharpSample/Program.fs @@ -43,4 +43,4 @@ printfn "%O" (``lim x->0`` "sin(a x) / x") printfn "%O" (limit "x" 0 "sin(a x) / x") // LaTeX -printfn "%O" (latex "x / e + alpha + sqrt(x) + integral(y + 3, y, 1)") +printfn "%O" (latex "x / e + alpha + sqrt(x) + integral(y + 3, y)") diff --git a/Sources/Samples/SampleNet5/Program.cs b/Sources/Samples/SampleNet5/Program.cs index 82f9fec1f..3116c1718 100644 --- a/Sources/Samples/SampleNet5/Program.cs +++ b/Sources/Samples/SampleNet5/Program.cs @@ -38,24 +38,24 @@ // Solve a complicated statement WriteLine("(x - 2)(x - 3) = 0 and (x - 1)(x - 2) = 0".Solve("x").InnerSimplified.Stringize()); WriteLine("sin(a x)2 + c sin(2 a x) = c".Solve("x")); -WriteLine("(x - 6)(x + 9) >= 0".Solve("x").Latexise()); +WriteLine("(x - 6)(x + 9) >= 0".Solve("x").Latexize()); WriteLine(); // Work with sets -WriteLine("{ 1, 2 }".Latexise()); -WriteLine("[3; +oo)".Latexise()); -WriteLine("RR".Latexise()); -WriteLine("{ x : x8 + a x < 0 }".Latexise()); -WriteLine(@"A \/ B".Latexise()); -WriteLine(@"A /\ B".Latexise()); -WriteLine(@"A \ B".Latexise()); +WriteLine("{ 1, 2 }".Latexize()); +WriteLine("[3; +oo)".Latexize()); +WriteLine("RR".Latexize()); +WriteLine("{ x : x8 + a x < 0 }".Latexize()); +WriteLine(@"A \/ B".Latexize()); +WriteLine(@"A /\ B".Latexize()); +WriteLine(@"A \ B".Latexize()); WriteLine(@"{ 1, 2, 3 } \/ { 3, 5 }".Simplify()); WriteLine(@"[a; b) \/ { b }".Simplify()); WriteLine(); // Differentiate, integrate, find limits WriteLine("x2 + a x".Differentiate("x").InnerSimplified); -WriteLine("x2 + a x".Integrate("x").InnerSimplified.Latexise()); +WriteLine("x2 + a x".Integrate("x").InnerSimplified.Latexize()); WriteLine("(a x2 + b x) / (e x - h x2 - 3)".Limit("x", "+oo").InnerSimplified); WriteLine(); @@ -66,4 +66,4 @@ WriteLine(); // LaTeX -WriteLine("x ^ y + sqrt(x) + integral(sqrt(x) / a, x, 1) + derivative(sqrt(x) / a, x, 1) + limit(sqrt(x) / a, x, +oo)".Latexise()); \ No newline at end of file +WriteLine("x ^ y + sqrt(x) + integral(sqrt(x) / a, x) + derivative(sqrt(x) / a, x, 1) + limit(sqrt(x) / a, x, +oo)".Latexize()); \ No newline at end of file diff --git a/Sources/Samples/SampleNet5/SampleNet5.csproj b/Sources/Samples/SampleNet5/SampleNet5.csproj index a46a20025..90bda3d44 100644 --- a/Sources/Samples/SampleNet5/SampleNet5.csproj +++ b/Sources/Samples/SampleNet5/SampleNet5.csproj @@ -6,7 +6,7 @@ - +