Skip to content

Commit

Permalink
Merge pull request #2618 from nojaf/sdk-7
Browse files Browse the repository at this point in the history
Update to dotnet 7 sdk
  • Loading branch information
nojaf authored Nov 10, 2022
2 parents 214c88e + b3dd77b commit 573d273
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 23 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [5.1.2] - 2022-11-09

### Changed
* Update to newer Fantomas.Client. [#2617](https://github.com/fsprojects/fantomas/issues/2617)

## [5.1.1] - 2022-11-07

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let benchmarkAssembly =
</> "Fantomas.Benchmarks"
</> "bin"
</> "Release"
</> "net6.0"
</> "net7.0"
</> "Fantomas.Benchmarks.dll"

let semanticVersioning =
Expand Down
5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "7.0.100"
}
}
2 changes: 1 addition & 1 deletion src/Fantomas.Benchmarks/Fantomas.Benchmarks.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas.Benchmarks/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net6.0": {
"net7.0": {
"BenchmarkDotNet": {
"type": "Direct",
"requested": "[0.13.2, )",
Expand Down
5 changes: 5 additions & 0 deletions src/Fantomas.Client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

This is the changelog for the Fantomas.Client package specifically. It's distinct from that of the overall libraries and command-line tool.

## 0.7.0 - 2022-11-09

### Changed
* Changed `FormatSelectionRange` to class instead of struct.

## 0.6.0 - 2022-06-27

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas.Client/Contracts.fs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type FormatSelectionRequest =
member this.IsSignatureFile = this.FilePath.EndsWith(".fsi")

and FormatSelectionRange =
struct
class
val StartLine: int
val StartColumn: int
val EndLine: int
Expand Down
19 changes: 8 additions & 11 deletions src/Fantomas.Client/Contracts.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,14 @@ type FormatSelectionRequest =

member IsSignatureFile: bool

and [<Struct>] FormatSelectionRange =

new: startLine: int * startColumn: int * endLine: int * endColumn: int -> FormatSelectionRange

val StartLine: int

val StartColumn: int

val EndLine: int

val EndColumn: int
and FormatSelectionRange =
class
new: startLine: int * startColumn: int * endLine: int * endColumn: int -> FormatSelectionRange
val StartLine: int
val StartColumn: int
val EndLine: int
val EndColumn: int
end

type FantomasResponse =
{
Expand Down
1 change: 1 addition & 0 deletions src/Fantomas.Client/Fantomas.Client.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<IsPackable>true</IsPackable>
</PropertyGroup>
<ItemGroup>
<None Include="CHANGELOG.md" />
<Compile Include="Contracts.fsi" />
<Compile Include="Contracts.fs" />
<Compile Include="LSPFantomasServiceTypes.fsi" />
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas.Core.Tests/Fantomas.Core.Tests.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>FS0988</NoWarn>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<WarningsAsErrors>FS0025</WarningsAsErrors>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas.Core.Tests/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net6.0": {
"net7.0": {
"FsCheck": {
"type": "Direct",
"requested": "[2.16.5, )",
Expand Down
2 changes: 2 additions & 0 deletions src/Fantomas.Core/Fantomas.Core.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>true</IsPackable>
<Tailcalls>true</Tailcalls>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<OtherFlags>--test:ParallelCheckingWithSignatureFilesOn</OtherFlags>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.fs" />
Expand Down
2 changes: 2 additions & 0 deletions src/Fantomas.FCS/Fantomas.FCS.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<FsLexOutputFolder>generated\$(TargetFramework)\</FsLexOutputFolder>
<Tailcalls>true</Tailcalls>
<IsPackable>true</IsPackable>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<OtherFlags>--test:ParallelCheckingWithSignatureFilesOn</OtherFlags>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas.Tests/Fantomas.Tests.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
<GenerateProgramFile>false</GenerateProgramFile>
<NoWarn>FS0988</NoWarn>
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas.Tests/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net6.0": {
"net7.0": {
"FsCheck": {
"type": "Direct",
"requested": "[2.16.5, )",
Expand Down
6 changes: 2 additions & 4 deletions src/Fantomas/Daemon.fs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type FantomasDaemon(sender: Stream, reader: Stream) as this =

[<JsonRpcMethod(Methods.FormatDocument, UseSingleObjectParameterDeserialization = true)>]
member _.FormatDocumentAsync(request: FormatDocumentRequest) : Task<FormatDocumentResponse> =
async {
task {
if
IgnoreFile.isIgnoredFile
(IgnoreFile.find fs (IgnoreFile.loadIgnoreList fs) request.FilePath)
Expand All @@ -70,11 +70,10 @@ type FantomasDaemon(sender: Stream, reader: Stream) as this =
with ex ->
return FormatDocumentResponse.Error(request.FilePath, ex.Message)
}
|> Async.StartAsTask

[<JsonRpcMethod(Methods.FormatSelection, UseSingleObjectParameterDeserialization = true)>]
member _.FormatSelectionAsync(request: FormatSelectionRequest) : Task<FormatSelectionResponse> =
async {
task {
let config =
match request.Config with
| Some configProperties ->
Expand Down Expand Up @@ -106,7 +105,6 @@ type FantomasDaemon(sender: Stream, reader: Stream) as this =
with ex ->
return FormatSelectionResponse.Error(request.FilePath, ex.Message)
}
|> Async.StartAsTask

[<JsonRpcMethod(Methods.Configuration)>]
member _.Configuration() : string =
Expand Down

0 comments on commit 573d273

Please sign in to comment.