Skip to content

Pin the language version instead of building on preview - #839

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
chore/pin-langversion-14
Aug 9, 2026
Merged

Pin the language version instead of building on preview#839
Rafael-SOWNet merged 1 commit into
masterfrom
chore/pin-langversion-14

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Collaborator

Sources/Directory.Build.props set <LangVersion>preview</LangVersion> for every project, and AngouriMath.csproj and Playground.csproj repeated it. preview means "whatever the installed SDK currently considers unreleased", so the language semantics of this repository could change between SDK patch releases with nothing in the tree to say so. For a library shipping strong-named binaries that is a dependency on a moving target.

What changed

  • C# projects pin to 14.0.

  • F# takes latest. This is not cosmetic: FSC rejects a numeric LangVersion outright.

    FSC : error FS0246: Unrecognized value '14.0' for --langversion
    

    Sources/Directory.Build.props applies to .fsproj as well, so a flat pin breaks both F# wrappers. The property is now scoped by $(MSBuildProjectExtension), and latest is the stable equivalent of the preview those projects had.

Nothing is given up

14.0 supplies everything preview did that this repository uses. Checked specifically for extension members, since #821 is considering them: a C# 14 extension(T) block compiles under <LangVersion>14.0</LangVersion> on SDK 10.0.302.

Measured

Every project that builds on Linux, built individually rather than through the solution:

project result
AngouriMath 0 errors, 0 warnings
Analyzers 0 errors
UnitTests 0 errors
AngouriMath.FSharp 0 errors
AngouriMath.Interactive 0 errors
AngouriMath.CPP.Exporting 0 errors
Playground 0 errors
Passed! - Failed: 0, Passed: 6049, Skipped: 14, Total: 6063 - UnitTests.dll (net10.0)

Two pre-existing failures this does not touch

Both were reproduced on master without this change, so neither is a regression:

  • Analyzers.CodeFixes and Analyzers.Debug fail with NETSDK1060, out of a backslash-separated ProjectReference that does not split on Linux.
  • AngouriMathPlot and GraphicExample fail with NETSDK1100 (Windows targeting on Linux), which is why the solution build cannot be used as the gate here.

🤖 Generated with Claude Code

`preview` tracks whatever the installed SDK considers unreleased, so the
semantics of the code compiled here could change between SDK patch releases
with no signal in the repository. For a library that ships strong-named
binaries that is a dependency on a moving target rather than a feature.

C# projects pin to 14.0, which supplies everything preview did that this
repository uses, including extension members. F# does not accept a numeric
LangVersion of 14.0 -- FSC rejects it with FS0246 -- so the property is now
scoped by project extension and the F# wrappers take `latest`, the stable
equivalent of what they had.

The two analyzer projects still fail to build on Linux for an unrelated
reason (NETSDK1060 out of a backslash-separated ProjectReference); that is
unchanged by this commit and was verified against master.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Rafael-SOWNet
Rafael-SOWNet merged commit 0820a2f into master Aug 9, 2026
25 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the chore/pin-langversion-14 branch August 9, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant