Stream: t-compiler/wg-rls-2.0

Topic: Debugging Comments


Jason Williams (Oct 14 2019 at 12:44, on Zulip):

https://github.com/rust-analyzer/rust-analyzer/issues/1997 whats the best way of debugging the output of comments whilst working on the PR? i could run dbg!() but not sure where that would output too. Are people just rebuilding and re-installing the extension in vscode?

Laurențiu Nicola (Oct 14 2019 at 12:45, on Zulip):

https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/dev#logging

Laurențiu Nicola (Oct 14 2019 at 12:45, on Zulip):

RA_LOG_DIR=1 worked for me

matklad (Oct 14 2019 at 12:47, on Zulip):

The best way would be to write a test

matklad (Oct 14 2019 at 12:47, on Zulip):

I think the best way to exercise this functionality is via hover test,like this one: https://github.com/rust-analyzer/rust-analyzer/blob/1f4fbc0035a6a9ee1b599a3aa9f236989633a9f7/crates/ra_ide_api/src/hover.rs#L474-L512

Jason Williams (Oct 14 2019 at 13:09, on Zulip):

Thanks

Jason Williams (Oct 14 2019 at 13:10, on Zulip):

is not stripping tailing whitespace enough? Do we not need to replace trailing whitespace with a \n so vscode actually places the next line on a new line?

matklad (Oct 14 2019 at 13:13, on Zulip):

Hm, yeah, I think what we want for

/// hello
/// world

is

hello   \nworld\n
Jeremy Kolb (Oct 14 2019 at 13:45, on Zulip):

I think there are some basic doc comment tests in ast.rs that do not go through hover etc.

Jeremy Kolb (Oct 14 2019 at 14:00, on Zulip):

@Jason Williams These are the ones I am referring to: https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_syntax/src/ast.rs#L86-L195

Last update: Nov 19 2019 at 18:35UTC