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

[lsp-server] 🐞 definitions jump to the wrong project workspace #3318

Open
1 task done
karloluis opened this issue Jul 3, 2023 · 7 comments
Open
1 task done

[lsp-server] 🐞 definitions jump to the wrong project workspace #3318

karloluis opened this issue Jul 3, 2023 · 7 comments
Labels
bug lsp-rewrite lsp-server graphql-language-service-server

Comments

@karloluis
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When using the "go-to" definition shortcut the LSP may direct to the incorrect workspace folder for definitions.

Expected Behavior

When using the "go-to" definition shortcut the LSP may should direct to definitions in the same workspace unless the schema directs somewhere else.

Steps To Reproduce

1. add two folders supporting separate `graphqlrc` definitions
2. create a scalar on the first folder schema definition
3. use the scalar in a Query on the second folder schema definition
4. use "go-to" on the second folder schema for the scalar
5. the "go-to" will result in jumping to the file in the first folder

Environment

- LSP Server Version: latest
- OS: Mac OS Ventura 13.4.1 (22F82)
- LSP Client: vscode

Anything else?

https://github.com/karloluis/gql_lsp-goto-workspace_bug
@karloluis karloluis added bug lsp-server graphql-language-service-server labels Jul 3, 2023
@acao
Copy link
Member

acao commented Jul 5, 2023

there are duplicates of this somewhere.

we are undergoing a rewrite where, amongst other things, the type caches will no longer overlap across projects

@acao acao changed the title [lsp-server] 🐞 <title> [lsp-server] 🐞 definitions jump to the wrong project workspace Jul 5, 2023
@acao
Copy link
Member

acao commented Jul 5, 2023

@karloluis are you using multi-root workspaces in vscode? because that will also be addressed in the rewrite

@karloluis
Copy link
Author

I had a lot of trouble finding an existing ticket and I've known about it for some time now. Feel free to close it with a reference to where we can track progress, even if its the full rewrite project as I'd be curious to test fixes on a early build.

@karloluis
Copy link
Author

@acao Any chance you can link the re-write project/issue?

@acao
Copy link
Member

acao commented Mar 1, 2024

the PR that fixes this will be merged this weekend hopefully! I now have a high level integration suite to prove it!

@acao
Copy link
Member

acao commented Mar 1, 2024

#3521

@acao
Copy link
Member

acao commented Mar 1, 2024

there will be a blog post soon about preparations for the rewrite, as you can see are well under way! luckily your bugfix wont have to wait for the rewrite. I'm pretty sure this is a one line bug, but there may have been multiple bugs at play here, but as you can see I've added a test case for this to that PR! I also check autocomplete because users have reported cross project bugs there as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug lsp-rewrite lsp-server graphql-language-service-server
Projects
None yet
Development

No branches or pull requests

2 participants