-
Notifications
You must be signed in to change notification settings - Fork 822
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
Library/Dependency information #472
Comments
That would be a good feature. However, it brings some questions:
|
There is some related discussion in #470 specifically the linked Build Server Protocol may be able to answer these questions. At Sourcegraph we need to solve this problem around dependencies. The extensions we built on top of LSP allows us to provide cross repository find references for example. I'd be happy to discuss them further and maybe we can come up with proposals to LSP and/or BSP. It is a bit out of date, but you can see in master and PRs some of the changes we made to LSP https://github.com/sourcegraph/language-server-protocol |
Can you detail what is this problem in your case. I'm not sure your need for dependencies is the same as @gorkem 's one and that the same solution can fit both. |
This sounds like what @gorkem wants? We additionally use that data to also build indexes. |
The model we were discussing recently is more about enhancing the browsing model than anything else. Basically, the language server could add nodes to the children of a particular folder URI. In this way, the semantics of this would be completely up to the language server. |
Reminds me of Eclipse Common Navigator Framework and TreeContentProviders ;) |
@keegancsmith as @tsmaeder said we had more of a browse model on mind which may include browsing inside the dependency too. Your case probably needs more attributes than we had in mind to be useful for you. Do you have any ideas on what kind of data you need? |
@mickaelistria LSP uses URIs to identify stuff. If an implementor would like to put a UUID in the URI, that's their prerogative, but I would not mandate it in the API. |
We heavily rely on using custom URIs to achieve cross dependency browsing. Our uris are essentially |
From my experiences these kind of information need to come from a project system which in many cases are connected to the used build system. Taking TS as an example this information needs to come from the settings in the tsconfig.json file since it determines which lib*.d.ts file to use. I like the discussion around this especially in the light of the proposed build server protocol. For the BSP we need to think about that in complex systems the LSP needs to consult the build system to for example correctly handle requests like call hierarchies / find references. |
@dbaeumer Yes, precise cross referencing needs to know the project model. So what is your suggestion? |
I agree. In my experience, getting this information from In the case of Scala, for example, our build systems are flexible and customizable, and that makes it difficult to get correct diagnostics from the language servers alone since all the compiler information and project dependencies live in the build systems. Our goal with BSP is to query the source of information in an extensible way, covering a subset of all the information covered by most of the build tools. As you see, it is also strongly inspired by LSP. @dbaeumer I'm open to collaborating with people interested in supporting BSP for any build tool. I propose a way we could move this forward in #470. |
I think there are two somewhat independent problems here:
I think we can tackle the second part relatively easy in a language and build-system independent manner. The simple UI solution here is to add additional read-only roots to the Explorer UI. The API could look like this: direction: ↪️ from client to server
For example, for Node projects, There's a curious case of Java's JAR files, but the API covers this case as well: uri can have a scheme like |
I will close the issue since it has not gained any traction and I don't see us working on it any time soon. |
The LSP should define a request from the client to server to obtain the libraries/dependencies on workspace that can be used to display and browse the 3rd part dependencies of a project.
The text was updated successfully, but these errors were encountered: