Pin the language version instead of building on preview - #839
Merged
Conversation
`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>
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.
Sources/Directory.Build.propsset<LangVersion>preview</LangVersion>for every project, andAngouriMath.csprojandPlayground.csprojrepeated it.previewmeans "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:FSCrejects a numeric LangVersion outright.Sources/Directory.Build.propsapplies to.fsprojas well, so a flat pin breaks both F# wrappers. The property is now scoped by$(MSBuildProjectExtension), andlatestis the stable equivalent of thepreviewthose projects had.Nothing is given up
14.0supplies everythingpreviewdid that this repository uses. Checked specifically for extension members, since #821 is considering them: a C# 14extension(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:
AngouriMathAnalyzersUnitTestsAngouriMath.FSharpAngouriMath.InteractiveAngouriMath.CPP.ExportingPlaygroundTwo pre-existing failures this does not touch
Both were reproduced on
masterwithout this change, so neither is a regression:Analyzers.CodeFixesandAnalyzers.Debugfail withNETSDK1060, out of a backslash-separatedProjectReferencethat does not split on Linux.AngouriMathPlotandGraphicExamplefail withNETSDK1100(Windows targeting on Linux), which is why the solution build cannot be used as the gate here.🤖 Generated with Claude Code