Skip to content

Commit

Permalink
Reprocess files after rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Nov 16, 2023
1 parent 7e1d897 commit e3d5229
Show file tree
Hide file tree
Showing 8 changed files with 4,583 additions and 4,129 deletions.
18 changes: 2 additions & 16 deletions src/FsAutoComplete.Core/CompilerServiceInterface.fs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type FSharpCompilerServiceChecker(hasAnalyzers, typecheckCacheSize, parallelRefe
| None, _
| _, None -> p
| Some fsc, Some fsi ->
let toReplace, otherOpts =
let _toReplace, otherOpts =
p.OtherOptions
|> Array.partition (fun opt ->
opt.EndsWith("FSharp.Core.dll", StringComparison.Ordinal)
Expand Down Expand Up @@ -94,20 +94,6 @@ type FSharpCompilerServiceChecker(hasAnalyzers, typecheckCacheSize, parallelRefe
else
opts

let filterBadRuntimeRefs =
let badRefs =
[ "System.Private"
"System.Runtime.WindowsRuntime"
"System.Runtime.WindowsRuntime.UI.Xaml"
"mscorlib" ]
|> List.map (fun p -> p + ".dll")

let containsBadRef (s: string) = badRefs |> List.exists (fun r -> s.EndsWith(r, StringComparison.Ordinal))

fun (projOptions: FSharpProjectOptions) ->
{ projOptions with
OtherOptions = projOptions.OtherOptions |> Array.where (containsBadRef >> not) }

/// ensures that any user-configured include/load files are added to the typechecking context
let addLoadedFiles (projectOptions: FSharpProjectOptions) =
let files = Array.append fsiAdditionalFiles projectOptions.SourceFiles
Expand Down Expand Up @@ -436,7 +422,7 @@ type FSharpCompilerServiceChecker(hasAnalyzers, typecheckCacheSize, parallelRefe
)
}

member __.GetDeclarations(fileName: string<LocalPath>, source, options, version) =
member __.GetDeclarations(fileName: string<LocalPath>, source, options, _) =
async {
checkerLogger.info (
Log.setMessage "GetDeclarations - {file}"
Expand Down
5 changes: 1 addition & 4 deletions src/FsAutoComplete/CodeFixes/RemoveUnusedBinding.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ open FSharp.Compiler.CodeAnalysis
open FSharp.Compiler.Syntax
open FSharp.Compiler.Text

let posBetween (range: Range) tester =
Position.posGeq tester range.Start // positions on this one are flipped to simulate Pos.posLte, because that doesn't exist
&& Position.posGeq range.End tester

type private ReplacementRangeResult =
| FullBinding of bindingRange: Range
Expand Down Expand Up @@ -84,7 +81,7 @@ let fix (getParseResults: GetParseResultsForFile) : CodeFix =
let fcsRange =
protocolRangeToRange (codeActionParams.TextDocument.GetFilePath()) diagnostic.Range

let! tyres, line, lines = getParseResults fileName fcsRange.Start
let! tyres, _line, lines = getParseResults fileName fcsRange.Start

let! rangeOfBinding =
tyres.GetParseResults.TryRangeOfBindingWithHeadPatternWithPos(fcsRange)
Expand Down
Loading

0 comments on commit e3d5229

Please sign in to comment.