Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V7.0 #3123

Merged
merged 32 commits into from
Jan 10, 2025
Merged

V7.0 #3123

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8f7ad70
Update FCS to 92754eb9b7076c29e19d3f6d619883b2b526c23f
nojaf Sep 13, 2024
cb6c683
Allow solution to build
nojaf Sep 13, 2024
cf35ee0
Add tests for new syntax
nojaf Sep 13, 2024
1c7e0ee
Use and bang keyword from trivia. Thanks Edgar!
nojaf Sep 13, 2024
5acc1a1
Update SDK in Dockerfile
nojaf Sep 13, 2024
ead766d
Reuse mkSynAccess for SynValSigAccess.Single
nojaf Sep 13, 2024
4f11e2a
Fix existing tests
nojaf Sep 13, 2024
16f46a6
Correct signature in test
nojaf Sep 13, 2024
a19dde4
Support SynType.WithNull
nojaf Sep 13, 2024
1744b05
Add support for SynType.WithNull
nojaf Sep 13, 2024
8bd2e24
Add support for SynTypeConstraint.WhereTyparNotSupportsNull
nojaf Sep 13, 2024
33050b8
Support SynValSigAccess
nojaf Sep 13, 2024
df2a74e
Go back to 8.0.400 SDK
nojaf Sep 13, 2024
245fccf
Revert F# Core version and add TailCall attribute
nojaf Sep 13, 2024
cff445c
Replace TailCall in FCS with Microsoft.FSharp.Core.TailCall
nojaf Sep 13, 2024
d4bf853
Use the static logger
nojaf Sep 13, 2024
2bf0c71
Apply code review feedback
nojaf Sep 14, 2024
fad20c8
Use trivia from Nullness
nojaf Sep 16, 2024
3f98e13
Bump tfm to net8.0
nojaf Sep 16, 2024
506beb9
Add first alpha changelog
nojaf Sep 16, 2024
0dc03a2
Ensure endsWithMultilineTupleParameter happens with correct Context. …
nojaf Sep 19, 2024
75e8474
Don't put a space before a prefix operator, unless we have to. (#3134)
nojaf Nov 2, 2024
148d113
Add changelog entry for 7.0.0-alpha-002
nojaf Nov 2, 2024
df13126
Remove MaxDotGetExpressionWidth (#3138)
nojaf Nov 29, 2024
724aa04
Add alpha 3 entry in changelog
nojaf Nov 29, 2024
335f9bc
Bump F# Core version
nojaf Nov 29, 2024
cc21486
Update NuGet dependencies
nojaf Nov 29, 2024
3009288
Add PublishAlpha pipeline
nojaf Nov 29, 2024
5d7a379
Add active pattern for empty computation expression (#3141)
nojaf Dec 12, 2024
c8aedfc
Add v7 beta 1 to CHANGELOG.md
nojaf Dec 30, 2024
649eebd
Add changelog entry
nojaf Jan 10, 2025
2ebba1b
Try stable version instead?
nojaf Jan 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0.300
FROM mcr.microsoft.com/dotnet/sdk:8.0.400

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## 7.0.0 - 2025-01-10

### Miscellaneous
* Stable release.

## 7.0.0-beta-001 - 2024-12-30

### Miscellaneous
* Stable API of v7, no more breaking changes going forward.

## 7.0.0-alpha-004 - 2024-12-12

### Fixed
* (Empty/NoEmpty)-bodied named computation expression produces inconsistent formatting. [#3140](https://github.com/fsprojects/fantomas/issues/3140)

## 7.0.0-alpha-003 - 2024-11-29

### Removed
* setting `MaxDotGetExpressionWidth`. [#3138](https://github.com/fsprojects/fantomas/pull/3138)

## 7.0.0-alpha-002 - 2024-11-02

### Changed
* Unary operators: inconsistent formatting when arg is literal vs variable. [#3131](https://github.com/fsprojects/fantomas/issues/3131)

## 7.0.0-alpha-001 - 2024-09-16

### Added
* Add initial support for Nullness syntax. [#3118](https://github.com/fsprojects/fantomas/pull/3118)

### Changed
* Update FCS to 'Add trivia to Nullness nodes in SyntaxTree', commit 836d4e0603442d6053c8d439993a022501cae494 [#3118](https://github.com/fsprojects/fantomas/pull/3118)

## 6.3.16 - 2024-10-29

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ Some common use cases include:
<!-- https://www.gresearch.co.uk/blog/article/improve-nuget-restores-with-static-graph-evaluation/ -->
<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
<ServerGarbageCollection>true</ServerGarbageCollection>
<OtherFlags>$(OtherFlags) --test:GraphBasedChecking --test:ParallelOptimization --test:ParallelIlxGen --strict-indentation+</OtherFlags>
<OtherFlags>$(OtherFlags) --test:GraphBasedChecking --test:ParallelOptimization --test:ParallelIlxGen --strict-indentation+ --realsig+</OtherFlags>
</PropertyGroup>

<!-- Versions -->
<PropertyGroup>
<FCSCommitHash>836d4e0603442d6053c8d439993a022501cae494</FCSCommitHash>
<FCSCommitHash>e668b90e3c087e5fba8a855e502af60bf35be45e</FCSCommitHash>
</PropertyGroup>

<PropertyGroup>
Expand Down
40 changes: 21 additions & 19 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="FSharp.Core" Version="6.0.1"/>
<PackageVersion Include="System.Collections.Immutable" Version="7.0.0" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="7.0.0" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
<PackageVersion Include="FSharp.Core" Version="8.0.100"/>
<PackageVersion Include="System.Collections.Immutable" Version="8.0.0" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="8.0.1" />
<PackageVersion Include="System.Memory" Version="4.6.0" />
<PackageVersion Include="System.Runtime" Version="4.3.1" />
<PackageVersion Include="FsLexYacc" Version="11.2.0" />
<PackageVersion Include="FsLexYacc" Version="11.3.0" />

<PackageVersion Include="Ionide.KeepAChangelog.Tasks" Version="0.1.8"/>
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.1.1"/>
Expand All @@ -17,25 +18,26 @@
<PackageVersion Include="Ionide.Analyzers" Version="0.9.0" />
<PackageVersion Include="FSharp.Analyzers.Build" Version="0.3.0" />

<PackageVersion Include="StreamJsonRpc" Version="2.8.28" />
<PackageVersion Include="StreamJsonRpc" Version="2.20.20" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="SemanticVersioning" Version="2.0.2" />
<PackageVersion Include="Serilog" Version="3.1.1"/>
<PackageVersion Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageVersion Include="Serilog" Version="4.1.0"/>
<PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageVersion Include="SerilogTraceListener" Version="3.2.1-dev-00011" />
<PackageVersion Include="Argu" Version="6.2.4" />
<PackageVersion Include="Thoth.Json.Net" Version="8.0.0" />
<PackageVersion Include="Thoth.Json.Net" Version="12.0.0" />
<PackageVersion Include="editorconfig" Version="0.15.0" />
<PackageVersion Include="Ignore" Version="0.1.50" />
<PackageVersion Include="System.IO.Abstractions" Version="20.0.4" />
<PackageVersion Include="Spectre.Console" Version="0.48.0" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.13-nightly.20240213.132" />
<PackageVersion Include="Ignore" Version="0.2.1" />
<PackageVersion Include="System.IO.Abstractions" Version="21.1.3" />
<PackageVersion Include="Spectre.Console" Version="0.49.1" />
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />

<PackageVersion Include="CliWrap" Version="3.6.4" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
<PackageVersion Include="NUnit" Version="4.0.1"/>
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0"/>
<PackageVersion Include="System.IO.Abstractions.TestingHelpers" Version="20.0.4" />
<PackageVersion Include="CliWrap" Version="3.6.7" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0"/>
<PackageVersion Include="NUnit" Version="4.2.2"/>
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0"/>
<PackageVersion Include="System.IO.Abstractions.TestingHelpers" Version="21.1.3" />
<PackageVersion Include="FsCheck" Version="2.16.5" />
<PackageVersion Include="FsUnit" Version="6.0.0" />
<PackageVersion Include="FsUnit" Version="6.0.1" />
</ItemGroup>
</Project>
5 changes: 0 additions & 5 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="bdn-nightly" value="https://www.myget.org/F/benchmarkdotnet/api/v3/index.json" />
</packageSources>
<packageSourceMapping>
<!-- key value for <packageSource> should match key values from <packageSources> element -->
<packageSource key="bdn-nightly">
<package pattern="BenchmarkDotNet" />
<package pattern="BenchmarkDotNet.*" />
</packageSource>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
Expand Down
24 changes: 24 additions & 0 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ let updateFileRaw (file: FileInfo) =
|> Array.map (fun line ->
if line.Contains("FSharp.Compiler") then
line.Replace("FSharp.Compiler", "Fantomas.FCS")
elif line.Contains("[<TailCall>]") then
line.Replace("[<TailCall>]", "[<Microsoft.FSharp.Core.TailCall>]")
else
line)
File.WriteAllLines(file.FullName, updatedLines)
Expand Down Expand Up @@ -228,6 +230,7 @@ pipeline "Init" {
run (fun _ ->
[| "src/Compiler/FSComp.txt"
"src/Compiler/FSStrings.resx"
"src/Compiler/Utilities/NullnessShims.fs"
"src/Compiler/Utilities/Activity.fsi"
"src/Compiler/Utilities/Activity.fs"
"src/Compiler/Utilities/sformat.fsi"
Expand Down Expand Up @@ -475,4 +478,25 @@ pipeline "Release" {
runIfOnlySpecified true
}

pipeline "PublishAlpha" {
workingDir __SOURCE_DIRECTORY__
stage "Clean" { run (cleanFolders [| analysisReportsDir; "artifacts" |]) }
stage "Build" { run "dotnet build -c Release --tl" }
stage "Pack" { run "dotnet pack --no-restore -c Release --tl" }
stage "Publish" {
run (fun ctx ->
async {
let nugetPackages =
Directory.EnumerateFiles("artifacts/package/release", "*.nupkg", SearchOption.TopDirectoryOnly)
|> Seq.filter (fun nupkg -> not (nupkg.Contains("Fantomas.Client")))
|> Seq.toArray

let! nugetExitCodes = nugetPackages |> Array.map pushPackage |> Async.Sequential

return Seq.sum nugetExitCodes
})
}
runIfOnlySpecified true
}

tryPrintPipelineCommandHelp ()
22 changes: 0 additions & 22 deletions docs/docs/end-users/Configuration.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -729,28 +729,6 @@ fsharp_max_function_binding_width = 10
"""
(*** include-output ***)

(**
<fantomas-setting green></fantomas-setting>
### fsharp_max_dot_get_expression_width
<copy-to-clipboard text="fsharp_max_dot_get_expression_width = 100"></copy-to-clipboard>

Control the maximum width for which (nested) [SynExpr.DotGet](https://fsharp.github.io/fsharp-compiler-docs/reference/fsharp-compiler-syntax-synexpr.html#DotGet) expressions should be in one line.
*)

(*** hide ***)
printfn
$"# Default\n{toEditorConfigName (nameof FormatConfig.Default.MaxDotGetExpressionWidth)} = {FormatConfig.Default.MaxDotGetExpressionWidth}"
(*** include-output ***)

formatCode
"""
let job = JobBuilder.UsingJobData(jobDataMap).Create<WrapperJob>().Build()
"""
"""
fsharp_max_dot_get_expression_width = 60
"""
(*** include-output ***)

(**
<fantomas-setting green gr></fantomas-setting>
### fsharp_multiline_bracket_style
Expand Down
8 changes: 8 additions & 0 deletions docs/docs/end-users/UpgradeGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,12 @@ fsharp_experimental_stroustrup_style = true
### Miscellaneous
- The namespace in [Fantomas.FCS](https://www.nuget.org/packages/Fantomas.FCS) changed from `FSharp.Compiler` to `Fantomas.FCS`.

## v7 alpha

### console application
- Target framework is now `net8.0`.

### .editorconfig
- `fsharp_max_dot_get_expression_width` was removed.

<fantomas-nav previous="{{fsdocs-previous-page-link}}" next="{{fsdocs-next-page-link}}"></fantomas-nav>
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.300",
"rollForward": "latestMinor"
"version": "8.0.400",
"rollForward": "latestPatch"
}
}
64 changes: 31 additions & 33 deletions src/Fantomas.Benchmarks/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
"net8.0": {
"BenchmarkDotNet": {
"type": "Direct",
"requested": "[0.13.13-nightly.20240213.132, )",
"resolved": "0.13.13-nightly.20240213.132",
"contentHash": "2dGQPEr47nGnsgipskl3rWS+dVWm+xkVzS/1jAF49VdDdGh6JLQkaVv5k59UewMF6ofGV1EvF5HeO55wwTRaww==",
"requested": "[0.14.0, )",
"resolved": "0.14.0",
"contentHash": "eIPSDKi3oni734M1rt/XJAwGQQOIf9gLjRRKKJ0HuVy3vYd7gnmAIX1bTjzI9ZbAY/nPddgqqgM/TeBYitMCIg==",
"dependencies": {
"BenchmarkDotNet.Annotations": "0.13.13-nightly.20240213.132",
"BenchmarkDotNet.Annotations": "0.14.0",
"CommandLineParser": "2.9.1",
"Gee.External.Capstone": "2.3.0",
"Iced": "1.17.0",
"Microsoft.CodeAnalysis.CSharp": "4.1.0",
"Microsoft.Diagnostics.Runtime": "2.2.332302",
"Microsoft.Diagnostics.Tracing.TraceEvent": "3.0.2",
"Microsoft.Diagnostics.Tracing.TraceEvent": "3.1.8",
"Microsoft.DotNet.PlatformAbstractions": "3.1.6",
"Perfolizer": "[0.2.1]",
"Perfolizer": "[0.3.17]",
"System.Management": "5.0.0"
}
},
Expand All @@ -28,9 +28,9 @@
},
"FSharp.Core": {
"type": "Direct",
"requested": "[6.0.1, )",
"resolved": "6.0.1",
"contentHash": "VrFAiW8dEEekk+0aqlbvMNZzDvYXmgWZwAt68AUBqaWK8RnoEVUNglj66bZzhs4/U63q0EfXlhcEKnH1sTYLjw=="
"requested": "[8.0.100, )",
"resolved": "8.0.100",
"contentHash": "ZOVZ/o+jI3ormTZOa28Wh0tSRoyle1f7lKFcUN61sPiXI7eDZu8eSveFybgTeyIEyW0ujjp31cp7GOglDgsNEg=="
},
"G-Research.FSharp.Analyzers": {
"type": "Direct",
Expand All @@ -46,8 +46,8 @@
},
"BenchmarkDotNet.Annotations": {
"type": "Transitive",
"resolved": "0.13.13-nightly.20240213.132",
"contentHash": "G40jV79QmtgQbqaIPUmQ2CCswnfO7j/tdL0ENbAevVsuBW5rGoxj2V3NlMiSUQO9MogRk3rWMnXytFYcRFmP4w=="
"resolved": "0.14.0",
"contentHash": "CUDCg6bgHrDzhjnA+IOBl5gAo8Y5hZ2YSs7MBXrYMlMKpBZqrD5ez0537uDveOkcf+YWAoK+S4sMcuWPbIz8bw=="
},
"CommandLineParser": {
"type": "Transitive",
Expand Down Expand Up @@ -117,10 +117,11 @@
},
"Microsoft.Diagnostics.Tracing.TraceEvent": {
"type": "Transitive",
"resolved": "3.0.2",
"contentHash": "Pr7t+Z/qBe6DxCow4BmYmDycHe2MrGESaflWXRcSUI4XNGyznx1ttS+9JNOxLuBZSoBSPTKw9Dyheo01Yi6anQ==",
"resolved": "3.1.8",
"contentHash": "kl3UMrZKSeSEYZ8rt/GjLUQToREjgQABqfg6PzQBmSlYHTZOKE9ePEOS2xptROQ9SVvngg3QGX51TIT11iZ0wA==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
"Microsoft.Win32.Registry": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "5.0.0"
}
},
"Microsoft.DotNet.PlatformAbstractions": {
Expand Down Expand Up @@ -212,11 +213,8 @@
},
"Perfolizer": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Dt4aCxCT8NPtWBKA8k+FsN/RezOQ2C6omNGm5o/qmYRiIwlQYF93UgFmeF1ezVNsztTnkg7P5P63AE+uNkLfrw==",
"dependencies": {
"System.Memory": "4.5.3"
}
"resolved": "0.3.17",
"contentHash": "FQgtCoF2HFwvzKWulAwBS5BGLlh8pgbrJtOp47jyBwh2CW16juVtacN1azOA2BqdrJXkXTNLNRMo7ZlHHiuAnA=="
},
"System.CodeDom": {
"type": "Transitive",
Expand Down Expand Up @@ -274,37 +272,37 @@
"fantomas.core": {
"type": "Project",
"dependencies": {
"FSharp.Core": "[6.0.1, )",
"FSharp.Core": "[8.0.100, )",
"Fantomas.FCS": "[1.0.0, )"
}
},
"fantomas.fcs": {
"type": "Project",
"dependencies": {
"FSharp.Core": "[6.0.1, )",
"System.Collections.Immutable": "[7.0.0, )",
"System.Diagnostics.DiagnosticSource": "[7.0.0, )",
"System.Memory": "[4.5.5, )",
"FSharp.Core": "[8.0.100, )",
"System.Collections.Immutable": "[8.0.0, )",
"System.Diagnostics.DiagnosticSource": "[8.0.1, )",
"System.Memory": "[4.6.0, )",
"System.Runtime": "[4.3.1, )"
}
},
"System.Collections.Immutable": {
"type": "CentralTransitive",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "dQPcs0U1IKnBdRDBkrCTi1FoajSTBzLcVTpjO4MBCMC7f4pDOIPzgBoX8JjG7X6uZRJ8EBxsi8+DR1JuwjnzOQ=="
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg=="
},
"System.Diagnostics.DiagnosticSource": {
"type": "CentralTransitive",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "9W0ewWDuAyDqS2PigdTxk6jDKonfgscY/hP8hm7VpxYhNHZHKvZTdRckberlFk3VnCmr3xBUyMBut12Q+T2aOw=="
"requested": "[8.0.1, )",
"resolved": "8.0.1",
"contentHash": "vaoWjvkG1aenR2XdjaVivlCV9fADfgyhW5bZtXT23qaEea0lWiUljdQuze4E31vKM7ZWJaSUsbYIKE3rnzfZUg=="
},
"System.Memory": {
"type": "CentralTransitive",
"requested": "[4.5.5, )",
"resolved": "4.5.5",
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw=="
"requested": "[4.6.0, )",
"resolved": "4.6.0",
"contentHash": "OEkbBQoklHngJ8UD8ez2AERSk2g+/qpAaSWWCBFbpH727HxDq5ydVkuncBaKcKfwRqXGWx64dS6G1SUScMsitg=="
},
"System.Runtime": {
"type": "CentralTransitive",
Expand Down
4 changes: 2 additions & 2 deletions src/Fantomas.Client.Tests/EndToEndTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type EndToEndTests() =
[<TestCase("5.0.6")>]
[<TestCase("5.1.5")>]
[<TestCase("5.2.2")>]
[<TestCase("6.0.0-alpha-004")>]
[<TestCase("6.0.0")>]
member _.Version(version: string) =
withVersion version (fun fsharpFile ->
backgroundTask {
Expand All @@ -87,7 +87,7 @@ type EndToEndTests() =
[<TestCase("5.0.6")>]
[<TestCase("5.1.5")>]
[<TestCase("5.2.2")>]
[<TestCase("6.0.0-alpha-004")>]
[<TestCase("6.0.0")>]
member _.FormatDocument(version: string) =
withVersion version (fun fsharpFile ->
backgroundTask {
Expand Down
Loading
Loading