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

cannot jump to code generated by tonic grpc #417

Closed
GopherJ opened this issue Oct 15, 2020 · 10 comments
Closed

cannot jump to code generated by tonic grpc #417

GopherJ opened this issue Oct 15, 2020 · 10 comments

Comments

@GopherJ
Copy link
Contributor

GopherJ commented Oct 15, 2020

See also: rust-lang/rust-analyzer#5799

I tested it works in Vscode but not with coc.nvim + coc-rust-analyzer

@fannheyward
Copy link
Owner

Please provide steps to reproduce this issue with coc-rust-analyzer.

@GopherJ
Copy link
Contributor Author

GopherJ commented Oct 19, 2020

Hi @fannheyward here are the steps to reproduce:

git clone https://github.com/hyperium/tonic
cd tonic/examples/src/helloworld
vim client.rs

then move cursor to say_hello

    let response = client.say_hello(request).await?;

and hit:

gd

@fannheyward
Copy link
Owner

jumpDefinition on say_hello will goto server.rs L15, async fn say_hello, does this is your expect?

Tested with VSCode, can't jump on say_hello.

@GopherJ
Copy link
Contributor Author

GopherJ commented Oct 20, 2020

@fannheyward are you able to jump to HelloRequest? I seem to give you a bad example.

The problem that I'm having is: I cannot jump to type defined by proto file(a automatically generated rust file and it's located in target/debug).

VScode works well on this point you may need add some configs

@fannheyward
Copy link
Owner

Do you means ./target/debug/build/helloworld-tonic-06a6a2f05b82a4ad/out/helloworld.rs file, which defined HelloRequest struct?

I can't jump to this with VSCode, with "rust-analyzer.cargo.loadOutDirsFromCheck": true

@GopherJ
Copy link
Contributor Author

GopherJ commented Oct 20, 2020

@fannheyward yes I mean that file. I cannot jump into it using coc-rust-analyzer but I succeed with VSCode, maybe it's related to version of RA and your rustup channel

@fannheyward
Copy link
Owner

Tested with RA nightly + rustup nightly + VSCode, still don't work...

@lnicola
Copy link
Contributor

lnicola commented Oct 20, 2020

@fannheyward did you enable proc macro and build script support?

Ah, you said you did.

@lnicola
Copy link
Contributor

lnicola commented Oct 20, 2020

Actually, it doesn't work for me either 😕.

@GopherJ
Copy link
Contributor Author

GopherJ commented Oct 20, 2020

Strange it worked for me some days ago...what happened:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants