Skip to content

Commit 17329bd

Browse files
NumpsyTheAngryByrdbaronfel
authored
Update FSharp.Compiler.Service and FSharp.Core to the '9' versions (#222)
* Update FSharp.Compiler.Service and FSharp.Core to the '9' versions --------- Co-authored-by: Jimmy Byrd <[email protected]> Co-authored-by: Chet Husk <[email protected]>
1 parent e1630a1 commit 17329bd

File tree

13 files changed

+36
-29
lines changed

13 files changed

+36
-29
lines changed

.config/dotnet-tools.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
"version": 1,
33
"isRoot": true,
44
"tools": {
5-
"fantomas": {
6-
"version": "6.3.4",
7-
"commands": [
8-
"fantomas"
9-
]
10-
},
115
"fsdocs-tool": {
126
"version": "20.0.0",
137
"commands": [

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ jobs:
2323

2424
- name: Setup .NET
2525
uses: actions/setup-dotnet@v4
26+
with:
27+
global-json-file: 'global.json'
28+
dotnet-version: |
29+
8.x
30+
9.x
2631
2732
- name: Build
2833
run: dotnet fsi build.fsx

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ jobs:
2020

2121
- name: Setup .NET
2222
uses: actions/setup-dotnet@v4
23+
with:
24+
global-json-file: 'global.json'
25+
dotnet-version: |
26+
8.x
27+
9.x
28+
2329
2430
- name: Run Release Build
2531
run: dotnet fsi build.fsx -p ReleaseBuild

Directory.Packages.props

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
<MsBuildPackageVersion>17.2.0</MsBuildPackageVersion>
5+
<NuGetAuditMode>direct</NuGetAuditMode>
56
</PropertyGroup>
67
<ItemGroup>
78
<PackageVersion Include="CliWrap" Version="3.6.4" />
8-
<PackageVersion Include="FSharp.Core" Version="[8.0.400]" />
9-
<PackageVersion Include="FSharp.Compiler.Service" Version="[43.8.400]" />
9+
<PackageVersion Include="FSharp.Core" Version="[9.0.100]" />
10+
<PackageVersion Include="FSharp.Compiler.Service" Version="[43.9.100]" />
1011
<PackageVersion Include="Ionide.KeepAChangelog.Tasks" Version="0.1.8" PrivateAssets="all" />
1112
<PackageVersion Include="McMaster.NETCore.Plugins" Version="1.4.0" />
1213
<PackageVersion Include="Argu" Version="6.1.1" />
1314
<PackageVersion Include="Glob" Version="1.1.9" />
14-
<PackageVersion Include="Ionide.ProjInfo.ProjectSystem" Version="0.65.0" />
15+
<PackageVersion Include="Ionide.ProjInfo.ProjectSystem" Version="0.68.0" />
1516
<PackageVersion Include="Microsoft.Build" Version="$(MsBuildPackageVersion)" ExcludeAssets="runtime" />
1617
<PackageVersion Include="Microsoft.Build.Framework" Version="$(MsBuildPackageVersion)" ExcludeAssets="runtime" />
1718
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="$(MsBuildPackageVersion)" ExcludeAssets="runtime" />

build.fsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ let buildStage =
2020

2121
pipeline "Build" {
2222
restoreStage
23-
stage "lint" { run "dotnet fantomas . --check" }
23+
// TODO: can uncomment this after .NET SDK 9.0.101 releases
24+
// stage "lint" { run "dotnet fantomas . --check" }
2425
stage "build" { run "dotnet build -c Release --no-restore -maxCpuCount" }
2526
stage "test" {
2627
purgeBinLogCache ()

docs/content/Unit Testing.fsx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ index: 5
88
# Unit testing an analyzer
99
1010
To help analyzer authors testing their analyzers, there's a dedicated [testing package](https://www.nuget.org/packages/FSharp.Analyzers.SDK.Testing).
11-
It contains easy to use utility functions to create a context for the analyzer and assertion helpers.
11+
It contains easy to use utility functions to create a context for the analyzer and assertion helpers.
1212
13-
[`FSharp.Analyzers.SDK.Testing.mkOptionsFromProject`](../reference/fsharp-analyzers-sdk-testing.html#mkOptionsFromProject) creates the [`FSharpProjectOptions`](https://fsharp.github.io/fsharp-compiler-docs/reference/fsharp-compiler-codeanalysis-fsharpprojectoptions.html) for the given framework (e.g. `net7.0`) and the given list of packages to reference.
14-
[`FSharp.Analyzers.SDK.Testing.getContext`](../reference/fsharp-analyzers-sdk-testing.html#getContext) then takes the `FSharpProjectOptions` and the source code to test and creates a [`CliContext`](../reference/fsharp-analyzers-sdk-clicontext.html) you can pass along to your analyzer function.
15-
The module [`FSharp.Analyzers.SDK.Testing.Assert`](../reference/fsharp-analyzers-sdk-testing-assert.html) offers various functions to help with assertion statements from your favorite unit testing framework.
13+
[`FSharp.Analyzers.SDK.Testing.mkOptionsFromProject`](../reference/fsharp-analyzers-sdk-testing.html#mkOptionsFromProject) creates the [`FSharpProjectOptions`](https://fsharp.github.io/fsharp-compiler-docs/reference/fsharp-compiler-codeanalysis-fsharpprojectoptions.html) for the given framework (e.g. `net7.0`) and the given list of packages to reference.
14+
[`FSharp.Analyzers.SDK.Testing.getContext`](../reference/fsharp-analyzers-sdk-testing.html#getContext) then takes the `FSharpProjectOptions` and the source code to test and creates a [`CliContext`](../reference/fsharp-analyzers-sdk-clicontext.html) you can pass along to your analyzer function.
15+
The module [`FSharp.Analyzers.SDK.Testing.Assert`](../reference/fsharp-analyzers-sdk-testing-assert.html) offers various functions to help with assertion statements from your favorite unit testing framework.
1616
For a complete example of an unit testing project, take a look at [`OptionAnalyzer.Test`](https://github.com/ionide/FSharp.Analyzers.SDK/tree/7b7ec530c507d765ab18d93ebb7aa45ab59accc2/samples/OptionAnalyzer.Test) in the `samples` folder of the SDK repository.
1717
*)
1818

1919
(*** hide ***)
2020
#r "../../artifacts/bin/FSharp.Analyzers.Cli/release/FSharp.Compiler.Service.dll"
2121
#r "../../artifacts/bin/FSharp.Analyzers.SDK/release/FSharp.Analyzers.SDK.dll"
22-
#r "../../artifacts/bin/FSharp.Analyzers.SDK.Testing/release/FSharp.Analyzers.SDK.Testing.dll"
22+
#r "../../artifacts/bin/FSharp.Analyzers.SDK.Testing/release_net8.0/FSharp.Analyzers.SDK.Testing.dll"
2323
#r "../../artifacts/bin/OptionAnalyzer.Test/release/nunit.framework.dll"
2424
#r "../../artifacts/bin/OptionAnalyzer.Test/release/OptionAnalyzer.dll"
2525
(** *)
@@ -38,13 +38,10 @@ let Setup () =
3838
mkOptionsFromProject
3939
"net7.0"
4040
[
41-
// The SDK uses this in a "dotnet add package x --version y" command
42-
// to generate the needed FSharpProjectOptions
43-
{
44-
Name = "Newtonsoft.Json"
45-
Version = "13.0.3"
46-
}
47-
]
41+
// The SDK uses this in a "dotnet add package x --version y" command
42+
// to generate the needed FSharpProjectOptions
43+
{ Name = "Newtonsoft.Json"
44+
Version = "13.0.3" } ]
4845

4946
projectOptions <- opts
5047
}

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.0.200",
3+
"version": "9.0.100",
44
"rollForward": "latestMinor"
55
}
66
}

samples/OptionAnalyzer.Test/OptionAnalyzer.Test.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RollForward>LatestMajor</RollForward>
66

77
<IsPackable>false</IsPackable>

samples/OptionAnalyzer/OptionAnalyzer.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>

src/FSharp.Analyzers.Cli/FSharp.Analyzers.Cli.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RollForward>LatestMajor</RollForward>
66
<OutputType>Exe</OutputType>
77
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

0 commit comments

Comments
 (0)