Skip to content
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

Fix: Several commands don't work in untitled docs #1717

Merged
merged 4 commits into from
May 29, 2022

Conversation

Booksbaum
Copy link
Contributor

Several commands don't work in untitled docs because they use FileName instead of URI:
F1 Help, Info Panel, Quick Info, Line Lense, Pipeline Hints

These are not just Ionide fixes, but require changes in FSAC too: ionide/FsAutoComplete#949


Additional fix:

  • No Quick Info in Script file

Reason: filename instead of uri was used
Update `fsharp/signatureData` and `fsharp/lineLens` to use uri

Update LineLense to use uri instead of filename for caching

Fix: InfoPanel, LineLense, PipelineHint, QuickInfo don't get updated after file parsed in untitled doc
(LineLense didn't even get created because of this)

Note: requires a patch for FSAC:
`fsharp/fileParsed` must contain uri instead of filename

Note:
`Notifications.DocumentParsedEvent.uri` is just `string` instead of `DocumentUri`:
Is before definition of `DocumentUri` and no `rec` & `let mutable` together allowed
-> `string` is kept (instead of some code restructure)
Change `HighlightingRequest`, `FSharpLiterateRequest`, `FSharpPipelineHintsRequest` to use Uri instead of FileName
* Note: Requires updated FSAC with matching changes for these requests

Note: `HighlightingRequest` isn't actually used (method with request exist, but is never called)
Additional: Not handled in FSAC

Note: `FSharpLiterateRequest` is currently uncommented in FSAC -> not handled in FSAC
@baronfel
Copy link
Contributor

These are great - there's a sort of long-standing problem that you're touching on her where many of the custom endpoints use non-LSP structures and as a result are prone to this sort of error. I'll take a detailed look today!

@baronfel
Copy link
Contributor

I've tested this locally this morning and both sets of changes are good. Thank you (yet again!) for smoothing out the rough corners of these projects. I'll merge both and get a release with these fixes out today!

Getting contributions like this is incredibly motivating for me personally, thank you for taking the time to make FSAC and Ionide better :)

@baronfel baronfel merged commit 579296d into ionide:main May 29, 2022
@Booksbaum Booksbaum deleted the untitled-uri branch May 30, 2022 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants