-
Notifications
You must be signed in to change notification settings - Fork 163
Update FSharpLint version and add endpoint for F1 Help #143
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
Changes from all commits
b186a4e
acc6895
d6aafc4
a8cd6a0
a419644
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,6 +94,17 @@ type ParseAndCheckResults | |
| let! symboluses = checkResults.GetUsesOfSymbolInFile symboluse.Symbol | ||
| return Success (symboluse, symboluses) } | ||
|
|
||
| member __.TryGetF1Help (pos: Pos) (lineStr: LineStr) = | ||
| async { | ||
| match Parsing.findLongIdents(pos.Col - 1, lineStr) with | ||
| | None -> return (Failure "No ident at this location") | ||
| | Some(colu, identIsland) -> | ||
|
|
||
| let! help = checkResults.GetF1KeywordAlternate(pos.Line, colu, lineStr, identIsland) | ||
| match help with | ||
| | None -> return (Failure "No symbol information found") | ||
| | Some hlp -> return Success hlp} | ||
|
|
||
| member __.TryGetCompletions (pos: Pos) (lineStr: LineStr) filter = async { | ||
| let longName, residue = Parsing.findLongIdentsAndResidue(pos.Col - 1, lineStr) | ||
| try | ||
|
|
@@ -150,7 +161,7 @@ type FSharpCompilerServiceChecker() = | |
| let checker = | ||
| FSharpChecker.Create( | ||
| projectCacheSize = 200, | ||
| keepAllBackgroundResolutions = true, | ||
| keepAllBackgroundResolutions = false, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this have any particular performance implications?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the setting that is used by VS2017 - @dsyme comment about it: dotnet/fsharp#2124 (comment) I'm actually not sure about it - since VS is 32 bit it has memory limit. We don't have this problem - personally I'd be OK with bit higher memory usage if it gives general performance boost. I guess it would be good if @dsyme commented about it.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK let's go with that for now. |
||
| keepAssemblyContents = true) | ||
|
|
||
| let files = ConcurrentDictionary<string, Version * FileState>() | ||
|
|
@@ -234,10 +245,9 @@ type FSharpCompilerServiceChecker() = | |
| return { rawOptions with OtherOptions = opts } | ||
| } | ||
|
|
||
| member __.ParseAndCheckAllProjectsInBackground (options : FSharpProjectOptions seq) = | ||
| options | ||
| |> Seq.distinctBy(fun v -> v.ProjectFileName) | ||
| |> Seq.iter (checker.CheckProjectInBackground) | ||
| member __.CheckProjectsInBackgroundForFile (file,options : seq<string * FSharpProjectOptions>) = | ||
| defaultArg (getDependingProjects file options) [] | ||
| |> List.iter (checker.CheckProjectInBackground) | ||
|
|
||
| member __.ParseProjectsForFile(file, options : seq<string * FSharpProjectOptions> ) = | ||
| let project = options |> Seq.tryFind (fun (k,_) -> k = file) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| FSharpLint.Core | ||
| FSharp.Compiler.Service.ProjectCracker | ||
| FSharp.Compiler.Service.ProjectCracker | ||
| FSharp.Compiler.Service | ||
| FSharpLint.Core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was part of push notifications system I tried to use, which was unfortunately not working in the end. I hope to get back to it in the future.