Closed xanderdunn closed 1 year ago
Have no idea about this, you can ask help from rust-analyzer team.
coc-rust-analyzer has the same configurations (rust-analyzer.check.* etc) as VSCode rust-analyzer extension, you can try same configurations with VSCode to check it work or not.
:CocInfo
:CocCommand rust-analyzer.serverVersion
[coc.nvim] rust-analyzer 0.3.1481-standalone
:CocList extensions
Question
This is not a bug, but a usage question. I haven't been able to figure out how to have rust-analyzer build and check like this:
cargo check --package xla --no-default-features --features "trn"
. This command successfully runs from the root of my rust repo. There are certain packages which only build when a GPU is present, which is why--package xla
is necessary. There are certain features which only build when a GPU is present, which is why we need--no-default-features --features "trn"
. I attempted to reproduce these flags for rust-analyzer in:CocConfig
:But the config changes appear to have no effect.
CocCommand workspace.showOutput rust-analyzer
shows:We see it is trying to build the
kernels
module, which requires GPU. This isn't going to work, and the combination of--package xla
and--no-default-features
should prevent this, as it does when I runcargo check --package xla --no-default-features --features "trn"
on the command line. Is there any way for me to see exactly whatcargo check
command is being issued by rust-analyzer? The Cargo.toml at the root of my repo looks like this:Do you see any issues with my coc-settings.json above? What's the right way to build only a specific package in my workspace with no default features and one specific feature enabled?