Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions BREAKING-CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,44 @@ read first.
| **silent** | two integrals | answered correctly | unevaluated — a deliberate loss |
| **silent** | `k/(a x^2 + c)` and `k/sqrt(a x^2 + c)` for symbolic `a` | `NaN` | a piecewise on the sign of the discriminant |
| loud | `Compile` over a missing variable | `KeyNotFoundException` | `UncompilableNodeException` |
| loud | the target frameworks | `net7.0;netstandard2.0` | `netstandard2.0;net8.0;net10.0` |

---

## Target frameworks

`net7.0` is replaced by `net8.0` and `net10.0`. `netstandard2.0` is unchanged, so consumers on
.NET Framework and the older runtimes are unaffected.

| | was | is |
|---|---|---|
| `TargetFrameworks` | `net7.0;netstandard2.0` | `netstandard2.0;net8.0;net10.0` |

.NET 7 left support in May 2024, so the old list named one framework nobody should still be
targeting and no supported modern one. A consumer on net8.0 or net10.0 previously resolved the
`netstandard2.0` asset and silently lost the generic-math surface with it; they now get a real
target.

**What breaks.** Anything that pins the framework of its reference:

```xml
<ProjectReference Include="...\AngouriMath.csproj">
<SetTargetFramework>TargetFramework=net7.0</SetTargetFramework> <!-- no longer resolves -->
</ProjectReference>
```

fails with `NETSDK1005: Assets file ... doesn't have a target for 'net7.0'`. Change it to `net10.0`
or `net8.0`. This is not hypothetical -- every one of the nine measurement harnesses in this
workspace pinned `net7.0` and had to be repointed.

A consumer that references the NuGet package rather than the project picks its asset by its own
framework and needs no change, unless it targets `net7.0` itself, in which case it now resolves
`netstandard2.0` and loses the generic-math types.

**Generic math is unchanged in reach.** `Core/Entity/GenericMath` needs `INumber<T>` and so is
still compiled only into the net7.0-and-later targets -- now written as a compatibility test
rather than a literal `!= 'net7.0'`, so adding a framework does not silently drop it. Verified on
the built assemblies: present in `net8.0` and `net10.0`, absent from `netstandard2.0`.

---

Expand Down
9 changes: 7 additions & 2 deletions Sources/AngouriMath/AngouriMath.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0;net10.0</TargetFrameworks>
<PackageId>AngouriMath</PackageId>
<Product>AngouriMath</Product>
</PropertyGroup>
Expand Down Expand Up @@ -88,6 +88,11 @@
</None>

<None Include="extension.dib" Pack="true" PackagePath="interactive-extensions/dotnet" />
<Compile Remove="Core/Entity/GenericMath/**" Condition="'$(TargetFramework)' != 'net7.0'" />
<!--
Generic math needs INumber<T>, which is net7.0 and later. Written as a compatibility
test rather than a list of frameworks so that adding one to TargetFrameworks above
does not silently drop this folder from it.
-->
<Compile Remove="Core/Entity/GenericMath/**" Condition="!$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net7.0'))" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Sources/Tests/UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<ItemGroup>
<ProjectReference Include="..\..\AngouriMath\AngouriMath.csproj">
<SetTargetFramework>TargetFramework=net7.0</SetTargetFramework>
<SetTargetFramework>TargetFramework=net10.0</SetTargetFramework>
</ProjectReference>
</ItemGroup>

Expand Down
Loading