Skip to content

Commit c9e2df1

Browse files
Update FSAC to use FCS and FSharp.Core from 9.0.100, as well as updated Analyzer SDK (#1324)
Co-authored-by: Chet Husk <[email protected]>
1 parent 258fbc5 commit c9e2df1

24 files changed

+576
-537
lines changed

.config/dotnet-tools.json

Lines changed: 33 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,34 @@
1-
{
2-
"version": 1,
3-
"isRoot": true,
4-
"tools": {
5-
"paket": {
6-
"version": "8.0.3",
7-
"commands": [
8-
"paket"
9-
],
10-
"rollForward": false
11-
},
12-
"dotnet-reportgenerator-globaltool": {
13-
"version": "5.3.8",
14-
"commands": [
15-
"reportgenerator"
16-
],
17-
"rollForward": false
18-
},
19-
"fantomas": {
20-
"version": "6.3.11",
21-
"commands": [
22-
"fantomas"
23-
],
24-
"rollForward": false
25-
},
26-
"fsharp-analyzers": {
27-
"version": "0.27.0",
28-
"commands": [
29-
"fsharp-analyzers"
30-
],
31-
"rollForward": false
32-
},
33-
"telplin": {
34-
"version": "0.9.6",
35-
"commands": [
36-
"telplin"
37-
],
38-
"rollForward": false
39-
}
40-
}
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"paket": {
6+
"version": "9.0.2",
7+
"commands": [
8+
"paket"
9+
],
10+
"rollForward": false
11+
},
12+
"dotnet-reportgenerator-globaltool": {
13+
"version": "5.3.8",
14+
"commands": [
15+
"reportgenerator"
16+
],
17+
"rollForward": false
18+
},
19+
"fsharp-analyzers": {
20+
"version": "0.28.0",
21+
"commands": [
22+
"fsharp-analyzers"
23+
],
24+
"rollForward": false
25+
},
26+
"telplin": {
27+
"version": "0.9.6",
28+
"commands": [
29+
"telplin"
30+
],
31+
"rollForward": false
32+
}
33+
}
4134
}

.editorconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@ fsharp_max_function_binding_width=80
2525
fsharp_max_value_binding_width=80
2626

2727
[src/FsAutoComplete/CodeFixes/*.fs]
28-
fsharp_experimental_keep_indent_in_branch = true
28+
fsharp_experimental_keep_indent_in_branch = true
29+
30+
[test/**/*.expected]
31+
trim_trailing_whitespace = false
32+
insert_final_newline = false

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ configure.sh text eol=lf
2525
*.fs text eol=lf
2626
*.fsi text eol=lf
2727
*.fsx text eol=lf
28+
29+
*.expected text eol=lf

.github/workflows/build.yml

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818
env:
1919
TEST_TIMEOUT_MINUTES: 40
2020
FSAC_TEST_DEFAULT_TIMEOUT : 120000 #ms, individual test timeouts
21-
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 # needed to allow .NET 8 RCs to participate in rollforward as expected.
21+
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 # needed to allow .NET RCs to participate in rollforward as expected.
2222
timeout-minutes: 40 # we have a locking issue, so cap the runs at ~20m to account for varying build times, etc
2323
strategy:
2424
matrix:
2525
os:
2626
- windows-latest
2727
- macos-13 # using 13 because it's a bigger machine, and latest is still pointing to 12
2828
- ubuntu-latest
29-
dotnet-version: ["", "6.0.x", "7.0.x", "8.0.x"]
29+
dotnet-version: ["8.0.x", "9.0.x"]
3030
use-transparent-compiler:
3131
- "TransparentCompiler"
3232
- "BackgroundCompiler"
@@ -35,34 +35,20 @@ jobs:
3535
# - "ProjectGraph" # this is disable because it just adds too much time to the build
3636
# these entries will mesh with the above combinations
3737
include:
38-
# just use what's in the repo
39-
- global-json-file: "global.json"
40-
dotnet-version: ""
41-
include-prerelease: false
42-
label: "repo global.json"
43-
build_net7: false
44-
test_tfm: net6.0
45-
# latest 6.0
46-
- global-json-file: "global.json"
47-
dotnet-version: "6.0.x"
48-
include-prerelease: false
49-
label: "6.0"
50-
build_net7: false
51-
test_tfm: net6.0
52-
# latest 7.0
53-
- global-json-file: "global.json"
54-
dotnet-version: "7.0.x"
55-
include-prerelease: true
56-
label: "7.0"
57-
build_net7: true
58-
test_tfm: net7.0
5938
# latest 8.0
6039
- global-json-file: "global.json"
6140
dotnet-version: "8.0.x"
62-
include-prerelease: true
41+
include-prerelease: false
6342
label: "8.0"
64-
build_net8: true
43+
build_net9: false
6544
test_tfm: net8.0
45+
# latest 9.0
46+
- global-json-file: "global.json"
47+
dotnet-version: "9.0.x"
48+
include-prerelease: true
49+
label: "9.0"
50+
build_net9: true
51+
test_tfm: net9.0
6652
fail-fast: false # we have timing issues on some OS, so we want them all to run
6753

6854
runs-on: ${{ matrix.os }}
@@ -78,16 +64,18 @@ jobs:
7864

7965
# setup .NET per test session
8066
- name: Setup .NET
67+
id : setup-dotnet
8168
uses: actions/setup-dotnet@v3
8269
with:
83-
include-prerelease: ${{ matrix.include-prerelease }}
84-
global-json-file: ${{ matrix.global-json-file }}
8570
dotnet-version: ${{ matrix.dotnet-version }}
8671

8772
# remove global.json so that the env configuration takes precedence
8873
- name: Purge global.json
8974
run: rm global.json
9075

76+
- name: Create global.json
77+
run: dotnet new globaljson --sdk-version '${{ steps.setup-dotnet.outputs.dotnet-version }}' --roll-forward latestMinor
78+
9179
# let's make sure we're on the version we think we are.
9280
- name: Announce .NET version
9381
run: dotnet --info
@@ -96,6 +84,7 @@ jobs:
9684
run: dotnet tool restore
9785

9886
- name: Check format
87+
continue-on-error: true
9988
run: dotnet fantomas --check build.fsx src
10089
env:
10190
DOTNET_ROLL_FORWARD: LatestMajor
@@ -108,15 +97,13 @@ jobs:
10897
- name: Run Build
10998
run: dotnet build -c Release
11099
env:
111-
BuildNet7: ${{ matrix.build_net7 }}
112-
BuildNet8: ${{ matrix.build_net8 }}
100+
BuildNet9: ${{ matrix.build_net9 }}
113101

114102
- name: Run and report tests
115103
run: dotnet test -c Release -f ${{ matrix.test_tfm }} --no-restore --no-build --logger "console;verbosity=normal" --logger GitHubActions /p:AltCover=true /p:AltCoverAssemblyExcludeFilter="System.Reactive|FSharp.Compiler.Service|Ionide.ProjInfo|FSharp.Analyzers|Analyzer|Humanizer|FSharp.Core|FSharp.DependencyManager" -- Expecto.fail-on-focused-tests=true --blame-hang --blame-hang-timeout 1m
116104
working-directory: test/FsAutoComplete.Tests.Lsp
117105
env:
118-
BuildNet7: ${{ matrix.build_net7 }}
119-
BuildNet8: ${{ matrix.build_net8 }}
106+
BuildNet9: ${{ matrix.build_net9 }}
120107
USE_TRANSPARENT_COMPILER: ${{ matrix.use-transparent-compiler }}
121108
USE_WORKSPACE_LOADER: ${{ matrix.workspace-loader }}
122109

@@ -133,7 +120,7 @@ jobs:
133120
run: dotnet tool restore
134121

135122
- name: Run analyzers
136-
run: dotnet build -t:AnalyzeSolution -p:TargetFramework=net6.0
123+
run: dotnet build -t:AnalyzeSolution -p:TargetFramework=net8.0
137124

138125
- name: Upload SARIF file
139126
uses: github/codeql-action/upload-sarif@v2

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ jobs:
1717
with:
1818
dotnet-version: |
1919
8.0.x
20-
7.0.x
21-
6.0.x
20+
9.0.x
2221
include-prerelease: true
2322

2423
- name: remove global.json so that 7.0 builds
@@ -30,7 +29,7 @@ jobs:
3029
- name: Run Build
3130
run: dotnet pack -c Release -o ./bin
3231
env:
33-
BuildNet8: true
32+
BuildNet9: true
3433

3534
- name: Get Changelog Entry
3635
id: changelog_reader

.paket/Paket.Restore.targets

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,15 @@
235235
<Splits>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length)</Splits>
236236
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
237237
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
238+
<Reference>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[2])</Reference>
238239
<AllPrivateAssets>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])</AllPrivateAssets>
239240
<CopyLocal Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 6">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal>
240241
<OmitContent Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 7">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6])</OmitContent>
241242
<ImportTargets Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 8">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7])</ImportTargets>
242243
<Aliases Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 9">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[8])</Aliases>
243244
</PaketReferencesFileLinesInfo>
244-
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
245-
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
245+
<PackageReference Condition=" '$(ManagePackageVersionsCentrally)' != 'true' Or '%(PaketReferencesFileLinesInfo.Reference)' == 'Direct' " Include="%(PaketReferencesFileLinesInfo.PackageName)">
246+
<Version Condition=" '$(ManagePackageVersionsCentrally)' != 'true' ">%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
246247
<PrivateAssets Condition=" ('%(PaketReferencesFileLinesInfo.AllPrivateAssets)' == 'true') Or ('$(PackAsTool)' == 'true') ">All</PrivateAssets>
247248
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.CopyLocal) == 'false' or %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
248249
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.OmitContent) == 'true'">$(ExcludeAssets);contentFiles</ExcludeAssets>
@@ -252,6 +253,10 @@
252253
<AllowExplicitVersion>true</AllowExplicitVersion>
253254

254255
</PackageReference>
256+
257+
<PackageVersion Include="%(PaketReferencesFileLinesInfo.PackageName)">
258+
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
259+
</PackageVersion>
255260
</ItemGroup>
256261

257262
<PropertyGroup>

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<ChangelogFile>$(MSBuildThisFileDirectory)CHANGELOG.md</ChangelogFile>
1919
<!-- Only the tool package is packable -->
2020
<IsPackable>false</IsPackable>
21+
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
2122
</PropertyGroup>
2223

2324
</Project>

benchmarks/benchmarks.fsproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
5+
<TargetFrameworks>net8.0</TargetFrameworks>
6+
<TargetFrameworks Condition="'$(BuildNet9)' == 'true'">net8.0;net9.0</TargetFrameworks>
67
</PropertyGroup>
78
<ItemGroup>
89
<Compile Include="SourceTextBenchmarks.fs" />

paket.dependencies

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version 7.2.1
22

3-
framework: netstandard2.0, netstandard2.1, net6.0, net7.0, net8.0
3+
framework: netstandard2.0, netstandard2.1, net6.0, net7.0, net8.0, net9.0
44

55
source https://api.nuget.org/v3/index.json
66
# this is the FCS nightly feed, re-enable at your own risk!
@@ -10,7 +10,7 @@ storage: none
1010

1111
nuget BenchmarkDotNet
1212
nuget Fantomas.Client >= 0.9
13-
nuget FSharp.Compiler.Service >= 43.8.300
13+
nuget FSharp.Compiler.Service >= 43.9
1414
nuget Ionide.Analyzers
1515
nuget FSharp.Analyzers.Build
1616
nuget Ionide.ProjInfo >= 0.65.0
@@ -34,7 +34,7 @@ nuget Serilog.Sinks.Async >= 1.5
3434
nuget Destructurama.FSharp
3535
nuget FSharp.UMX >= 1.1
3636
nuget FSharp.Formatting >= 14.0
37-
nuget FsToolkit.ErrorHandling.TaskResult >= 4.4 framework: netstandard2.1 ,net6.0, net7.0, net8.0
37+
nuget FsToolkit.ErrorHandling.TaskResult >= 4.4 framework: netstandard2.1 ,net6.0, net7.0, net8.0, net9.0
3838
nuget IcedTasks >= 0.11.7
3939
nuget FSharpx.Async >= 1.14
4040
nuget CliWrap >= 3.0
@@ -53,7 +53,7 @@ nuget Microsoft.Extensions.Caching.Memory
5353
nuget OpenTelemetry.Api >= 1.3.2
5454
nuget OpenTelemetry.Exporter.OpenTelemetryProtocol >= 1.3.2 # 1.4 bumps to 7.0 versions of System.Diagnostics libs, so can't use it
5555
nuget OpenTelemetry.Instrumentation.Runtime
56-
nuget LinkDotNet.StringBuilder
56+
nuget LinkDotNet.StringBuilder 1.18
5757
nuget CommunityToolkit.HighPerformance
5858
nuget System.Security.Cryptography.Pkcs
5959
nuget System.Net.Http

0 commit comments

Comments
 (0)