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
Add FSharpChecker.ParseFileNoCache #7108
Conversation
Ah, the service.fs split. I need to rebase. |
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.
Small change
src/fsharp/service/service.fsi
Outdated
@@ -113,6 +113,9 @@ type public FSharpChecker = | |||
/// <param name="userOpName">An optional string used for tracing compiler operations associated with this request.</param> | |||
member ParseFile: filename: string * sourceText: ISourceText * options: FSharpParsingOptions * ?userOpName: string -> Async<FSharpParseFileResults> | |||
|
|||
/// Parse a source code file, returning a handle that can be used for obtaining navigation bar information. |
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.
Heh, I see that this summary is similar to the other summary. Would you mind updating both? Something like this:
Parse a source code file, returning a type that represents a parsed document whose contents can be traversed for various features.
Additionally, a <param>
comment is needed for each parameter.
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.
Sure, I like your summary suggestion.
I'd personally remove param comments for both overloads due to quite self-describing parameter names if it was OK.
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.
Implementation is fine. I think the API is alright too.
One thing I worry about is having multiple APIs with "NoCache" now. What if we want to check a file but not cache its results, do we add another API like a "CheckFileInProjectNoCache" ? I guess that seems fine because the method has clear intent.
@TIHan I'd expect it to be added if it was needed by someone. At least we're adding it when found we need it for parsing. :) |
Adds API to get parse results when we don't want it to be cached or use previous results.