Skip to content
Open
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
1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Compiler.Service/11.0.200.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* A project reusing cached framework imports is checked with its own `--pathmap` instead of the map of the project that filled the cache, so the ranges of its in-memory reference data name its real files. ([Issue #20474](https://github.com/dotnet/fsharp/issues/20474), [PR #20476](https://github.com/dotnet/fsharp/pull/20476))
* Split Linux CoreCLR CI into two parallel test batches to reduce test turnaround time. ([PR #20587](https://github.com/dotnet/fsharp/pull/20587))
* Fix `NativePtr.stackalloc` used inside the `with` handler, filter or `finally` block of a `try` expression producing an assembly that throws `InvalidProgramException` at method load. Direct or mandatory-inline allocations are now reported at compile time as error FS3924; calls to non-inline allocation helpers, including handler-local helpers, remain legal and retain their method boundary during inlining and let-binding elimination. ([Issue #20295](https://github.com/dotnet/fsharp/issues/20295), [PR #20491](https://github.com/dotnet/fsharp/pull/20491))
* Correct FS3880 guidance in the compiler and F# Interactive to identify .NET SDK 10.0.1xx as the last compatible SDK feature band for out-of-support language versions. ([Issue #20666](https://github.com/dotnet/fsharp/issues/20666), [PR #20795](https://github.com/dotnet/fsharp/pull/20795))
* Preserve SRTP code generation when extension constraint solutions are disabled. ([PR #20773](https://github.com/dotnet/fsharp/pull/20773))
* `FsiEvaluationSession.EvalInteraction` and `EvalInteractionNonThrowing` evaluate every `;;`-separated interaction in the text they are given, as their documentation has always said, instead of silently discarding everything after the first. ([PR #20396](https://github.com/dotnet/fsharp/pull/20396))
* Prevent `InvalidProgramException` when runtime async awaits a `Task<T>` upcast to `Task`, including through `ConfigureAwait`. ([Issue #20686](https://github.com/dotnet/fsharp/issues/20686), [PR #20726](https://github.com/dotnet/fsharp/pull/20726))
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1749,7 +1749,7 @@ featureExtensionConstraintSolutions,"Allow extension members to participate in S
featureErrorOnBitwiseOpsOnNonIntegralEnums,"Error when bitwise operators are used on enums whose underlying type is not an integer type (e.g. char)."
featureOptimizeClosureIfNotInlined,"optimize a curried closure argument when its inlining fails"
featureRequireNamedArguments,"enforce named arguments at call sites of methods annotated with RequireNamedArgumentsAttribute"
3880,optsLangVersionOutOfSupport,"Language version '%s' is out of support. The last .NET SDK supporting it is available at https://dotnet.microsoft.com/en-us/download/dotnet/%s"
3880,optsLangVersionOutOfSupport,"Language version '%s' is out of support. The last compatible SDK feature band is .NET SDK 10.0.1xx. Download it at https://dotnet.microsoft.com/en-us/download/dotnet/%s."
3881,optsUnrecognizedLanguageFeature,"Unrecognized language feature name: '%s'. Use a valid feature name such as 'FromEndSlicing'."
3882,lexHashElifMustBeFirst,"#elif directive must appear as the first non-whitespace character on a line"
3883,lexHashElifMustHaveIdent,"#elif directive should be immediately followed by an identifier"
Expand Down
4 changes: 2 additions & 2 deletions src/Compiler/xlf/FSComp.txt.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Compiler/xlf/FSComp.txt.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Compiler/xlf/FSComp.txt.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Compiler/xlf/FSComp.txt.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Compiler/xlf/FSComp.txt.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Compiler/xlf/FSComp.txt.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Compiler/xlf/FSComp.txt.ko.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Compiler/xlf/FSComp.txt.pl.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Compiler/xlf/FSComp.txt.pt-BR.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Compiler/xlf/FSComp.txt.ru.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Compiler/xlf/FSComp.txt.tr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Compiler/xlf/FSComp.txt.zh-Hans.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Compiler/xlf/FSComp.txt.zh-Hant.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,39 @@ open FSharp.Test.Compiler

module langversion =

[<Theory>]
[<InlineData("4.6")>]
[<InlineData("4.7")>]
[<InlineData("5")>]
[<InlineData("5.0")>]
[<InlineData("6")>]
[<InlineData("6.0")>]
[<InlineData("7")>]
[<InlineData("7.0")>]
let ``Issue 20666 - fsc unsupported langversion identifies the last compatible SDK feature band`` (version: string) =
let expected =
$"Language version '{version}' is out of support. The last compatible SDK feature band is .NET SDK 10.0.1xx. Download it at https://dotnet.microsoft.com/en-us/download/dotnet/10.0."

FSharp """printfn "Hello, World" """
|> asExe
|> withOptions [$"--langversion:{version}"]
|> compile
|> shouldFail
|> withErrorCode 3880
|> withDiagnosticMessage expected
|> ignore

[<Theory>]
[<InlineData("default")>]
[<InlineData("latest")>]
let ``fsc langversion supports named selectors`` (version: string) =
FSharp """printfn "Hello, World" """
|> asExe
|> withOptions [$"--langversion:{version}"]
|> compile
|> shouldSucceed
|> ignore

[<Fact>]
let ``fsc langversion is case-insensitive - --langversion:pRevIew``() =
FSharp """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,44 @@ open FSharp.Test.Compiler

module Langversion =

[<Theory>]
[<InlineData("4.6")>]
[<InlineData("4.7")>]
[<InlineData("5")>]
[<InlineData("5.0")>]
[<InlineData("6")>]
[<InlineData("6.0")>]
[<InlineData("7")>]
[<InlineData("7.0")>]
let ``Issue 20666 - fsi unsupported langversion identifies the last compatible SDK feature band`` (version: string) =
let expected =
$"Language version '{version}' is out of support. The last compatible SDK feature band is .NET SDK 10.0.1xx. Download it at https://dotnet.microsoft.com/en-us/download/dotnet/10.0."

let result = runFsiProcess ["--nologo"; "--exec"; $"--langversion:{version}"]
Assert.NotEqual(0, result.ExitCode)
Assert.Contains("error FS3880:", result.StdErr)
Assert.Contains(expected, result.StdErr)
Assert.DoesNotContain("10.0.2", result.StdErr)
Assert.DoesNotContain("10.0.4", result.StdErr)

[<Theory>]
[<InlineData("8")>]
[<InlineData("8.0")>]
[<InlineData("9.0")>]
[<InlineData("10.0")>]
[<InlineData("11.0")>]
[<InlineData("11.2")>]
[<InlineData("default")>]
[<InlineData("latest")>]
[<InlineData("latestmajor")>]
[<InlineData("preview")>]
[<InlineData("pRevIew")>]
[<InlineData("laTestmaJor")>]
let ``fsi langversion supports numeric versions and named selectors`` (version: string) =
let result = runFsiProcess ["--nologo"; "--exec"; $"--langversion:{version}"]
Assert.Equal(0, result.ExitCode)
Assert.DoesNotContain("FS3880", result.StdErr)

// Test: --langversion:4.5 - unrecognized version
// Original: SOURCE=badlangversion.fsx SCFLAGS=" --langversion:4.5"
[<Fact>]
Expand Down
Loading