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

Update FCS and tools #945

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"fantomas": {
"version": "6.3.0-alpha-003",
"version": "6.3.16",
"commands": [
"fantomas"
]
Expand All @@ -15,7 +15,7 @@
]
},
"dotnet-repl": {
"version": "0.1.208",
"version": "0.1.216",
"commands": [
"dotnet-repl"
]
Expand Down
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>
<ItemGroup>
<!-- locking the version of F# Core as FCS does this anyway and in practise all will be using the same version -->
<PackageVersion Include="FSharp.Core" Version="[8.0.301]" />
<PackageVersion Include="FSharp.Compiler.Service" Version="[43.8.301]" />
<PackageVersion Include="FSharp.Core" Version="[9.0.100]" />
<PackageVersion Include="FSharp.Compiler.Service" Version="[43.9.100]" />
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
<PackageVersion Include="Microsoft.Build" Version="" PrivateAssets="all" />
<PackageVersion Include="Microsoft.Build.Framework" Version="" PrivateAssets="all" />
Expand All @@ -18,7 +18,7 @@
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Suave" Version="2.6.2" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
<PackageVersion Include="System.Text.Json" Version="8.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" />
<PackageVersion Include="NUnit" Version="3.14.0" />
<PackageVersion Include="FsUnit" Version="5.6.0" />
Expand Down
5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 21.0.0-beta-004 - 2024-11-20

### Changed
* Update FCS to 43.9.100. [#945](https://github.com/fsprojects/FSharp.Formatting/pull/945)

## 21.0.0-beta-003 - 2024-08-06

### Changed
Expand Down
3 changes: 2 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"sdk": {
"version": "8.0.100"
"version": "8.0.400",
"rollForward": "latestMinor"
}
}
11 changes: 2 additions & 9 deletions src/FSharp.Formatting.ApiDocs/GenerateModel.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2912,15 +2912,8 @@ type ApiDocInput =
}

static member FromFile
(
assemblyPath: string,
?mdcomments,
?substitutions,
?sourceRepo,
?sourceFolder,
?publicOnly,
?warn
) =
(assemblyPath: string, ?mdcomments, ?substitutions, ?sourceRepo, ?sourceFolder, ?publicOnly, ?warn)
=
{ Path = assemblyPath
XmlFile = None
SourceFolder = sourceFolder
Expand Down
12 changes: 1 addition & 11 deletions src/FSharp.Formatting.CodeFormat/CodeFormat.fs
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,7 @@ type CodeFormat =
/// Formats the .fsx snippets as HTML. The parameters specify prefix for HTML tags, whether lines should
/// be added to outputs and whether errors should be printed.
static member FormatHtml
(
snippets,
prefix,
?openTag,
?closeTag,
?lineNumbers,
?openLinesTag,
?closeLinesTag,
?addErrors,
?tokenKindToCss
) =
(snippets, prefix, ?openTag, ?closeTag, ?lineNumbers, ?openLinesTag, ?closeLinesTag, ?addErrors, ?tokenKindToCss) =
let openTag = defaultArg openTag "<pre class=\"fssnip\">"

let closeTag = defaultArg closeTag "</pre>"
Expand Down
8 changes: 2 additions & 6 deletions src/FSharp.Formatting.CodeFormat/Pervasive.fs
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,8 @@ type CheckResults =
type FSharpChecker with

member this.ParseAndCheckDocument
(
filePath: string,
sourceText: string,
options: FSharpProjectOptions,
allowStaleResults: bool
) : Async<(FSharpParseFileResults * ParsedInput * FSharpCheckFileResults) option> =
(filePath: string, sourceText: string, options: FSharpProjectOptions, allowStaleResults: bool)
: Async<(FSharpParseFileResults * ParsedInput * FSharpCheckFileResults) option> =
let parseAndCheckFile =
async {
let! parseResults, checkFileAnswer =
Expand Down
21 changes: 3 additions & 18 deletions src/FSharp.Formatting.Literate/Literate.fs
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,8 @@ type Literate private () =
/// <param name="rootInputFolder"></param>
/// <param name="onError"></param>
static member ParsePynbString
(
content,
?path,
?definedSymbols,
?references,
?parseOptions,
?rootInputFolder,
?onError
) =
(content, ?path, ?definedSymbols, ?references, ?parseOptions, ?rootInputFolder, ?onError)
=
let onError = defaultArg onError ignore
let ctx = parsingContext None None definedSymbols onError

Expand Down Expand Up @@ -361,15 +354,7 @@ type Literate private () =

/// Format the literate document as Latex without using a template
static member ToLatex
(
doc: LiterateDocument,
?prefix,
?lineNumbers,
?generateAnchors,
?substitutions,
?crefResolver,
?mdlinkResolver
) =
(doc: LiterateDocument, ?prefix, ?lineNumbers, ?generateAnchors, ?substitutions, ?crefResolver, ?mdlinkResolver) =
let crefResolver = defaultArg crefResolver (fun _ -> None)
let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None)

Expand Down
50 changes: 9 additions & 41 deletions src/FSharp.Formatting.Markdown/Markdown.fs
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,8 @@ type Markdown internal () =
/// Transform Markdown text into HTML format. The result
/// will be written to the provided TextWriter.
static member WriteHtml
(
markdownText: string,
writer: TextWriter,
?newline,
?substitutions,
?crefResolver,
?mdlinkResolver
) =
(markdownText: string, writer: TextWriter, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver)
=
let doc = Markdown.Parse(markdownText, ?newline = newline)

Markdown.WriteHtml(
Expand Down Expand Up @@ -154,15 +148,7 @@ type Markdown internal () =
/// Transform the provided MarkdownDocument into LaTeX
/// format and write the result to a given writer.
static member WriteLatex
(
doc: MarkdownDocument,
writer,
?newline,
?substitutions,
?crefResolver,
?mdlinkResolver,
?lineNumbers
) =
(doc: MarkdownDocument, writer, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver, ?lineNumbers) =
let newline = defaultArg newline Environment.NewLine
let substitutions = defaultArg substitutions []
let crefResolver = defaultArg crefResolver (fun _ -> None)
Expand All @@ -182,14 +168,8 @@ type Markdown internal () =
/// Transform Markdown document into LaTeX format. The result
/// will be written to the provided TextWriter.
static member WriteLatex
(
markdownText,
writer: TextWriter,
?newline,
?substitutions,
?crefResolver,
?mdlinkResolver
) =
(markdownText, writer: TextWriter, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver)
=
let doc = Markdown.Parse(markdownText, ?newline = newline)

Markdown.WriteLatex(
Expand All @@ -204,14 +184,8 @@ type Markdown internal () =
/// Transform the provided MarkdownDocument into LaTeX
/// format and return the result as a string.
static member ToLatex
(
doc: MarkdownDocument,
?newline,
?substitutions,
?crefResolver,
?mdlinkResolver,
?lineNumbers
) =
(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver, ?lineNumbers)
=
let sb = new System.Text.StringBuilder()
use wr = new StringWriter(sb)

Expand All @@ -229,14 +203,8 @@ type Markdown internal () =

/// Transform Markdown text into LaTeX format. The result will be returned as a string.
static member ToLatex
(
markdownText: string,
?newline,
?substitutions,
?crefResolver,
?mdlinkResolver,
?lineNumbers
) =
(markdownText: string, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver, ?lineNumbers)
=
let doc = Markdown.Parse(markdownText, ?newline = newline)

Markdown.ToLatex(
Expand Down
2 changes: 1 addition & 1 deletion src/FSharp.Formatting/FSharp.Formatting.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FSharp.Core" />
<PackageReference Update="FSharp.Core" />
<PackageReference Include="FSharp.Compiler.Service" />
</ItemGroup>

Expand Down
7 changes: 2 additions & 5 deletions src/fsdocs-tool/BuildCommand.fs
Original file line number Diff line number Diff line change
Expand Up @@ -687,11 +687,8 @@ type internal DocContent
| _ -> () |]

member _.GetNavigationEntries
(
input,
docModels: (string * bool * LiterateDocModel) list,
currentPagePath: string option
) =
(input, docModels: (string * bool * LiterateDocModel) list, currentPagePath: string option)
=
let modelsForList =
[ for thing in docModels do
match thing with
Expand Down
11 changes: 2 additions & 9 deletions src/fsdocs-tool/ProjectCracker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,8 @@ module Crack =
| Error e -> raise (exn ("cannot load the sln", e))

let crackProjects
(
onError,
extraMsbuildProperties,
userRoot,
userCollectionName,
userParameters,
projects,
ignoreProjects
) =
(onError, extraMsbuildProperties, userRoot, userCollectionName, userParameters, projects, ignoreProjects)
=
let slnDir = Path.GetFullPath "."

//printfn "x.projects = %A" x.projects
Expand Down
2 changes: 1 addition & 1 deletion src/fsdocs-tool/fsdocs-tool.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<AssemblyName>fsdocs</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<PackageId>fsdocs-tool</PackageId>
<RollForward>LatestMajor</RollForward>
<IsPackable>true</IsPackable>
Expand Down
Loading