Skip to content

Commit

Permalink
Update FSAC to use FCS and FSharp.Core from 9.0.100, as well as updat…
Browse files Browse the repository at this point in the history
…ed Analyzer SDK (#1324)

Co-authored-by: Chet Husk <chusk3@gmail.com>
  • Loading branch information
TheAngryByrd and baronfel authored Nov 24, 2024
1 parent 258fbc5 commit c9e2df1
Show file tree
Hide file tree
Showing 24 changed files with 576 additions and 537 deletions.
73 changes: 33 additions & 40 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,34 @@
{
"version": 1,
"isRoot": true,
"tools": {
"paket": {
"version": "8.0.3",
"commands": [
"paket"
],
"rollForward": false
},
"dotnet-reportgenerator-globaltool": {
"version": "5.3.8",
"commands": [
"reportgenerator"
],
"rollForward": false
},
"fantomas": {
"version": "6.3.11",
"commands": [
"fantomas"
],
"rollForward": false
},
"fsharp-analyzers": {
"version": "0.27.0",
"commands": [
"fsharp-analyzers"
],
"rollForward": false
},
"telplin": {
"version": "0.9.6",
"commands": [
"telplin"
],
"rollForward": false
}
}
{
"version": 1,
"isRoot": true,
"tools": {
"paket": {
"version": "9.0.2",
"commands": [
"paket"
],
"rollForward": false
},
"dotnet-reportgenerator-globaltool": {
"version": "5.3.8",
"commands": [
"reportgenerator"
],
"rollForward": false
},
"fsharp-analyzers": {
"version": "0.28.0",
"commands": [
"fsharp-analyzers"
],
"rollForward": false
},
"telplin": {
"version": "0.9.6",
"commands": [
"telplin"
],
"rollForward": false
}
}
}
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ fsharp_max_function_binding_width=80
fsharp_max_value_binding_width=80

[src/FsAutoComplete/CodeFixes/*.fs]
fsharp_experimental_keep_indent_in_branch = true
fsharp_experimental_keep_indent_in_branch = true

[test/**/*.expected]
trim_trailing_whitespace = false
insert_final_newline = false
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ configure.sh text eol=lf
*.fs text eol=lf
*.fsi text eol=lf
*.fsx text eol=lf

*.expected text eol=lf
51 changes: 19 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
env:
TEST_TIMEOUT_MINUTES: 40
FSAC_TEST_DEFAULT_TIMEOUT : 120000 #ms, individual test timeouts
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 # needed to allow .NET 8 RCs to participate in rollforward as expected.
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 # needed to allow .NET RCs to participate in rollforward as expected.
timeout-minutes: 40 # we have a locking issue, so cap the runs at ~20m to account for varying build times, etc
strategy:
matrix:
os:
- windows-latest
- macos-13 # using 13 because it's a bigger machine, and latest is still pointing to 12
- ubuntu-latest
dotnet-version: ["", "6.0.x", "7.0.x", "8.0.x"]
dotnet-version: ["8.0.x", "9.0.x"]
use-transparent-compiler:
- "TransparentCompiler"
- "BackgroundCompiler"
Expand All @@ -35,34 +35,20 @@ jobs:
# - "ProjectGraph" # this is disable because it just adds too much time to the build
# these entries will mesh with the above combinations
include:
# just use what's in the repo
- global-json-file: "global.json"
dotnet-version: ""
include-prerelease: false
label: "repo global.json"
build_net7: false
test_tfm: net6.0
# latest 6.0
- global-json-file: "global.json"
dotnet-version: "6.0.x"
include-prerelease: false
label: "6.0"
build_net7: false
test_tfm: net6.0
# latest 7.0
- global-json-file: "global.json"
dotnet-version: "7.0.x"
include-prerelease: true
label: "7.0"
build_net7: true
test_tfm: net7.0
# latest 8.0
- global-json-file: "global.json"
dotnet-version: "8.0.x"
include-prerelease: true
include-prerelease: false
label: "8.0"
build_net8: true
build_net9: false
test_tfm: net8.0
# latest 9.0
- global-json-file: "global.json"
dotnet-version: "9.0.x"
include-prerelease: true
label: "9.0"
build_net9: true
test_tfm: net9.0
fail-fast: false # we have timing issues on some OS, so we want them all to run

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

# setup .NET per test session
- name: Setup .NET
id : setup-dotnet
uses: actions/setup-dotnet@v3
with:
include-prerelease: ${{ matrix.include-prerelease }}
global-json-file: ${{ matrix.global-json-file }}
dotnet-version: ${{ matrix.dotnet-version }}

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

- name: Create global.json
run: dotnet new globaljson --sdk-version '${{ steps.setup-dotnet.outputs.dotnet-version }}' --roll-forward latestMinor

# let's make sure we're on the version we think we are.
- name: Announce .NET version
run: dotnet --info
Expand All @@ -96,6 +84,7 @@ jobs:
run: dotnet tool restore

- name: Check format
continue-on-error: true
run: dotnet fantomas --check build.fsx src
env:
DOTNET_ROLL_FORWARD: LatestMajor
Expand All @@ -108,15 +97,13 @@ jobs:
- name: Run Build
run: dotnet build -c Release
env:
BuildNet7: ${{ matrix.build_net7 }}
BuildNet8: ${{ matrix.build_net8 }}
BuildNet9: ${{ matrix.build_net9 }}

- name: Run and report tests
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
working-directory: test/FsAutoComplete.Tests.Lsp
env:
BuildNet7: ${{ matrix.build_net7 }}
BuildNet8: ${{ matrix.build_net8 }}
BuildNet9: ${{ matrix.build_net9 }}
USE_TRANSPARENT_COMPILER: ${{ matrix.use-transparent-compiler }}
USE_WORKSPACE_LOADER: ${{ matrix.workspace-loader }}

Expand All @@ -133,7 +120,7 @@ jobs:
run: dotnet tool restore

- name: Run analyzers
run: dotnet build -t:AnalyzeSolution -p:TargetFramework=net6.0
run: dotnet build -t:AnalyzeSolution -p:TargetFramework=net8.0

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
9.0.x
include-prerelease: true

- name: remove global.json so that 7.0 builds
Expand All @@ -30,7 +29,7 @@ jobs:
- name: Run Build
run: dotnet pack -c Release -o ./bin
env:
BuildNet8: true
BuildNet9: true

- name: Get Changelog Entry
id: changelog_reader
Expand Down
9 changes: 7 additions & 2 deletions .paket/Paket.Restore.targets
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,15 @@
<Splits>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length)</Splits>
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
<Reference>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[2])</Reference>
<AllPrivateAssets>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])</AllPrivateAssets>
<CopyLocal Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 6">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal>
<OmitContent Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 7">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6])</OmitContent>
<ImportTargets Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 8">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7])</ImportTargets>
<Aliases Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 9">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[8])</Aliases>
</PaketReferencesFileLinesInfo>
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
<PackageReference Condition=" '$(ManagePackageVersionsCentrally)' != 'true' Or '%(PaketReferencesFileLinesInfo.Reference)' == 'Direct' " Include="%(PaketReferencesFileLinesInfo.PackageName)">
<Version Condition=" '$(ManagePackageVersionsCentrally)' != 'true' ">%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
<PrivateAssets Condition=" ('%(PaketReferencesFileLinesInfo.AllPrivateAssets)' == 'true') Or ('$(PackAsTool)' == 'true') ">All</PrivateAssets>
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.CopyLocal) == 'false' or %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.OmitContent) == 'true'">$(ExcludeAssets);contentFiles</ExcludeAssets>
Expand All @@ -252,6 +253,10 @@
<AllowExplicitVersion>true</AllowExplicitVersion>

</PackageReference>

<PackageVersion Include="%(PaketReferencesFileLinesInfo.PackageName)">
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
</PackageVersion>
</ItemGroup>

<PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<ChangelogFile>$(MSBuildThisFileDirectory)CHANGELOG.md</ChangelogFile>
<!-- Only the tool package is packable -->
<IsPackable>false</IsPackable>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>

</Project>
3 changes: 2 additions & 1 deletion benchmarks/benchmarks.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(BuildNet9)' == 'true'">net8.0;net9.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="SourceTextBenchmarks.fs" />
Expand Down
8 changes: 4 additions & 4 deletions paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version 7.2.1

framework: netstandard2.0, netstandard2.1, net6.0, net7.0, net8.0
framework: netstandard2.0, netstandard2.1, net6.0, net7.0, net8.0, net9.0

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

nuget BenchmarkDotNet
nuget Fantomas.Client >= 0.9
nuget FSharp.Compiler.Service >= 43.8.300
nuget FSharp.Compiler.Service >= 43.9
nuget Ionide.Analyzers
nuget FSharp.Analyzers.Build
nuget Ionide.ProjInfo >= 0.65.0
Expand All @@ -34,7 +34,7 @@ nuget Serilog.Sinks.Async >= 1.5
nuget Destructurama.FSharp
nuget FSharp.UMX >= 1.1
nuget FSharp.Formatting >= 14.0
nuget FsToolkit.ErrorHandling.TaskResult >= 4.4 framework: netstandard2.1 ,net6.0, net7.0, net8.0
nuget FsToolkit.ErrorHandling.TaskResult >= 4.4 framework: netstandard2.1 ,net6.0, net7.0, net8.0, net9.0
nuget IcedTasks >= 0.11.7
nuget FSharpx.Async >= 1.14
nuget CliWrap >= 3.0
Expand All @@ -53,7 +53,7 @@ nuget Microsoft.Extensions.Caching.Memory
nuget OpenTelemetry.Api >= 1.3.2
nuget OpenTelemetry.Exporter.OpenTelemetryProtocol >= 1.3.2 # 1.4 bumps to 7.0 versions of System.Diagnostics libs, so can't use it
nuget OpenTelemetry.Instrumentation.Runtime
nuget LinkDotNet.StringBuilder
nuget LinkDotNet.StringBuilder 1.18
nuget CommunityToolkit.HighPerformance
nuget System.Security.Cryptography.Pkcs
nuget System.Net.Http
Expand Down
Loading

0 comments on commit c9e2df1

Please sign in to comment.