Skip to content

Commit

Permalink
Update FCS to 43.9.201 (#1355)
Browse files Browse the repository at this point in the history
* Update FCS to 43.9.201

* format on save f#

* fix: tests
  • Loading branch information
TheAngryByrd authored Feb 13, 2025
1 parent f79c09a commit b6bfc04
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 40 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"[fsharp]": {
"editor.formatOnSave": true
},
"FSharp.excludeProjectDirectories": [
".git",
"paket-files",
Expand Down
9 changes: 4 additions & 5 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ storage: none

nuget BenchmarkDotNet
nuget Fantomas.Client >= 0.9
nuget FSharp.Compiler.Service >= 43.9
nuget FSharp.Compiler.Service >= 43.9.201
nuget Ionide.Analyzers
nuget FSharp.Analyzers.Build
nuget Ionide.ProjInfo >= 0.65.0
nuget Ionide.ProjInfo.FCS >= 0.65.0
nuget Ionide.ProjInfo.ProjectSystem >= 0.65.0
nuget Ionide.ProjInfo.Sln >= 0.65.0
nuget Ionide.ProjInfo >= 0.70.0
nuget Ionide.ProjInfo.FCS >= 0.70.0
nuget Ionide.ProjInfo.ProjectSystem >= 0.70.0
nuget Microsoft.Build >= 17.2 copy_local:false
nuget Microsoft.Build.Framework >= 17.4 copy_local:false
nuget Microsoft.Build.Utilities.Core >= 17.4 copy_local:false
Expand Down
34 changes: 17 additions & 17 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,27 @@ NUGET
FParsec (1.1.1) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net5.0)) (&& (== netstandard2.1) (>= net5.0))
FSharp.Core (>= 4.3.4)
FSharp.Analyzers.Build (0.3)
FSharp.Analyzers.SDK (0.28)
FSharp.Compiler.Service (43.9.100) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
FSharp.Core (9.0.100) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
FSharp.Analyzers.SDK (0.29)
FSharp.Compiler.Service (43.9.201) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
FSharp.Core (9.0.201) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
McMaster.NETCore.Plugins (>= 1.4) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Microsoft.Extensions.Logging.Abstractions (>= 6.0) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
FSharp.Compiler.Service (43.9.100)
FSharp.Core (9.0.100)
System.Buffers (>= 4.5.1)
FSharp.Compiler.Service (43.9.201)
FSharp.Core (9.0.201)
System.Buffers (>= 4.6)
System.Collections.Immutable (>= 8.0)
System.Diagnostics.DiagnosticSource (>= 8.0)
System.Memory (>= 4.5.5)
System.Reflection.Emit (>= 4.7)
System.Reflection.Metadata (>= 8.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
System.Runtime.CompilerServices.Unsafe (>= 6.1)
FSharp.Control.AsyncSeq (3.2.1)
FSharp.Core (>= 4.7.2)
Microsoft.Bcl.AsyncInterfaces (>= 5.0)
Fsharp.Control.Reactive (5.0.5) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
FSharp.Core (>= 4.7.2)
System.Reactive (>= 5.0 < 6.0)
FSharp.Core (9.0.100)
FSharp.Core (9.0.201)
FSharp.Data.Adaptive (1.2.18)
FSharp.Core (>= 4.7)
System.Reflection.Emit.Lightweight (>= 4.6)
Expand Down Expand Up @@ -130,19 +130,18 @@ NUGET
FSharp.Core (>= 6.0)
Newtonsoft.Json (>= 13.0.1)
StreamJsonRpc (>= 2.16.36)
Ionide.ProjInfo (0.68)
Ionide.ProjInfo (0.70)
FSharp.Core (>= 6.0) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Ionide.ProjInfo.Sln (>= 0.68) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Microsoft.VisualStudio.SolutionPersistence (>= 1.0.28) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
SemanticVersioning (>= 2.0.2) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Ionide.ProjInfo.FCS (0.68)
FSharp.Compiler.Service (>= 43.9.100) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
FSharp.Core (>= 9.0.100) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Ionide.ProjInfo (>= 0.68) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Ionide.ProjInfo.ProjectSystem (0.68)
Ionide.ProjInfo.FCS (0.70)
FSharp.Compiler.Service (>= 43.9.201) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
FSharp.Core (>= 9.0.201) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Ionide.ProjInfo (>= 0.70) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Ionide.ProjInfo.ProjectSystem (0.70)
Fsharp.Control.Reactive (>= 5.0.5) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Ionide.ProjInfo.FCS (>= 0.68) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Ionide.ProjInfo.FCS (>= 0.70) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Newtonsoft.Json (>= 13.0.3) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Ionide.ProjInfo.Sln (0.68)
LinkDotNet.StringBuilder (1.18)
McMaster.NETCore.Plugins (1.4) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Microsoft.DotNet.PlatformAbstractions (>= 3.1.6) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) (&& (== netstandard2.1) (>= netcoreapp2.1))
Expand Down Expand Up @@ -401,6 +400,7 @@ NUGET
Microsoft.TestPlatform.TestHost (17.12) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) (&& (== netstandard2.1) (>= netcoreapp3.1))
Microsoft.TestPlatform.ObjectModel (>= 17.12) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) (&& (== netstandard2.1) (>= netcoreapp3.1))
Newtonsoft.Json (>= 13.0.1) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) (&& (== netstandard2.1) (>= netcoreapp3.1))
Microsoft.VisualStudio.SolutionPersistence (1.0.28) - restriction: || (== net8.0) (== net9.0) (&& (== netstandard2.0) (>= net8.0)) (&& (== netstandard2.1) (>= net8.0))
Microsoft.VisualStudio.Threading (17.12.19)
Microsoft.Bcl.AsyncInterfaces (>= 6.0) - restriction: || (&& (== net8.0) (>= net472)) (&& (== net8.0) (< net6.0)) (&& (== net9.0) (>= net472)) (&& (== net9.0) (< net6.0)) (== netstandard2.0) (== netstandard2.1)
Microsoft.VisualStudio.Threading.Analyzers (>= 17.12.19)
Expand Down
2 changes: 1 addition & 1 deletion src/FsAutoComplete.Core/AbstractClassStubGenerator.fs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ let tryFindAbstractClassExprInBufferAtPos
let! inheritType, inheritMemberRange = // this must exist for abstract types
allMembers
|> List.tryPick (function
| SynMemberDefn.ImplicitInherit(inheritType, _, _, range) -> Some(inheritType, range)
| SynMemberDefn.ImplicitInherit(inheritType = inheritType; range = range) -> Some(inheritType, range)
| _ -> None)

let furthestMemberToSkip, otherMembers =
Expand Down
2 changes: 1 addition & 1 deletion src/FsAutoComplete.Core/CompilerServiceInterface.fs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ type FSharpCompilerServiceChecker(hasAnalyzers, typecheckCacheSize, parallelRefe
enablePartialTypeChecking = not hasAnalyzers,
parallelReferenceResolution = parallelReferenceResolution,
captureIdentifiersWhenParsing = true,
useSyntaxTreeCache = true,
useTransparentCompiler = useTransparentCompiler
)

Expand Down Expand Up @@ -140,6 +139,7 @@ type FSharpCompilerServiceChecker(hasAnalyzers, typecheckCacheSize, parallelRefe

FSharpProjectSnapshot.Create(
snapshot.ProjectFileName,
snapshot.OutputFileName,
snapshot.ProjectId,
snapshot.SourceFiles,
snapshot.ReferencesOnDisk,
Expand Down
6 changes: 3 additions & 3 deletions src/FsAutoComplete.Core/FCSPatches.fs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ module SyntaxTreeOps =
| SynExpr.InferredDowncast(e, _)
| SynExpr.Lazy(e, _)
| SynExpr.TraitCall(_, _, e, _)
| SynExpr.YieldOrReturn(_, e, _)
| SynExpr.YieldOrReturnFrom(_, e, _)
| SynExpr.DoBang(e, _)
| SynExpr.YieldOrReturn(expr = e)
| SynExpr.YieldOrReturnFrom(expr = e)
| SynExpr.DoBang(expr = e)
| SynExpr.Fixed(e, _)
| SynExpr.Paren(e, _, _, _)
| SynExpr.DotLambda(expr = e) -> walkExpr e
Expand Down
6 changes: 3 additions & 3 deletions src/FsAutoComplete.Core/TestAdapter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,14 @@ let getExpectoTests (ast: ParsedInput) : TestAdapterEntry<range> list =
| SynExpr.ArrayOrListComputed(_, expr, _)
| SynExpr.ComputationExpr(expr = expr)
| SynExpr.Lambda(body = expr)
| SynExpr.YieldOrReturn(_, expr, _)
| SynExpr.YieldOrReturnFrom(_, expr, _)
| SynExpr.YieldOrReturn(expr = expr)
| SynExpr.YieldOrReturnFrom(expr = expr)
| SynExpr.New(_, _, expr, _)
| SynExpr.Assert(expr, _)
| SynExpr.Do(expr, _)
| SynExpr.Typed(expr, _, _)
| SynExpr.Paren(expr, _, _, _)
| SynExpr.DoBang(expr, _)
| SynExpr.DoBang(expr = expr)
| SynExpr.Downcast(expr, _, _)
| SynExpr.For(doBody = expr)
| SynExpr.Lazy(expr, _)
Expand Down
6 changes: 3 additions & 3 deletions src/FsAutoComplete.Core/UnionPatternMatchCaseGenerator.fs
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ let private tryFindPatternMatchExprInParsedInput (pos: Position) (parsedInput: P
| SynExpr.Null(_range)
| SynExpr.ImplicitZero(_range) -> None

| SynExpr.YieldOrReturn(_, synExpr, _range)
| SynExpr.YieldOrReturnFrom(_, synExpr, _range)
| SynExpr.DoBang(synExpr, _range) -> walkExpr synExpr
| SynExpr.YieldOrReturn(expr = synExpr)
| SynExpr.YieldOrReturnFrom(expr = synExpr)
| SynExpr.DoBang(expr = synExpr) -> walkExpr synExpr

| SynExpr.LetOrUseBang(rhs = synExpr1; andBangs = ands; body = synExpr2) ->
[ synExpr1
Expand Down
4 changes: 2 additions & 2 deletions src/FsAutoComplete.Core/UntypedAstUtils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -451,14 +451,14 @@ module Syntax =
| SynMemberDefn.ImplicitCtor(attributes = AllAttrs attrs; ctorArgs = ctorPattern) ->
List.iter walkAttribute attrs
walkPat ctorPattern
| SynMemberDefn.ImplicitInherit(t, e, _, _) ->
| SynMemberDefn.ImplicitInherit(inheritType = t; inheritArgs = e) ->
walkType t
walkExpr e
| SynMemberDefn.LetBindings(bindings, _, _, _) -> List.iter walkBinding bindings
| SynMemberDefn.Interface(t, _, members, _) ->
walkType t
members |> Option.iter (List.iter walkMember)
| SynMemberDefn.Inherit(t, _, _) -> walkType t
| SynMemberDefn.Inherit(baseType = t) -> t |> Option.iter walkType
| SynMemberDefn.ValField(field, _) -> walkField field
| SynMemberDefn.NestedType(tdef, _, _) -> walkTypeDefn tdef
| SynMemberDefn.AutoProperty(attributes = AllAttrs attrs; typeOpt = t; synExpr = e; range = _) ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ let fix (getParseResultsForFile: GetParseResultsForFile) (getLineText: GetLineTe
File = codeActionParams.TextDocument
SourceDiagnostic = Some diagnostic
Edits =
[| { Range = diagnostic.Range
[| { Range =
{ Start = diagnostic.Range.Start
End = protocolExprRange.End }
NewText = exprText } |]
Kind = FixKind.Refactor } ]

Expand Down
2 changes: 1 addition & 1 deletion src/FsAutoComplete/CommandResponse.fs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ module CommandResponse =
match x.Kind with
| Ionide.ProjInfo.InspectSln.SolutionItemKind.Unknown
| Ionide.ProjInfo.InspectSln.SolutionItemKind.Unsupported -> None
| Ionide.ProjInfo.InspectSln.SolutionItemKind.MsbuildFormat _ ->
| Ionide.ProjInfo.InspectSln.SolutionItemKind.MSBuildFormat _ ->
Some(
WorkspacePeekFoundSolutionItemKind.MsbuildFormat
{ WorkspacePeekFoundSolutionItemKindMsbuildFormat.Configurations = [] }
Expand Down
2 changes: 1 addition & 1 deletion src/FsAutoComplete/LspHelpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ module Workspace =
match x.Kind with
| Ionide.ProjInfo.InspectSln.SolutionItemKind.Unknown
| Ionide.ProjInfo.InspectSln.SolutionItemKind.Unsupported -> None
| Ionide.ProjInfo.InspectSln.SolutionItemKind.MsbuildFormat _msbuildProj ->
| Ionide.ProjInfo.InspectSln.SolutionItemKind.MSBuildFormat _msbuildProj ->
Some(
WorkspacePeekFoundSolutionItemKind.MsbuildFormat
{ WorkspacePeekFoundSolutionItemKindMsbuildFormat.Configurations = [] }
Expand Down
13 changes: 13 additions & 0 deletions src/FsAutoComplete/LspServers/ProjectWorkspace.fs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ module Snapshots =

let makeAdaptiveFCSSnapshot
projectFileName
outputFileName
projectId
sourceFiles
referencePaths
Expand All @@ -59,6 +60,7 @@ module Snapshots =
// If any of these change, it will create a new snapshot.
// And if any of the snapshots in the referencedProjects change, it will create a new snapshot for them as well.
let! projectFileName = projectFileName
and! outputFileName = outputFileName
and! projectId = projectId
and! sourceFiles = sourceFiles
and! referencePaths = referencePaths
Expand All @@ -81,6 +83,7 @@ module Snapshots =
return
FSharpProjectSnapshot.Create(
projectFileName,
outputFileName,
projectId,
sourceFiles,
referencePaths,
Expand All @@ -97,6 +100,7 @@ module Snapshots =

let makeAdaptiveFCSSnapshot2
projectFileName
outputFileName
projectId
(sourceFiles: alist<aval<FSharpFileSnapshot>>)
(referencePaths: aset<aval<ReferenceOnDisk>>)
Expand All @@ -113,6 +117,7 @@ module Snapshots =

makeAdaptiveFCSSnapshot
projectFileName
outputFileName
projectId
(flattenAList sourceFiles)
(flattenASet referencePaths)
Expand Down Expand Up @@ -245,6 +250,13 @@ module Snapshots =
)

let projectName = AVal.constant project.ProjectFileName

let outputFileName =
project.OtherOptions
|> Seq.tryFind (fun (x: string) -> x.StartsWith("-o:"))
|> Option.map (fun x -> x.Substring(3))
|> AVal.constant

let projectId = AVal.constant project.ProjectId


Expand Down Expand Up @@ -282,6 +294,7 @@ module Snapshots =
let snap =
makeAdaptiveFCSSnapshot2
projectName
outputFileName
projectId
sourceFiles
referencePaths
Expand Down
4 changes: 2 additions & 2 deletions test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2019,8 +2019,8 @@ let private addMissingXmlDocumentationTests state =
"""
let f x y =
/// <summary>some comment</summary>
/// <param name=""></param>
/// <param name=""></param>
/// <param name="a"></param>
/// <param name="b"></param>
/// <returns></returns>
let g a b =
a + b
Expand Down

0 comments on commit b6bfc04

Please sign in to comment.