Skip to content

Conversation

@cartermp
Copy link
Contributor

Local bindings:

image

Function bindings:

image

image

It won't trigger where it shouldn't.

@cartermp
Copy link
Contributor Author

This is ready for review

let! sourceText = document.GetTextAsync(context.CancellationToken)

let! parsingOptions, _ = projectInfoManager.TryGetOptionsForEditingDocumentOrProject(document, context.CancellationToken, userOpName)
let! parseResults = checker.ParseFile(document.FilePath, sourceText.ToFSharpSourceText(), parsingOptions, userOpName = userOpName) |> liftAsync
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend to use ParseDocument instead of ParseFile.

ParseFile is fine, but lately we've been consolidating parsing and checking documents through extensions to the FSharpChecker, which ParseDocument is one of those extensions.

Copy link
Contributor

@TIHan TIHan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, one minor comment about ParseFile.

@cartermp
Copy link
Contributor Author

I'll merge this in and do a PR for this and several other code fixers that use ParseFile.

@cartermp cartermp merged commit f35cf5f into dotnet:main Mar 31, 2021
@cartermp cartermp deleted the remove-unused-binding branch March 31, 2021 22:44
@cartermp
Copy link
Contributor Author

Opened #11337

nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants