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

documentLink/resolve has insufficient information in its request parameter #401

Closed
rcjsuen opened this issue Feb 10, 2018 · 5 comments
Closed
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities

Comments

@rcjsuen
Copy link
Contributor

rcjsuen commented Feb 10, 2018

Does anyone use or implement documentLink/resolve? I was going to implement this request but then realized that the single parameter of a DocumentLink in the request is not useful at all. The client may have three files opened in its editor and then asks the server to resolve a link. Then what? All the server has is a DocumentLink object with an arbitrary range. It is not possible for the server to figure out which of the three files the range is for so it can't even know what content string the range encompasses. Maybe it's abc, maybe it's 123, maybe it's http://github.com, who knows?

Am I missing something here?

@dbaeumer
Copy link
Member

dbaeumer commented Apr 9, 2018

@rcjsuen nice find. Points out no one every implemented it. We could do two things. Either add a resource to it so that the URI is known. Alternatively we can do the same as with the CompletionItem. That one has a data field that is preserved that lets the server to add information it can access on resolve.

I actually tend to do the same for DocumentLink since it is a more flexible approach. The additional informaiton the server put in might not necessarily be the document. It might be something else.

@dbaeumer dbaeumer added the bug Issue identified by VS Code Team member as probable bug label Apr 9, 2018
@dbaeumer dbaeumer added this to the On Deck milestone Apr 9, 2018
@dbaeumer
Copy link
Member

dbaeumer commented Apr 9, 2018

@rcjsuen do you want to look into this?

@dbaeumer dbaeumer added the help wanted Issues identified as good community contribution opportunities label Apr 9, 2018
@rcjsuen
Copy link
Contributor Author

rcjsuen commented Apr 9, 2018

@dbaeumer If we add a data field, is a new capability needed to state this similar to what you mentioned here?

@dbaeumer
Copy link
Member

In principal yes. For this special case since it never worked I would argue we can leave it out.

@rcjsuen
Copy link
Contributor Author

rcjsuen commented Apr 30, 2018

Closed by #464...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

2 participants