-
Notifications
You must be signed in to change notification settings - Fork 270
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
Codebase Server: /getDefinition
of a data constructor results in mission definition
#1876
Comments
Would love to get folks thoughts on the right approach. I also added this to the M2 release ticket. |
I'd probably just return the type declaration that the constructor is a part of in this case. This is what we do elsewhere. Another possibility which I like less is to keep the behavior as is and force the front end to convert constructors to their corresponding type reference when requesting a definition. @runarorama WDYT? Regardless, it would also be nice if the front-end highlighted (perhaps temporarily, with a fading highlight?) the relevant constructor when opening or scrolling to the definition. |
It would be nice if the frontend could just request the type. All the necessary information is there to do something cool like highlight the relevant constructor. E.g. if the constructor requested is |
@runarorama I don't disagree with what you said that it could be handled nicely on the front end. However, if the back-end isn't prepared to do anything sensible with a constructor passed to So I'd either a) change the input type of that endpoint or b) return the decl that the constructor belongs to when a constructor is passed to |
Just discussed with @runarorama and @hojberg. @hojberg is going to handle this on the front-end - Simon feel free to create an issue to track that in the codebase-ui repo. @runarorama clarified for me - the |
Tracked here: unisonweb/codebase-ui#60 |
When requesting data constructors they come back as a
missingDefinition
.Here's
base.Map.Map
:I think we might want to return the type even though it's a term?
Credit goes to @rlmark for reporting this issue, that i'd been sitting on.
The text was updated successfully, but these errors were encountered: