-
Notifications
You must be signed in to change notification settings - Fork 823
Fix #16761 #17047
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 #16761 #17047
Conversation
❗ Release notes requiredCaution No release notes found for the changed paths (see table below). Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format. The following format is recommended for this repository:
If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request. You can open this PR in browser to add release notes: open in github.dev
|
if not res then | ||
return ImmutableArray.empty | ||
else | ||
// TODO: return something? Maybe cancelled task? |
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.
I don't think cancelled task would be any better here.
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.
I'm not sure tbh what would be a good return value here.
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.
The empty immarray feels appropriate.
It probably is an errornous situation, but might as well come from stale data.
Idea:
Send this situation to telemetry reporter.
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.
The empty immarray feels appropriate.
Empty array will lead to message which will say something like "failed to find symbol", or it leads now.
It probably is an errornous situation, but might as well come from stale data.
Not really. We return empty array when we didn't find anything. In case of external navigation, we need to handle it ourselves and somehow tell Roslyn "nothing found but it's fine", that's why I thought of cancelled task - we cancel Roslyn navigation and deal with it ourselves.
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.
Oh you are right, I misread to which branch this belongs.
I meant to log telementry in case we did not find anything ourselves.
If we did find it, cancelling it seems like a good approach, indeed.
So, two things
@T-Gro @psfinaki @KevinRansom are you okay with points above? Meaning if I leave them as I described? I'm personally okay with not using CT inside the document. LSP will have different implementations for both internal and external implementations. |
f00c88d
to
ae085a8
Compare
Co-authored-by: vzarytovskii <1260985+vzarytovskii@users.noreply.github.com>
Yes I'm fine with that. |
* Disallow calling abstract methods directly on interfaces (#17021) * Disallow calling abstract methods directly on interfaces * More tests * IWSAMs are not supported by NET472 * Update src/Compiler/Checking/ConstraintSolver.fs Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com> * fix typos * looking for the right check * Add comments * move release notes * Add a new error number and message * Update docs/release-notes/.FSharp.Compiler.Service/8.0.400.md Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> * Update docs/release-notes/.FSharp.Compiler.Service/8.0.400.md Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> * Improve error message --------- Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com> Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> * Always use `typeEquivAux EraseMeasures` (for integral range optimizations) (#17048) * Always use `typeEquivAux EraseMeasures` * Update release notes * Update baselines --------- Co-authored-by: Petr <psfinaki@users.noreply.github.com> * Error message that explicitly disallowed static abstract members in classes. (#17055) * WIP * Error message that explicitly disallowed static abstract methods in abstract classes * release notes * SynTypeDefnKind.Class * Fix #16761 (#17047) * Fix #16761 * Fully async version + ignore cancellation on external navigation * Automated command ran: fantomas Co-authored-by: vzarytovskii <1260985+vzarytovskii@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: Edgar Gonzalez <edgar.gonzalez@fundourselves.com> Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com> Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> Co-authored-by: Petr <psfinaki@users.noreply.github.com> Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Kevin Ransom (msft) <codecutter@hotmail.com>
I'm getting unwanted navigation when holding |
This pr didn't make it to any product preview yet. It should be 17.11 |
I have built my own VSIX from main. |
Then it might be happening if roslyn calls us in this case. We don't initiate any navigation ourselves. Might check it when I have time later this week. @kerams could you please create an issue? |
Description
Fixes #16761. Still missing navigating to specific range (at least I think so, needs more testing). Also not very easy to test this thing, since interop suite is nightmare to write and run locally.
TL;DR - now roslyn uses different MEF interface for navigation for F#, which before didn't have an ability to navigate to externals, this adds it - by navigating to external doc explicitly and not returning back metadata to roslyn. It also makes sure we initiate navigation on the UI thread, so we can grab needed VS services.
It's kinda a dirty workaround for the issue, but hey, it fixes navigation.