Skip to content

Commit 6d4877c

Browse files
authored
Merge branch 'feature/lsp' into extension-config
2 parents 05f93b1 + 6724eff commit 6d4877c

File tree

450 files changed

+34800
-7241
lines changed

Some content is hidden

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

450 files changed

+34800
-7241
lines changed

.config/dotnet-tools.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@
4444
],
4545
"rollForward": true
4646
},
47-
"dotnet-ilverify": {
48-
"version": "9.0.0-rc.2.24473.5",
49-
"commands": [
50-
"ilverify"
51-
],
52-
"rollForward": true
53-
},
5447
"fantomas": {
5548
"version": "6.2.3",
5649
"commands": [
5750
"fantomas"
5851
],
5952
"rollForward": true
53+
},
54+
"dotnet-ilverify": {
55+
"version": "9.0.0",
56+
"commands": [
57+
"ilverify"
58+
],
59+
"rollForward": false
6060
}
6161
}
6262
}

.config/feature-lsp-branch-merge.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"merge-flow-configurations": {
3+
"main": {
4+
"MergeToBranch": "feature/lsp",
5+
"ExtraSwitches": "-QuietComments"
6+
}
7+
}
8+
}

.config/service-branch-merge.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"merge-flow-configurations": {
3+
// regular branch flow
4+
"release/dev17.13": {
5+
"MergeToBranch": "main",
6+
"ExtraSwitches": "-QuietComments"
7+
},
8+
"main": {
9+
"MergeToBranch": "release/dev17.14",
10+
"ExtraSwitches": "-QuietComments"
11+
}
12+
}
13+
}

.devcontainer/devcontainer.json

Lines changed: 3 additions & 3 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",
4+
"image": "mcr.microsoft.com/dotnet/sdk:9.0.200",
55
"features": {
6-
"ghcr.io/devcontainers/features/common-utils:2.5.1": {},
6+
"ghcr.io/devcontainers/features/common-utils:2.5.2": {},
77
"ghcr.io/devcontainers/features/git:1.3.2": {},
88
"ghcr.io/devcontainers/features/github-cli:1.0.13": {},
9-
"ghcr.io/devcontainers/features/dotnet:2.1.3": {}
9+
"ghcr.io/devcontainers/features/dotnet:2.2.0": {}
1010
},
1111
"hostRequirements": {
1212
"cpus": 2,

.fantomasignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ src/Compiler/Checking/SignatureConformance.fs
4040
src/Compiler/Checking/TypeHierarchy.fs
4141
src/Compiler/Checking/TypeRelations.fs
4242

43+
# nullness-related problems
44+
src/Compiler/Utilities/lib.fsi
45+
src/Compiler/Utilities/Cancellable.fsi
46+
src/FSharp.Core/tasks.fsi
47+
src/FSharp.Core/tasks.fs
48+
src/FSharp.Core/resumable.fs
49+
src/Compiler/DependencyManager/DependencyProvider.fs
50+
src/FSharp.Core/fslib-extra-pervasives.fs
51+
src/FSharp.Core/fslib-extra-pervasives.fsi
52+
4353
# Incorrectly formatted: https://github.com/dotnet/fsharp/pull/14645/commits/49443a67ea8a17670c8a7c80c8bdf91f82231e91 or https://github.com/fsprojects/fantomas/issues/2733
4454
# This CompilerImports.fs behavior is not fixed yet, following up in https://github.com/fsprojects/fantomas/issues/2733
4555
src/Compiler/Driver/CompilerImports.fs
@@ -122,6 +132,8 @@ src/Compiler/Driver/GraphChecking/Graph.fsi
122132
src/Compiler/Driver/GraphChecking/Graph.fs
123133

124134
src/FSharp.Compiler.LanguageServer/Common/LifecycleManager.fs
135+
src/Compiler/DependencyManager/NativeDllResolveHandler.fsi
136+
src/Compiler/DependencyManager/AssemblyResolveHandler.fsi
125137

126138
# Fantomas limitations on implementation files (to investigate)
127139

.github/ISSUE_TEMPLATE/nullness_issue.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ body:
1313
- type: markdown
1414
attributes:
1515
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.
16+
Please check at [Nullable Reference Types RFC](https://github.com/fsharp/fslang-design/blob/main/FSharp-9.0/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.
1717
Please provide a succinct description of the issue and choose 1 or more from the following categories of impact
1818
- type: checkboxes
1919
id: categories
@@ -73,4 +73,4 @@ body:
7373
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?
7474
placeholder: Possible workaround
7575
validations:
76-
required: false
76+
required: false

.github/workflows/branch-merge.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Merges any changes from servicing branches forward.
2+
3+
name: Flow servicing changes to main
4+
on:
5+
push:
6+
branches:
7+
- 'release/*'
8+
- 'main'
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
14+
jobs:
15+
servicing-flow:
16+
uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@main
17+
with:
18+
configuration_file_path: '.config/service-branch-merge.json'
19+
feature-lsp-flow:
20+
uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@main
21+
with:
22+
configuration_file_path: '.config/feature-lsp-branch-merge.json'

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,9 @@ tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstanda
129129
/tests/AheadOfTime/Trimming/output.txt
130130
*.svclog
131131
micro.exe
132-
positive.exe
132+
positive.exe
133+
/tests/FSharp.Compiler.ComponentTests/FSharpChecker/StandardError.txt
134+
/tests/FSharp.Compiler.ComponentTests/FSharpChecker/StandardOutput.txt
135+
136+
# ilverify baseline result files
137+
*.bsl.actual

DEVGUIDE.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,33 @@ Linux/macOS:
204204
export TEST_UPDATE_BSL=1
205205
```
206206

207+
## Retain Test run built artifacts
208+
209+
When investigating tests issues it is sometimes useful to examine the artifacts built when running tests. Those built using the newer test framework are usually,
210+
built in the %TEMP%\FSharp.Test.Utilities subdirectory.
211+
212+
To tell the test framework to not cleanup these files use the: FSHARP_RETAIN_TESTBUILDS environment variable
213+
214+
Windows:
215+
216+
CMD:
217+
218+
```shell
219+
set FSHARP_RETAIN_TESTBUILDS=1
220+
```
221+
222+
PowerShell:
223+
224+
```shell
225+
$env:FSHARP_RETAIN_TESTBUILDS=1
226+
```
227+
228+
Linux/macOS:
229+
230+
```shell
231+
export FSHARP_RETAIN_TESTBUILDS=1
232+
```
233+
207234
Next, run a build script build (debug or release, desktop or coreclr, depending which baselines you need to update), and test as described [above](#Testing-from-the-command-line). For example:
208235

209236
`./Build.cmd -c Release -testCoreClr` to update Release CoreCLR baselines.
@@ -216,6 +243,16 @@ or
216243
> 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.
217244
218245

246+
### Parallel execution of tests
247+
248+
Tests utilizing xUnit framework by default run in parallel. If your tests depend on some shared state or are time-critical, you can add the module to predefined `NotThreadSafeResourceCollection` to prevent parallel execution.
249+
For example:
250+
```fsharp
251+
[<Collection(nameof NotThreadSafeResourceCollection)>]
252+
module TimeCritical =
253+
```
254+
255+
219256
### Updating FCS surface area baselines
220257

221258
```bash

NuGet.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
<!-- Only specify feed for Arcade SDK (see https://github.com/Microsoft/msbuild/issues/2982) -->
77
<packageSources>
88
<clear />
9+
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
10+
<!-- Begin: Package sources from DotNet-msbuild-Trusted -->
11+
<add key="darc-pub-DotNet-msbuild-Trusted-a4ef1e9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-DotNet-msbuild-Trusted-a4ef1e90/nuget/v3/index.json" />
12+
<!-- End: Package sources from DotNet-msbuild-Trusted -->
13+
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
914
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
1015
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
1116
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ variables:
2929
# Should be 'current' release branch name, i.e. 'release/dev17.10' in dotnet/fsharp/refs/heads/main, 'release/dev17.10' in dotnet/fsharp/refs/heads/release/dev17.10 and 'release/dev17.9' in dotnet/fsharp/refs/heads/release/dev17.9
3030
# Should **never** be 'main' in dotnet/fsharp/refs/heads/main, since it will start inserting to VS twice.
3131
- name: FSharpReleaseBranchName
32-
value: release/dev17.13
32+
value: release/dev17.14
3333
# VS Insertion branch name (NOT the same as F# branch)
3434
# Should be previous release branch or 'main' in 'main' and 'main' in release branch
3535
# (since for all *new* release branches we insert into VS main and for all *previous* releases we insert into corresponding VS release),
@@ -88,7 +88,7 @@ extends:
8888
# Signed build #
8989
#-------------------------------------------------------------------------------------------------------------------#
9090
# Localization: we only run it for specific release branches
91-
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.13') }}:
91+
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.14') }}:
9292
- template: /eng/common/templates-official/job/onelocbuild.yml@self
9393
parameters:
9494
MirrorRepo: fsharp

buildtools/checkpackages/FSharp.Core_notshipped.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="$(MSBuildProjectDirectory)\..\..\eng\Versions.props" />
44

55
<PropertyGroup>
6-
<TargetFramework>ne87.0</TargetFramework>
6+
<TargetFramework>net9.0</TargetFramework>
77
</PropertyGroup>
88

99
<PropertyGroup>

docs/release-notes/.FSharp.Compiler.Service/9.0.200.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### Fixed
22

3+
* Fix Realsig+ generates nested closures with incorrect Generic ([Issue #17797](https://github.com/dotnet/fsharp/issues/17797), [PR #17877](https://github.com/dotnet/fsharp/pull/17877))
34
* Fix missing TailCall warning in Sequential in use scope ([PR #17927](https://github.com/dotnet/fsharp/pull/17927))
45
* Fix false negatives for passing null to "obj" arguments. Only "obj | null" can now subsume any type ([PR #17757](https://github.com/dotnet/fsharp/pull/17757))
56
* Fix internal error when calling 'AddSingleton' and other overloads only differing in generic arity ([PR #17804](https://github.com/dotnet/fsharp/pull/17804))
@@ -21,6 +22,8 @@
2122
* Completion: fix qualified completion in sequence expressions [PR #18111](https://github.com/dotnet/fsharp/pull/18111)
2223
* Symbols: try to use ValReprInfoForDisplay in Mfv.CurriedParameterGroups ([PR #18124](https://github.com/dotnet/fsharp/pull/18124))
2324
* Shim/file system: fix leaks of the shim [PR #18144](https://github.com/dotnet/fsharp/pull/18144)
25+
* fsi: fix auto-loading of script file inside NuGet package ([PR #18177](https://github.com/dotnet/fsharp/pull/18177))
26+
* Fix for `Obsolete` attribute warning/error not taken into account when used with a unit of measure [PR #18182](https://github.com/dotnet/fsharp/pull/18182)
2427

2528
### Added
2629

@@ -52,8 +55,8 @@
5255
* Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag ([PR #17871](https://github.com/dotnet/fsharp/pull/17871))
5356
* CheckAndThrow can be invoked only from within Cancellable context ([PR #18037](https://github.com/dotnet/fsharp/pull/18037))
5457
* Make ILTypeDef base type calculation lazy. ([PR #18005](https://github.com/dotnet/fsharp/pull/18005))
55-
* "#if" directive around nullness removed from src/Compiler/TypedTree/TypedTreePickle.fs and refactored. ([PR #18203](https://github.com/dotnet/fsharp/pull/18203))
58+
* Removed redundant hash directives around nullness syntax ([Issue #18601](https://github.com/dotnet/fsharp/issues/18061), [PR #18203](https://github.com/dotnet/fsharp/pull/18203), [PR #18207](https://github.com/dotnet/fsharp/pull/18207))
5659

5760
### Breaking Changes
5861

59-
* Aliasing `StructAttribute` will now produce a warning (part of [Language suggestion #1136](https://github.com/fsharp/fslang-suggestions/issues/1136), [PR #18098](https://github.com/dotnet/fsharp/pull/18098))
62+
* Aliasing `StructAttribute` will now produce a warning (part of [Language suggestion #1136](https://github.com/fsharp/fslang-suggestions/issues/1136), [PR #18098](https://github.com/dotnet/fsharp/pull/18098))
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
### Fixed
2+
3+
* Fix missing TailCall warning in Sequential in use scope ([PR #17927](https://github.com/dotnet/fsharp/pull/17927))
4+
* Fix false negatives for passing null to "obj" arguments. Only "obj | null" can now subsume any type ([PR #17757](https://github.com/dotnet/fsharp/pull/17757))
5+
* Fix internal error when calling 'AddSingleton' and other overloads only differing in generic arity ([PR #17804](https://github.com/dotnet/fsharp/pull/17804))
6+
* Fix extension methods support for non-reference system assemblies ([PR #17799](https://github.com/dotnet/fsharp/pull/17799))
7+
* Ensure `frameworkTcImportsCache` mutations are threadsafe. ([PR #17795](https://github.com/dotnet/fsharp/pull/17795))
8+
* Disallow abstract member with access modifiers in sig file. ([PR #17802](https://github.com/dotnet/fsharp/pull/17802))
9+
* Fix concurrency issue in `ILPreTypeDefImpl` ([PR #17812](https://github.com/dotnet/fsharp/pull/17812))
10+
* Fix nullness inference for member val and other OO scenarios ([PR #17845](https://github.com/dotnet/fsharp/pull/17845))
11+
* Fix internal error when analyzing incomplete inherit member ([PR #17905](https://github.com/dotnet/fsharp/pull/17905))
12+
* Add warning when downcasting from nullable type to non-nullable ([PR #17965](https://github.com/dotnet/fsharp/pull/17965))
13+
* Fix missing nullness warning in case of method resolution multiple candidates ([PR #17917](https://github.com/dotnet/fsharp/pull/17918))
14+
* Fix failure to use bound values in `when` clauses of `try-with` in `seq` expressions ([PR #17990](https://github.com/dotnet/fsharp/pull/17990))
15+
* Fix locals allocating for the special `copyOfStruct` defensive copy ([PR #18025](https://github.com/dotnet/fsharp/pull/18025))
16+
* Fix lowering of computed array expressions when the expression consists of a simple mapping from a `uint64` or `unativeint` array. [PR #18081](https://github.com/dotnet/fsharp/pull/18081)
17+
* Add missing nullable-metadata for C# consumers of records,exceptions and DU subtypes generated from F# code. [PR #18079](https://github.com/dotnet/fsharp/pull/18079)
18+
* Reduce excess memory usage in TransparentCompiler. [PR #17543](https://github.com/dotnet/fsharp/pull/17543)
19+
* Fix a race condition in file book keeping in the compiler service ([#18008](https://github.com/dotnet/fsharp/pull/18008))
20+
* Fix trimming '%' characters when lowering interpolated string to a concat call [PR #18123](https://github.com/dotnet/fsharp/pull/18123)
21+
* Completion: fix qualified completion in sequence expressions [PR #18111](https://github.com/dotnet/fsharp/pull/18111)
22+
* Symbols: try to use ValReprInfoForDisplay in Mfv.CurriedParameterGroups ([PR #18124](https://github.com/dotnet/fsharp/pull/18124))
23+
* Shim/file system: fix leaks of the shim [PR #18144](https://github.com/dotnet/fsharp/pull/18144)
24+
25+
### Added
26+
27+
* Let `dotnet fsi --help` print a link to the documentation website. ([PR #18006](https://github.com/dotnet/fsharp/pull/18006))
28+
* Deprecate places where `seq` can be omitted. ([Language suggestion #1033](https://github.com/fsharp/fslang-suggestions/issues/1033), [PR #17772](https://github.com/dotnet/fsharp/pull/17772))
29+
* Support literal attribute on decimals ([PR #17769](https://github.com/dotnet/fsharp/pull/17769))
30+
* Added type conversions cache, only enabled for compiler runs, guarded by language version preview ([PR #17668](https://github.com/dotnet/fsharp/pull/17668))
31+
* Added project property ParallelCompilation which turns on graph based type checking, parallel ILXGen and parallel optimization. By default on for users of langversion=preview ([PR #17948](https://github.com/dotnet/fsharp/pull/17948))
32+
* Adding warning when consuming generic method returning T|null for types not supporting nullness (structs,anons,tuples) ([PR #18057](https://github.com/dotnet/fsharp/pull/18057))
33+
* Sink: report SynPat.ArrayOrList type ([PR #18127](https://github.com/dotnet/fsharp/pull/18127))
34+
* Show the default value of compiler options ([PR #18054](https://github.com/dotnet/fsharp/pull/18054))
35+
* Support ValueOption + Struct attribute as optional parameter for methods ([Language suggestion #1136](https://github.com/fsharp/fslang-suggestions/issues/1136), [PR #18098](https://github.com/dotnet/fsharp/pull/18098))
36+
* Cancellable: add safer APIs to check the token ([PR #18175](https://github.com/dotnet/fsharp/pull/18175))
37+
38+
### Changed
39+
40+
* Make ILTypeDef interface impls calculation lazy. ([PR #17392](https://github.com/dotnet/fsharp/pull/17392))
41+
* Remove non-functional useSyntaxTreeCache option. ([PR #17768](https://github.com/dotnet/fsharp/pull/17768))
42+
* Better ranges for CE `let!` and `use!` error reporting. ([PR #17712](https://github.com/dotnet/fsharp/pull/17712))
43+
* Better ranges for CE `do!` error reporting. ([PR #17779](https://github.com/dotnet/fsharp/pull/17779))
44+
* Better ranges for CE `return, yield, return! and yield!` error reporting. ([PR #17792](https://github.com/dotnet/fsharp/pull/17792))
45+
* Better ranges for CE `match!`. ([PR #17789](https://github.com/dotnet/fsharp/pull/17789))
46+
* Better ranges for CE `use` error reporting. ([PR #17811](https://github.com/dotnet/fsharp/pull/17811))
47+
* Better ranges for `inherit` error reporting. ([PR #17879](https://github.com/dotnet/fsharp/pull/17879))
48+
* Better ranges for `inherit` `struct` error reporting. ([PR #17886](https://github.com/dotnet/fsharp/pull/17886))
49+
* Warn on uppercase identifiers in patterns. ([PR #15816](https://github.com/dotnet/fsharp/pull/15816))
50+
* Better ranges for `inherit` objects error reporting. ([PR #17893](https://github.com/dotnet/fsharp/pull/17893))
51+
* Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag ([PR #17871](https://github.com/dotnet/fsharp/pull/17871))
52+
* Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag ([PR #17871](https://github.com/dotnet/fsharp/pull/17871))
53+
* CheckAndThrow can be invoked only from within Cancellable context ([PR #18037](https://github.com/dotnet/fsharp/pull/18037))
54+
* Make ILTypeDef base type calculation lazy. ([PR #18005](https://github.com/dotnet/fsharp/pull/18005))
55+
* Revert EnforceAttributeTargets Feature. ([PR #18005](https://github.com/dotnet/fsharp/pull/18005))
56+
57+
### Breaking Changes
58+
59+
* Aliasing `StructAttribute` will now produce a warning (part of [Language suggestion #18298](https://github.com/fsharp/fslang-suggestions/issues/18298), [PR #18355](https://github.com/dotnet/fsharp/pull/18355))

0 commit comments

Comments
 (0)