Skip to content

Commit

Permalink
bump to newer FCS
Browse files Browse the repository at this point in the history
  • Loading branch information
baronfel committed Jun 1, 2022
1 parent f9f69d1 commit 95a1a0d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 30 deletions.
10 changes: 5 additions & 5 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ NUGET
FSharp.Compiler.Service (>= 41.0.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Core (>= 6.0.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net5.0))
McMaster.NETCore.Plugins (>= 1.4) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net5.0))
FSharp.Compiler.Service (41.0.3)
FSharp.Core (6.0.3)
FSharp.Compiler.Service (41.0.4)
FSharp.Core (6.0.4)
Microsoft.Build.Framework (>= 17.0)
Microsoft.Build.Tasks.Core (>= 17.0)
Microsoft.Build.Utilities.Core (>= 17.0)
Expand Down Expand Up @@ -69,9 +69,9 @@ NUGET
FSharp.Control.Reactive (5.0.2) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net6.0))
FSharp.Core (>= 4.7.2)
System.Reactive (>= 5.0)
FSharp.Core (6.0.3) - content: none
FSharp.Formatting (15.0)
FSharp.Compiler.Service (41.0.3) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netstandard2.1))
FSharp.Core (6.0.4) - content: none
FSharp.Formatting (14.0.1)
FSharp.Compiler.Service (>= 40.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netstandard2.1))
FSharp.UMX (1.1)
FSharp.Core (>= 4.3.4)
FSharpLint.Core (0.21.2)
Expand Down
3 changes: 2 additions & 1 deletion src/FsAutoComplete.Core/CompilerServiceInterface.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ type Version = int
type FSharpCompilerServiceChecker(hasAnalyzers) =
let checker =
FSharpChecker.Create(
projectCacheSize = 200,
projectCacheSize = 20,
keepAllBackgroundResolutions = true,
keepAllBackgroundSymbolUses = true,
keepAssemblyContents = hasAnalyzers,
suggestNamesForErrors = true,
enablePartialTypeChecking = not hasAnalyzers,
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 @@ -220,7 +220,7 @@ let getExpectoTests (ast: ParsedInput) : TestAdapterEntry<range> list =
Type = "" }

match ast with
| ParsedInput.ImplFile (ParsedImplFileInput (_, _, _, _, _, modules, _)) -> visitModulesAndNamespaces allTests modules
| ParsedInput.ImplFile (ParsedImplFileInput (modules = modules)) -> visitModulesAndNamespaces allTests modules
| _ -> ()

List.ofSeq allTests.Childs
Expand Down Expand Up @@ -364,7 +364,7 @@ let getNUnitTest (ast: ParsedInput) : TestAdapterEntry<range> list =
Type = "" }

match ast with
| ParsedInput.ImplFile (ParsedImplFileInput (_, _, _, _, _, modules, _)) -> visitModulesAndNamespaces allTests modules
| ParsedInput.ImplFile (ParsedImplFileInput (modules = modules)) -> visitModulesAndNamespaces allTests modules
| _ -> ()

List.ofSeq allTests.Childs
Expand Down Expand Up @@ -505,7 +505,7 @@ let getXUnitTest ast : TestAdapterEntry<range> list =
Type = "" }

match ast with
| ParsedInput.ImplFile (ParsedImplFileInput (_, _, _, _, _, modules, _)) -> visitModulesAndNamespaces allTests modules
| ParsedInput.ImplFile (ParsedImplFileInput (modules = modules)) -> visitModulesAndNamespaces allTests modules
| _ -> ()

List.ofSeq allTests.Childs
6 changes: 2 additions & 4 deletions src/FsAutoComplete.Core/UnionPatternMatchCaseGenerator.fs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ let private tryFindPatternMatchExprInParsedInput (pos: Position) (parsedInput: P
else
None

let rec walkImplFileInput
(ParsedImplFileInput (_name, _isScript, _fileName, _scopedPragmas, _hashDirectives, moduleOrNamespaceList, _))
=
let rec walkImplFileInput (ParsedImplFileInput (modules = moduleOrNamespaceList)) =
List.tryPick walkSynModuleOrNamespace moduleOrNamespaceList

and walkSynModuleOrNamespace (SynModuleOrNamespace (_, _, _, decls, _, _, _, range)) =
Expand All @@ -98,7 +96,7 @@ let private tryFindPatternMatchExprInParsedInput (pos: Position) (parsedInput: P
| SynModuleDecl.NamespaceFragment (fragment) -> walkSynModuleOrNamespace fragment
| SynModuleDecl.NestedModule (decls = modules) -> List.tryPick walkSynModuleDecl modules
| SynModuleDecl.Types (typeDefs, _range) -> List.tryPick walkSynTypeDefn typeDefs
| SynModuleDecl.DoExpr (_, expr, _) -> walkExpr expr
| SynModuleDecl.Expr (expr, _) -> walkExpr expr
| SynModuleDecl.Attributes _
| SynModuleDecl.HashDirective _
| SynModuleDecl.Open _ -> None)
Expand Down
34 changes: 17 additions & 17 deletions src/FsAutoComplete.Core/UntypedAstUtils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ let internal getLongIdents (input: ParsedInput option) : IDictionary<Position, I
let addIdent (ident: Ident) =
identsByEndPos.[ident.idRange.End] <- [| ident.idText |]

let rec walkImplFileInput (ParsedImplFileInput (_, _, _, _, _, moduleOrNamespaceList, _)) =
let rec walkImplFileInput (ParsedImplFileInput (modules = moduleOrNamespaceList)) =
List.iter walkSynModuleOrNamespace moduleOrNamespaceList

and walkSynModuleOrNamespace (SynModuleOrNamespace (_, _, _, decls, _, AllAttrs attrs, _, _)) =
Expand Down Expand Up @@ -439,7 +439,7 @@ let internal getLongIdents (input: ParsedInput option) : IDictionary<Position, I
walkComponentInfo false info
List.iter walkSynModuleDecl modules
| SynModuleDecl.Let (_, bindings, _) -> List.iter walkBinding bindings
| SynModuleDecl.DoExpr (_, expr, _) -> walkExpr expr
| SynModuleDecl.Expr (expr, _) -> walkExpr expr
| SynModuleDecl.Types (types, _) -> List.iter walkTypeDefn types
| SynModuleDecl.Attributes(attributes = AllAttrs attrs) -> List.iter walkAttribute attrs
| _ -> ()
Expand All @@ -456,7 +456,7 @@ let internal isTypedBindingAtPosition (input: ParsedInput) (r: Range) : bool =

let isInside (ran: Range) = Range.rangeContainsRange ran r

let rec walkImplFileInput (ParsedImplFileInput (_, _, _, _, _, moduleOrNamespaceList, _)) =
let rec walkImplFileInput (ParsedImplFileInput (modules = moduleOrNamespaceList)) =
List.iter walkSynModuleOrNamespace moduleOrNamespaceList

and walkSynModuleOrNamespace (SynModuleOrNamespace (_, _, _, decls, _, AllAttrs attrs, _, _)) =
Expand Down Expand Up @@ -639,7 +639,7 @@ let internal isTypedBindingAtPosition (input: ParsedInput) (r: Range) : bool =
| SynExpr.NamedIndexedPropertySet (ident, e1, e2, _) -> List.iter walkExpr [ e1; e2 ]
| SynExpr.DotNamedIndexedPropertySet (e1, ident, e2, e3, _) -> List.iter walkExpr [ e1; e2; e3 ]
| SynExpr.JoinIn (e1, _, e2, _) -> List.iter walkExpr [ e1; e2 ]
| SynExpr.LetOrUseBang (_, _, _, pat, _, e1, ands, e2, _) ->
| SynExpr.LetOrUseBang (_, _, _, pat, e1, ands, e2, _, _) ->
walkPat pat
walkExpr e1

Expand Down Expand Up @@ -791,7 +791,7 @@ let internal isTypedBindingAtPosition (input: ParsedInput) (r: Range) : bool =
walkComponentInfo false info
List.iter walkSynModuleDecl modules
| SynModuleDecl.Let (_, bindings, _) -> List.iter walkBinding bindings
| SynModuleDecl.DoExpr (_, expr, _) -> walkExpr expr
| SynModuleDecl.Expr (expr, _) -> walkExpr expr
| SynModuleDecl.Types (types, _) -> List.iter walkTypeDefn types
| SynModuleDecl.Attributes(attributes = AllAttrs attrs) -> List.iter walkAttribute attrs
| _ -> ()
Expand All @@ -816,7 +816,7 @@ let internal getRangesAtPosition input (r: Position) : Range list =



let rec walkImplFileInput (ParsedImplFileInput (_, _, _, _, _, moduleOrNamespaceList, _)) =
let rec walkImplFileInput (ParsedImplFileInput (modules = moduleOrNamespaceList)) =
List.iter walkSynModuleOrNamespace moduleOrNamespaceList

and walkSynModuleOrNamespace (SynModuleOrNamespace (_, _, _, decls, _, AllAttrs attrs, _, r)) =
Expand Down Expand Up @@ -1358,7 +1358,7 @@ let internal getRangesAtPosition input (r: Position) : Range list =
| SynModuleDecl.Let (_, bindings, r) ->
addIfInside r
List.iter walkBinding bindings
| SynModuleDecl.DoExpr (_, expr, r) ->
| SynModuleDecl.Expr (expr, r) ->
addIfInside r
walkExpr expr
| SynModuleDecl.Types (types, r) ->
Expand Down Expand Up @@ -1512,7 +1512,7 @@ let getQuotationRanges ast =
decls
|> List.iter (function
| SynModuleDecl.Let (_, bindings, _) -> visitBindindgs bindings
| SynModuleDecl.DoExpr (_, expr, _) -> visitExpr expr
| SynModuleDecl.Expr (expr, _) -> visitExpr expr
| SynModuleDecl.Types (types, _) -> List.iter visitType types
| SynModuleDecl.NestedModule (decls = decls) -> visitDeclarations decls
| _ -> ())
Expand All @@ -1523,7 +1523,7 @@ let getQuotationRanges ast =

ast
|> Option.iter (function
| ParsedInput.ImplFile (ParsedImplFileInput (_, _, _, _, _, modules, _)) -> visitModulesAndNamespaces modules
| ParsedInput.ImplFile (ParsedImplFileInput (modules = modules)) -> visitModulesAndNamespaces modules
| _ -> ())

quotationRanges
Expand Down Expand Up @@ -1629,7 +1629,7 @@ let internal getStringLiterals ast : Range list =
for declaration in decls do
match declaration with
| SynModuleDecl.Let (_, bindings, _) -> visitBindindgs bindings
| SynModuleDecl.DoExpr (_, expr, _) -> visitExpr expr
| SynModuleDecl.Expr (expr, _) -> visitExpr expr
| SynModuleDecl.Types (types, _) ->
for ty in types do
visitTypeDefn ty
Expand All @@ -1641,7 +1641,7 @@ let internal getStringLiterals ast : Range list =

ast
|> Option.iter (function
| ParsedInput.ImplFile (ParsedImplFileInput (_, _, _, _, _, modules, _)) -> visitModulesAndNamespaces modules
| ParsedInput.ImplFile (ParsedImplFileInput (modules = modules)) -> visitModulesAndNamespaces modules
| _ -> ())

List.ofSeq result
Expand All @@ -1650,7 +1650,7 @@ let internal getStringLiterals ast : Range list =
let getModuleOrNamespacePath (pos: Position) (ast: ParsedInput) =
let idents =
match ast with
| ParsedInput.ImplFile (ParsedImplFileInput (_, _, _, _, _, modules, _)) ->
| ParsedInput.ImplFile (ParsedImplFileInput (modules = modules)) ->
let rec walkModuleOrNamespace idents (decls, moduleRange) =
decls
|> List.fold
Expand All @@ -1676,7 +1676,7 @@ let getModuleOrNamespacePath (pos: Position) (ast: ParsedInput) =
else
acc)
[]
| ParsedInput.SigFile (ParsedSigFileInput (_, _, _, _, modules)) ->
| ParsedInput.SigFile (ParsedSigFileInput (modules = modules)) ->
let rec walkModuleOrNamespaceSig idents (decls, moduleRange) =
decls
|> List.fold
Expand Down Expand Up @@ -1811,7 +1811,7 @@ module HashDirectiveInfo =
| _ -> () |]

match ast with
| ParsedInput.ImplFile (ParsedImplFileInput (fn, _, _, _, _, modules, _)) -> parseDirectives modules fn
| ParsedInput.ImplFile (ParsedImplFileInput (fileName = fn; modules = modules)) -> parseDirectives modules fn
| _ -> [||]

/// returns the Some (complete file name of a resolved #load directive at position) or None
Expand Down Expand Up @@ -1843,8 +1843,8 @@ module Printf =
appStack.Value <- [ appWithArg ]
| _ -> appStack.Value <- appWithArg :: appStack.Value

let rec walkImplFileInput (ParsedImplFileInput (_, _, _, _, _, moduleOrNamespaceList, _)) =
List.iter walkSynModuleOrNamespace moduleOrNamespaceList
let rec walkImplFileInput (ParsedImplFileInput (modules = modules)) =
List.iter walkSynModuleOrNamespace modules

and walkSynModuleOrNamespace (SynModuleOrNamespace (_, _, _, decls, _, _, _, _)) = List.iter walkSynModuleDecl decls

Expand Down Expand Up @@ -2126,7 +2126,7 @@ module Printf =
| SynModuleDecl.NamespaceFragment fragment -> walkSynModuleOrNamespace fragment
| SynModuleDecl.NestedModule (decls = modules) -> List.iter walkSynModuleDecl modules
| SynModuleDecl.Let (_, bindings, _) -> List.iter walkBinding bindings
| SynModuleDecl.DoExpr (_, expr, _) -> walkExpr expr
| SynModuleDecl.Expr (expr, _) -> walkExpr expr
| SynModuleDecl.Types (types, _) -> List.iter walkTypeDefn types
| _ -> ()

Expand Down

0 comments on commit 95a1a0d

Please sign in to comment.