Skip to content

Commit a97ca87

Browse files
authored
Merge pull request #900 from nojaf/v20-beta
v20 beta
2 parents aed4687 + 7c5c1f1 commit a97ca87

File tree

10 files changed

+32
-27
lines changed

10 files changed

+32
-27
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
]
1010
},
1111
"fsharp-analyzers": {
12-
"version": "0.21.0",
12+
"version": "0.24.0",
1313
"commands": [
1414
"fsharp-analyzers"
1515
]

Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
2727
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
2828
<PackageVersion Include="Ionide.KeepAChangelog.Tasks" Version="0.1.8" />
29-
<PackageVersion Include="FSharp.Analyzers.Build" Version="0.2.0" />
30-
<PackageVersion Include="G-Research.FSharp.Analyzers" Version="0.5.1" />
31-
<PackageVersion Include="Ionide.Analyzers" Version="0.5.1" />
29+
<PackageVersion Include="FSharp.Analyzers.Build" Version="0.3.0" />
30+
<PackageVersion Include="G-Research.FSharp.Analyzers" Version="0.8.0" />
31+
<PackageVersion Include="Ionide.Analyzers" Version="0.8.0" />
3232
</ItemGroup>
3333
</Project>

RELEASE_NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 20.0.0-beta-001 - 2024-01-31
4+
5+
### Changed
6+
* Marking development of v20 as complete.
7+
38
## 20.0.0-alpha-019 - 2024-01-29
49

510
### Fixed

src/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<FSharpAnalyzersOtherFlags>--analyzers-path &quot;$(PkgG-Research_FSharp_Analyzers)/analyzers/dotnet/fs&quot;</FSharpAnalyzersOtherFlags>
44
<FSharpAnalyzersOtherFlags>$(FSharpAnalyzersOtherFlags) --analyzers-path &quot;$(PkgIonide_Analyzers)/analyzers/dotnet/fs&quot;</FSharpAnalyzersOtherFlags>
5-
<FSharpAnalyzersOtherFlags>$(FSharpAnalyzersOtherFlags) --exclude-analyzer PartialAppAnalyzer -c Release</FSharpAnalyzersOtherFlags>
5+
<FSharpAnalyzersOtherFlags>$(FSharpAnalyzersOtherFlags) --exclude-analyzers PartialAppAnalyzer -c Release</FSharpAnalyzersOtherFlags>
66
<FSharpAnalyzersOtherFlags>$(FSharpAnalyzersOtherFlags) --code-root ../.. --report &quot;../../reports/$(MSBuildProjectName)-$(TargetFramework).sarif&quot;</FSharpAnalyzersOtherFlags>
77
</PropertyGroup>
88
</Project>

src/FSharp.Formatting.ApiDocs/GenerateModel.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1869,7 +1869,7 @@ module internal SymbolReader =
18691869
if allLinesHaveSameColumn then
18701870
trimmed
18711871
else
1872-
$"<pre>{trimmed}</pre>"
1872+
$"<pre>%s{trimmed}</pre>"
18731873

18741874
let rec readXmlElementAsHtml
18751875
anyTagsOK

src/FSharp.Formatting.Literate/Evaluator.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ module __FsiSettings =
567567
StdErr = e.Result.Error.Merged }
568568

569569
let msg =
570-
$"Evaluation failed and --strict is on\n file={file}\n asExpression={asExpression}, text={text}\n stdout={e.Result.Output.Merged}\n\ stderr={e.Result.Error.Merged}\n inner exception={e.InnerException}"
570+
$"Evaluation failed and --strict is on\n file=%A{file}\n asExpression=%b{asExpression}, text=%s{text}\n stdout=%s{e.Result.Output.Merged}\n\ stderr=%s{e.Result.Error.Merged}\n inner exception=%A{e.InnerException}"
571571

572572
onError msg
573573

src/FSharp.Formatting.Literate/ParsePynb.fs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,26 @@ module internal ParsePynb =
1818
match this with
1919
| Markdown source -> source
2020
| Code code ->
21-
let codeBlock = sprintf $"```{code.lang}\n{addLineEnd code.source}```"
21+
let codeBlock = sprintf $"```%s{code.lang}\n%s{addLineEnd code.source}```"
2222

2323
match code.outputs with
2424
| None -> codeBlock
2525
| Some outputs ->
2626
let outputsString = outputs |> String.concat "\n"
27-
sprintf $"{codeBlock}\n{outputsString}"
27+
sprintf $"%s{codeBlock}\n%s{outputsString}"
2828

2929
member this.ToFsx() =
3030
match this with
31-
| Markdown source -> $"(**\n{source}\n*)"
31+
| Markdown source -> $"(**\n%s{source}\n*)"
3232
| Code code when code.lang = "fsharp" ->
3333
let codeBlock = addLineEnd code.source
3434

3535
match code.outputs with
3636
| None -> codeBlock
3737
| Some outputs ->
3838
let outputsString = outputs |> String.concat "\n"
39-
sprintf $"{codeBlock}\n(**\n{outputsString}\n*)"
40-
| Code _ -> $"(**\n{this.ToMarkdown()}\n*)"
39+
sprintf $"%s{codeBlock}\n(**\n%s{outputsString}\n*)"
40+
| Code _ -> $"(**\n%s{this.ToMarkdown()}\n*)"
4141

4242
module Output =
4343
let (|TextHtml|_|) (x: JsonElement) =
@@ -48,14 +48,14 @@ module internal ParsePynb =
4848
|> Seq.map (fun x -> x.GetString().Replace("\r\n", "\n") |> addLineEnd)
4949
|> String.concat ""
5050

51-
Some $"<p>{html}</p>"
51+
Some $"<p>%s{html}</p>"
5252
| _ -> None
5353

5454
let (|TextPlain|_|) (x: JsonElement) =
5555
match x.TryGetProperty("text/plain") with
5656
| true, text ->
5757
let text = text.EnumerateArray() |> Seq.map (fun x -> x.GetString()) |> String.concat ""
58-
Some $"""<table class="pre"><tbody><tr><td><pre><code>{text}</code></pre></td></tr></tbody></table>"""
58+
Some $"""<table class="pre"><tbody><tr><td><pre><code>%s{text}</code></pre></td></tr></tbody></table>"""
5959
| _ -> None
6060

6161
let (|DisplayData|_|) (x: JsonElement) =
@@ -65,7 +65,7 @@ module internal ParsePynb =
6565
match x.TryGetProperty("data") with
6666
| true, TextHtml html -> html
6767
| true, TextPlain text -> text
68-
| true, s -> failwith $"unknown output {s}"
68+
| true, s -> failwith $"unknown output %A{s}"
6969
| false, _ -> failwith "no data property"
7070
|> Some
7171
else
@@ -82,7 +82,7 @@ module internal ParsePynb =
8282
| _ -> failwith "no text property"
8383

8484
Some
85-
$"""<table class="pre"><tbody><tr><td><pre><code>{text}</code></pre></td></tr></tbody></table>"""
85+
$"""<table class="pre"><tbody><tr><td><pre><code>%s{text}</code></pre></td></tr></tbody></table>"""
8686
else
8787
None
8888
| _ -> failwith "no output_type property"
@@ -91,7 +91,7 @@ module internal ParsePynb =
9191
match output with
9292
| Stream stream -> stream
9393
| DisplayData displayData -> displayData
94-
| s -> failwith $"""unknown output {s.GetProperty("output_type").GetString()}"""
94+
| s -> failwith $"""unknown output %s{s.GetProperty("output_type").GetString()}"""
9595

9696
let getSource (cell: JsonElement) =
9797
let source =
@@ -152,7 +152,7 @@ module internal ParsePynb =
152152
| _, Some _ -> failwith $"Markdown should not have outputs"
153153
| source, None -> Markdown source
154154
| "code" -> getCode cell
155-
| _ -> failwith $"unknown cell type {cell_type}"
155+
| _ -> failwith $"unknown cell type %s{cell_type}"
156156

157157
let pynbStringToMarkdown (ipynb: string) =
158158
let json = JsonDocument.Parse(ipynb)

src/FSharp.Formatting.Markdown/MarkdownUtils.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ module internal MarkdownUtils =
167167

168168
for (j, line) in List.indexed lines do
169169
if i = 0 && j = 0 then
170-
yield $"{n} " + line
170+
yield $"%i{n} " + line
171171
else
172172
yield " " + line
173173

@@ -329,7 +329,7 @@ module internal MarkdownUtils =
329329
else
330330
let tempRoot = "fsdocs-secret-temp-root"
331331
// We can't be sure code is a single html element, we could get multiple elements.
332-
let element = XElement.Parse($"<{tempRoot}>{code}</{tempRoot}>")
332+
let element = XElement.Parse($"<%s{tempRoot}>%s{code}</%s{tempRoot}>")
333333
// ends-with is XPath 2.0 only, https://stackoverflow.com/questions/1525299/xpath-and-xslt-2-0-for-net
334334
let attributes =
335335
match System.Xml.XPath.Extensions.XPathEvaluate(element, "//*/@*[contains(., '.md')]") with

src/fsdocs-tool/BuildCommand.fs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ type internal DocContent
128128
Some uri
129129
with _ ->
130130
printfn
131-
$"Couldn't map markdown reference {markdownReference} that seemed to correspond to an input file"
131+
$"Couldn't map markdown reference %s{markdownReference} that seemed to correspond to an input file"
132132

133133
None
134134

@@ -352,7 +352,7 @@ type internal DocContent
352352

353353
let evaluateNotebook ipynbFile =
354354
let args =
355-
$"repl --run {ipynbFile} --default-kernel fsharp --exit-after-run --output-path {ipynbFile}"
355+
$"repl --run %s{ipynbFile} --default-kernel fsharp --exit-after-run --output-path %s{ipynbFile}"
356356

357357
let psi =
358358
ProcessStartInfo(
@@ -367,8 +367,8 @@ type internal DocContent
367367
p.WaitForExit()
368368
with _ ->
369369
let msg =
370-
$"Failed to evaluate notebook {ipynbFile} using dotnet-repl\n"
371-
+ $"""try running "{args}" at the command line and inspect the error"""
370+
$"Failed to evaluate notebook %s{ipynbFile} using dotnet-repl\n"
371+
+ $"""try running "%s{args}" at the command line and inspect the error"""
372372

373373
failwith msg
374374

@@ -392,7 +392,7 @@ type internal DocContent
392392
psi.Arguments <- "tool list --global"
393393
p.Start() |> ignore
394394
let og = p.StandardOutput.ReadToEnd()
395-
let output = $"{ol}\n{og}"
395+
let output = $"%s{ol}\n%s{og}"
396396

397397
if not (output.Contains("dotnet-repl")) then
398398
failwith failmsg
@@ -403,7 +403,7 @@ type internal DocContent
403403

404404
if evaluate then
405405
checkDotnetReplInstall ()
406-
printfn $" evaluating {inputFileFullPath} with dotnet-repl"
406+
printfn $" evaluating %s{inputFileFullPath} with dotnet-repl"
407407
evaluateNotebook inputFileFullPath
408408

409409

src/fsdocs-tool/ProjectCracker.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ module Crack =
459459
projectFiles
460460
|> List.filter (fun s ->
461461
let isFSharpFormattingTestProject =
462-
s.Contains $"FSharp.ApiDocs.Tests{Path.DirectorySeparatorChar}files"
462+
s.Contains $"FSharp.ApiDocs.Tests%c{Path.DirectorySeparatorChar}files"
463463
|| s.EndsWith("FSharp.Formatting.TestHelpers.fsproj", StringComparison.Ordinal)
464464

465465
if isFSharpFormattingTestProject then

0 commit comments

Comments
 (0)