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

Allow inverse sources request to ask for a list of targets #455

Open
agluszak opened this issue Mar 8, 2023 · 7 comments
Open

Allow inverse sources request to ask for a list of targets #455

agluszak opened this issue Mar 8, 2023 · 7 comments
Assignees
Labels
bsp-3.0 spec Involves a modification to the spec

Comments

@agluszak
Copy link
Collaborator

agluszak commented Mar 8, 2023

As opposed to the sources request, inverse sources request requires users to query for each target separately

@jastice jastice added spec Involves a modification to the spec bsp-3.0 labels Apr 13, 2023
@jastice
Copy link
Member

jastice commented Apr 13, 2023

I believe we also discussed dropping this request completely? Does any client use it?

@adpi2
Copy link
Member

adpi2 commented Apr 14, 2023

I believe we also discussed dropping this request completely?

I confirm. Let's drop it!

@tgodzik
Copy link
Collaborator

tgodzik commented Apr 14, 2023

@tgodzik
Copy link
Collaborator

tgodzik commented Apr 14, 2023

This was introduced in scalameta/metals@d9eb419 I presume needed for large Scala codebase initialy written in pants.

@adpi2
Copy link
Member

adpi2 commented Apr 14, 2023

This was introduced in scalameta/metals@d9eb419 I presume needed for large Scala codebase initialy written in pants.

So it seems we need it in Metals because Bloop/Pants can use glob patterns in their configurations to define source files. Maybe if we add glob pattern support in buildTarget/sources we don't need textDocument/inverseSources anymore.

@agluszak
Copy link
Collaborator Author

I guess globbing is something we'll want to add at some point to all requests

@abrams27
Copy link
Contributor

Maybe if we add glob pattern support in buildTarget/sources we don't need textDocument/inverseSources anymore.

if a server returns a dir as a source and user adds a file under this dir from the client pov this new file is under this build target
it is possible that it was just a coincidence and the build target actually doesnt want to include this new file (for example very funkly glob), Anyway textDocument /inverseSources doesnt solve this issue at all, since the state of "normal" sources will be broken then as well - it's more about when and how should we "reload" the state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bsp-3.0 spec Involves a modification to the spec
Projects
None yet
Development

No branches or pull requests

6 participants