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

What does the "Big O" mean in the tooltip of an error? #6160

Closed
abelbraaksma opened this issue Jan 29, 2019 · 10 comments · Fixed by #9563
Closed

What does the "Big O" mean in the tooltip of an error? #6160

abelbraaksma opened this issue Jan 29, 2019 · 10 comments · Fixed by #9563
Labels
Area-LangService-API Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone

Comments

@abelbraaksma
Copy link
Contributor

I just noticed the following in the tooltip of an error in VS 2017:

image

I doubt this is a bug, but it confused me a little. Does it mean it is waiting for tasks to complete? Or does it signify something otherwise sensible?

Repro steps

The error can be seen, among others, with this code snippet (the actual error is sound, the bug report is about the mysterious "O"):

type ObjectWithPrivCtor private (x: string) =
    static member X = ()
    
module SomeModule =
    let Create x = ObjectWithPrivCtor(x)

Expected behavior

Not sure, some text perhaps? On most objects, it would show the declaration, i.e. in this case, it should show this (but then the error underneath):

image

Actual behavior

The Big O ;)

Known workarounds

None

Related information

VS 2017, 15.9.5

@TIHan
Copy link
Member

TIHan commented Jan 29, 2019

Ok, that is.. very weird. Are you able to reproduce this in a simple ConsoleApp project?

@cartermp
Copy link
Contributor

Yep that's definitely a bug. From a script file in vs2019 p2:

image

@cartermp
Copy link
Contributor

It should be showing the error glyph, but for some reason that's not happening.

@cartermp cartermp added this to the 16.0 milestone Jan 30, 2019
@abelbraaksma
Copy link
Contributor Author

Are you able to reproduce this in a simple ConsoleApp project?

@TIHan, I should have been clearer, I reproduced it in a clean console project before posting.

Also, I've seen it longer before but don't know exactly when it appeared first. My guess is that it has something to do with scoping rules, but in earlier, pre 15.6 (I think) this didn't happen.

@TIHan
Copy link
Member

TIHan commented Jan 30, 2019

No worries, just wanted to be sure. Seems @cartermp reproduced it easily as well. So this is definitely a bug. :)

@cartermp cartermp modified the milestones: 16.0, 16.1 Feb 21, 2019
@cartermp cartermp modified the milestones: 16.1, 16.2 Apr 23, 2019
@cartermp cartermp modified the milestones: 16.2, Backlog Apr 30, 2019
@abelbraaksma
Copy link
Contributor Author

I had a quick look at this, and found the part where the icon-glyphs are used, and they seem sound. But then I realized that this is an error, which doesn't show/use those special glyphs.

@TIHan or @cartermp, could any of you point me or hint me to the location where these tooltips are generated? I placed a bunch of breakpoints at what I thought were reasonable locations, but they weren't it.

(I know this is a very minor thing with near-zero priority, but I like to pick up a few minor things to get a better feel for this part of the compiler).

@cartermp
Copy link
Contributor

This is KnownImageIds.None from here: https://github.com/dotnet/fsharp/blob/master/vsintegration/src/FSharp.Editor/LanguageService/Tokenizer.fs#L150

It might be a little tricky case, since the Item that lives on the FSharpSymbol is internal (probably for good reason) and is the only thing given that can hint at what it is (a CtorGroup). Perhaps some experimentation here would be worth looking into. Since it's a constructor, it should give MethodPrivate as the KnownImageId.

@abelbraaksma
Copy link
Contributor Author

abelbraaksma commented Jul 13, 2020

Perhaps some experimentation here would be worth looking into. Since it's a constructor, it should give MethodPrivate as the KnownImageId.

Thanks @cartermp. I'll experiment some more. But frankly, I think no image should be shown at all, as for any other error, we don't show the image of the item at the cursor (probably because the signature of the item is unknown). For some reason, in this particular case, the tooltip tries to show an image anyway. Since even if I'd change it to MethodPrivate, there wouldn't be an interactive signature next to it (in this case: there's no public ctor).

@cartermp
Copy link
Contributor

@abelbraaksma I got rid of the glyph when there's nothing reasonable to show in #9563

image

@abelbraaksma
Copy link
Contributor Author

abelbraaksma commented Jul 13, 2020

Cool! Thanks!

Looking at that specific commit (3c56d86) I got close, but not close enough with my own little research ;). Tx for taking care of this :).

@dsyme dsyme added the Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. label Aug 26, 2020
@cartermp cartermp modified the milestones: Backlog, 16.9 Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-LangService-API Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
None yet
4 participants