Skip to content

Commit 2f8dce7

Browse files
authored
Merge branch 'release/dev17.12' into merges/release/dev17.11-to-release/dev17.12
2 parents be2636f + 6b652cd commit 2f8dce7

File tree

2,819 files changed

+56228
-23939
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,819 files changed

+56228
-23939
lines changed

.devcontainer/devcontainer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
22
{
33
"name": "F#",
4-
"image": "mcr.microsoft.com/dotnet/sdk:9.0.100-preview.5",
4+
"image": "mcr.microsoft.com/dotnet/sdk:9.0.100-rc.1",
55
"features": {
6-
"ghcr.io/devcontainers/features/common-utils:2.4.3": {},
7-
"ghcr.io/devcontainers/features/git:1.2.0": {},
8-
"ghcr.io/devcontainers/features/github-cli:1.0.11": {},
9-
"ghcr.io/devcontainers/features/dotnet:2.1.0": {}
6+
"ghcr.io/devcontainers/features/common-utils:2.5.1": {},
7+
"ghcr.io/devcontainers/features/git:1.3.2": {},
8+
"ghcr.io/devcontainers/features/github-cli:1.0.13": {},
9+
"ghcr.io/devcontainers/features/dotnet:2.1.3": {}
1010
},
1111
"hostRequirements": {
1212
"cpus": 2,
@@ -28,7 +28,7 @@
2828
}
2929
},
3030
"remoteEnv": {
31-
"TARGET": "net8.0"
31+
"TARGET": "net9.0"
3232
},
3333
"postCreateCommand": [ "dotnet", "build", "FSharp.Compiler.Service.sln"]
3434
}

.fantomasignore

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ vsintegration/*
1212
!vsintegration/tests/FSharp.Editor.Tests
1313
artifacts/
1414

15-
# For some reason, it tries to format files from remotes (Processing .\.git\refs\remotes\<remote>\FSComp.fsi)
15+
# For some reason, it tries to format files from remotes (Processing ./.git/refs/remotes/<remote>/FSComp.fsi)
1616
.git/
1717

1818
# Explicitly unformatted implementation
@@ -21,7 +21,7 @@ src/Compiler/Checking/AttributeChecking.fs
2121
src/Compiler/Checking/AugmentWithHashCompare.fs
2222
src/Compiler/Checking/CheckBasics.fs
2323
src/Compiler/Checking/CheckDeclarations.fs
24-
src/Compiler/Checking/CheckExpressions.fs
24+
src/Compiler/Checking/Expressions/CheckExpressions.fs
2525
src/Compiler/Checking/CheckFormatStrings.fs
2626
src/Compiler/Checking/CheckIncrementalClasses.fs
2727
src/Compiler/Checking/CheckPatterns.fs
@@ -88,6 +88,35 @@ src/FSharp.Core/Query.fs
8888
src/FSharp.Core/seqcore.fs
8989

9090

91+
# fsharp (to investigate)
92+
93+
**/TypeProviders.fsi
94+
**/tainted.fsi
95+
96+
# uses nullness features
97+
98+
**/DependencyProvider.fsi
99+
src/FSharp.Core/array.fs
100+
src/FSharp.Core/option.fsi
101+
src/FSharp.Core/option.fs
102+
src/fsi/console.fs
103+
src/FSharp.Build/FSharpCommandLineBuilder.fs
104+
105+
src/Compiler/Utilities/Activity.fs
106+
src/Compiler/Utilities/sformat.fs
107+
src/Compiler/Utilities/illib.fsi
108+
src/Compiler/Utilities/illib.fs
109+
110+
111+
src/Compiler/Utilities/NullnessShims.fs
112+
src/Compiler/Utilities/LruCache.fsi
113+
src/Compiler/Utilities/LruCache.fs
114+
src/Compiler/Utilities/HashMultiMap.fsi
115+
src/Compiler/Utilities/HashMultiMap.fs
116+
src/Compiler/Facilities/AsyncMemoize.fsi
117+
src/Compiler/Facilities/AsyncMemoize.fs
118+
src/Compiler/AbstractIL/il.fs
119+
91120
# Fantomas limitations on implementation files (to investigate)
92121

93122
src/Compiler/AbstractIL/ilwrite.fs

.git-blame-ignore-revs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1+
# Because this repository uses squash/rebase merges, commits added to a branch
2+
# referencing earlier commits in the same branch and squash/rebased merged as part of a PR
3+
# will need to be rewritten in a subsequent PR to the corresponding squashed/rebased commit SHAs.
4+
15
# Format src/Compiler/Checking/CheckComputationExpressions.fs, https://github.com/dotnet/fsharp/pull/16512
2-
603a310cdfd9902ec1d29b399377dcc9ac56235b
6+
0318afd91f38533879cc89d598e0431c312ad57e
7+
8+
# Spelling, https://github.com/dotnet/fsharp/pull/16212
9+
23e91e1322363a7e9c34baaeabbf0391c4b7eafd
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Nullness-related report
2+
title: 'Nullness issue - ....'
3+
description: Create a report related to nullable reference types handling
4+
labels: [Bug, Needs-Triage,Area-Nullness]
5+
assignees: 'T-Gro'
6+
body:
7+
- type: textarea
8+
attributes:
9+
label: Issue description
10+
description: A concise description of what you're experiencing.
11+
validations:
12+
required: true
13+
- type: markdown
14+
attributes:
15+
value: |
16+
Please check at [Nullable Reference Types RFC](https://github.com/fsharp/fslang-design/blob/main/RFCs/FS-1060-nullable-reference-types.md) if this issue isn't a known limitation, such as missing flow-control analysis after branching constructs like `if` or `while`. Also check at [existing nullness issues](https://github.com/dotnet/fsharp/issues?q=is%3Aissue+label%3AArea-Nullness+) if it hasn't been reported already.
17+
Please provide a succinct description of the issue and choose 1 or more from the following categories of impact
18+
- type: checkboxes
19+
id: categories
20+
attributes:
21+
label: Choose one or more from the following categories of impact
22+
options:
23+
- label: Unexpected nullness warning (false positive in nullness checking, code uses --checknulls and langversion:preview).
24+
- label: Missing nullness warning in a case which can produce nulls (false negative, code uses --checknulls and langversion:preview).
25+
- label: Breaking change related to older `null` constructs in code not using the checknulls switch.
26+
- label: Breaking change related to generic code and explicit type constraints (`null`, `not null`).
27+
- label: Type inference issue (i.e. code worked without type annotations before, and applying the --checknulls enforces type annotations).
28+
- label: C#/F# interop issue related to nullness metadata.
29+
- label: Other (none of the categories above apply).
30+
validations:
31+
required: true
32+
- type: dropdown
33+
id: os
34+
attributes:
35+
label: Operating System
36+
description: What operating system are you running?
37+
options:
38+
- Windows (Default)
39+
- Linux
40+
- macOS
41+
default: 0
42+
validations:
43+
required: true
44+
- type: dropdown
45+
id: dotnet-kind
46+
attributes:
47+
label: What .NET runtime/SDK kind are you seeing the issue on
48+
multiple: false
49+
options:
50+
- .NET SDK (.NET Core, .NET 5+)
51+
- .NET Framework
52+
default: 0
53+
validations:
54+
required: true
55+
- type: input
56+
id: dotnet-version
57+
attributes:
58+
label: .NET Runtime/SDK version
59+
placeholder: e.g. .NET 9 or .NET SDK 9.0.100
60+
- type: textarea
61+
attributes:
62+
label: Reproducible code snippet and actual behavior
63+
description: |
64+
Provide a small code snippet demonstrating the issue. |
65+
If referenced code is needed for the repro and cannot be shared (e.g. a private C# nuget package), try to share at least the metadata annotations from the called type+member as seen in `ilspy.exe`. C# compiler produces attributes like `[Nullable]` and `[NullableContext]`, which is what F# compiler tries to load and interpret in C#/F# interop scenarios.
66+
placeholder: Code snippet
67+
validations:
68+
required: false
69+
- type: textarea
70+
attributes:
71+
label: Possible workarounds
72+
description: |
73+
Are there any language constructs (typically pattern matching, library constructs, Null/NonNull active patterns, explicit type annotations) allowing the same logic be expressed differently in order to mitigate the experienced nullness issue?
74+
placeholder: Possible workaround
75+
validations:
76+
required: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Fixes # (issue, if applicable)
1313
>
1414
> Release notes files:
1515
> - If anything under `src/Compiler` has been changed, please make sure to make an entry in `docs/release-notes/.FSharp.Compiler.Service/<version>.md`, where `<version>` is usually "highest" one, e.g. `42.8.200`
16-
> - If language feature was added (i.e. `LanguageFeatures.fsi` was changed), please add it to `docs/releae-notes/.Language/preview.md`
16+
> - If language feature was added (i.e. `LanguageFeatures.fsi` was changed), please add it to `docs/release-notes/.Language/preview.md`
1717
> - If a change to `FSharp.Core` was made, please make sure to edit `docs/release-notes/.FSharp.Core/<version>.md` where version is "highest" one, e.g. `8.0.200`.
1818
1919
> Information about the release notes entries format can be found in the [documentation](https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html).

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,6 @@ nCrunchTemp_*
127127
tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.actual
128128
*.vsp
129129
/tests/AheadOfTime/Trimming/output.txt
130+
*.svclog
131+
micro.exe
132+
positive.exe

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
// TODO: Shall we assume that it's already been built, or build it every time we debug?
2424
"preLaunchTask": "${defaultBuildTask}",
2525
// If you have changed target frameworks, make sure to update the program p
26-
"program": "${workspaceFolder}/artifacts/bin/fsi/Debug/net8.0/fsi.dll",
26+
"program": "${workspaceFolder}/artifacts/bin/fsi/Debug/net9.0/fsi.dll",
2727
"args": [
2828
"${input:fsiArgsPrompt}"
2929
],
@@ -53,7 +53,7 @@
5353
// TODO: Shall we assume that it's already been built, or build it every time we debug?
5454
"preLaunchTask": "${defaultBuildTask}",
5555
// If you have changed target frameworks, make sure to update the program path.
56-
"program": "${workspaceFolder}/artifacts/bin/fsc/Debug/net8.0/fsc.dll",
56+
"program": "${workspaceFolder}/artifacts/bin/fsc/Debug/net9.0/fsc.dll",
5757
"args": [
5858
"--targetprofile:netstandard",
5959
"--simpleresolution",

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"Speedscope",
102102
"--",
103103
"dotnet",
104-
"${workspaceFolder}/artifacts/bin/fsi/Debug/net8.0/fsi.dll",
104+
"${workspaceFolder}/artifacts/bin/fsi/Debug/net9.0/fsi.dll",
105105
"${input:fsiArgsPrompt}"
106106
],
107107
"problemMatcher": "$msCompile",
@@ -118,7 +118,7 @@
118118
"Speedscope",
119119
"--",
120120
"dotnet",
121-
"${workspaceFolder}/artifacts/bin/fsc/Debug/net8.0/fsc.dll",
121+
"${workspaceFolder}/artifacts/bin/fsc/Debug/net9.0/fsc.dll",
122122
"--targetprofile:netstandard",
123123
"--simpleresolution",
124124
"${input:fscArgsPrompt}"

DEVGUIDE.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ To use your custom build of `Fsc`, add the `DotnetFscCompilerPath` property to y
136136

137137
```xml
138138
<PropertyGroup>
139-
<DotnetFscCompilerPath>D:\Git\fsharp\artifacts\bin\fsc\Debug\net8.0\fsc.dll</DotnetFscCompilerPath>
139+
<DotnetFscCompilerPath>D:\Git\fsharp\artifacts\bin\fsc\Debug\net9.0\fsc.dll</DotnetFscCompilerPath>
140140
</PropertyGroup>
141141
```
142142

@@ -215,6 +215,17 @@ or
215215
> **Note**
216216
> Please note, that by default, **Release** version of IL baseline tests will be running in CI, so when updating baseline (.bsl) files, make sure to add `-c Release` flag to the build command.
217217
218+
219+
### Updating FCS surface area baselines
220+
221+
```bash
222+
$env:TEST_UPDATE_BSL=1
223+
dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --filter "SurfaceAreaTest" /p:BUILDING_USING_DOTNET=true
224+
dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --filter "SurfaceAreaTest" /p:BUILDING_USING_DOTNET=true
225+
dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --filter "SurfaceAreaTest" -c Release /p:BUILDING_USING_DOTNET=true
226+
dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --filter "SurfaceAreaTest" -c Release /p:BUILDING_USING_DOTNET=true
227+
```
228+
218229
## Automated Source Code Formatting
219230

220231
Some of the code in this repository is formatted automatically by [Fantomas](https://github.com/fsprojects/fantomas). To format all files use:
@@ -331,4 +342,4 @@ See the "Debugging The Compiler" section of this [article](https://medium.com/@w
331342

332343
If you are behind a proxy server, NuGet client tool must be configured to use it:
333344

334-
See the Nuget config file documention for use with a proxy server [https://learn.microsoft.com/nuget/reference/nuget-config-file](https://learn.microsoft.com/nuget/reference/nuget-config-file)
345+
See the Nuget config file documentation for use with a proxy server [https://learn.microsoft.com/nuget/reference/nuget-config-file](https://learn.microsoft.com/nuget/reference/nuget-config-file)

Directory.Build.props

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
<LangVersion Condition="'$(FSharpLangVersion)' != ''">$(FSharpLangVersion)</LangVersion>
77
<RepoRoot Condition="'$(RepoRoot)' == ''">$(MSBuildThisFileDirectory)</RepoRoot>
88
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
9-
<FSharpNetCoreProductDefaultTargetFramework>net8.0</FSharpNetCoreProductDefaultTargetFramework>
9+
<FSharpNetCoreProductDefaultTargetFramework>net9.0</FSharpNetCoreProductDefaultTargetFramework>
10+
<IgnoreMibc Condition="'$(IgnoreMibc)' == ''">$(DotNetBuildSourceOnly)</IgnoreMibc>
1011
</PropertyGroup>
1112

1213
<!--
1314
When developers load the FSharp.Compiler.Service solution we set FSHARPCORE_USE_PACKAGE to true if it hasn't already been set to a value.
1415
This option ensures that building and testing uses the specified FSharp.Core nuget package instead of the local FSharp.Core project.
1516
We also disable arcade and reset certain artifacts and compiler paths to use default ones.
16-
All settings below can be overriden via CLI switches if needed. -->
17+
All settings below can be overridden via CLI switches if needed. -->
1718

1819
<PropertyGroup Condition="'$(SolutionName)' == 'FSharp.Compiler.Service' and '$(BUILDING_USING_DOTNET)' != 'false'">
1920
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
@@ -45,7 +46,10 @@
4546

4647
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' == 'true'">
4748
<DisableAutoSetFscCompilerPath>false</DisableAutoSetFscCompilerPath>
48-
<FSHARPCORE_USE_PACKAGE Condition="'$(FSHARPCORE_USE_PACKAGE)' == ''">true</FSHARPCORE_USE_PACKAGE>
49+
50+
<!-- TODO(vlza): This probably should be `true` once fslib with nullness ships, since shipped library is preferred by default when building this solution. -->
51+
<FSHARPCORE_USE_PACKAGE Condition="'$(FSHARPCORE_USE_PACKAGE)' == ''">false</FSHARPCORE_USE_PACKAGE>
52+
4953
<DISABLE_ARCADE Condition="'$(DISABLE_ARCADE)' == ''">true</DISABLE_ARCADE>
5054
<ArtifactsDir>$(MSBuildThisFileDirectory)artifacts/</ArtifactsDir>
5155
<OutputPath>$(ArtifactsDir)/bin/$(MSBuildProjectName)/$(Configuration)/</OutputPath>
@@ -56,6 +60,7 @@
5660
<FsYaccPath>$(ArtifactsDir)/bin/fsyacc/$(Configuration)/$(FSharpNetCoreProductDefaultTargetFramework)/$(RuntimeIdentifier)/fsyacc.dll</FsYaccPath>
5761
<DefineConstants>NO_CHECKNULLS;BUILDING_WITH_LKG;NO_NULLCHECKING_LIB_SUPPORT;$(DefineConstants)</DefineConstants>
5862
</PropertyGroup>
63+
5964
<Import Project="$(MSBuildThisFileDirectory)/eng/Versions.props" Condition="'$(DISABLE_ARCADE)' == 'true'" />
6065

6166
<Import Project="FSharpBuild.Directory.Build.props" Condition=" '$(FSharpTestCompilerVersion)' == '' " />
@@ -68,7 +73,7 @@
6873
we should also support $(NetPrevious) for all releases.
6974
This will likely include FCS and FSharp.Core as well as shipped products.
7075
Right now, it only covers products we ship (FSC and FSI), not NuGet packages. -->
71-
<When Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildFromSourceFlavor)' == 'Product'">
76+
<When Condition="'$(DotNetBuildSourceOnly)' == 'true' AND '$(DotNetBuildOrchestrator)' == 'true'">
7277
<PropertyGroup>
7378
<FSharpNetCoreProductTargetFramework>$(NetCurrent)</FSharpNetCoreProductTargetFramework>
7479
</PropertyGroup>

0 commit comments

Comments
 (0)