Unable to Run cargo check with --package xla --no-default-features --features "trn"
#14620
-
I want rust-analyzer to build and check like this: Log of coc.nvim
:CocCommand rust-analyzer.serverVersion
QuestionI haven't been able to figure out how to successfully configure rust-analyzer to build only one package with no default features. There are certain packages which only build when a GPU is present, which is why
But the config changes appear to have no effect.
We see it is trying to build the
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? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Does setting |
Beta Was this translation helpful? Give feedback.
-
I switched to VSCode to remove vim and the coc-rust-analyzer plugin as a variable here. My settings.json: {
"rust-analyzer.cargo.extraArgs": [
"--package", "xla"
],
"rust-analyzer.cargo.noDefaultFeatures": true,
"rust-analyzer.cargo.features": [
"trn"
],
} However, rust-analyzer logs show it is still trying to build the kernels package. I believe this is because rust-analyzer is issuing this command:
Notice the "rust-analyzer.cargo.buildScripts.overrideCommand": ["/home/ubuntu/.cargo/bin/cargo", "check", "--message-format=json", "--all-targets" , "--package", "xla", "--no-default-features", "--features", "trn"],
"rust-analyzer.check.overrideCommand": ["/home/ubuntu/.cargo/bin/cargo", "check", "--message-format=json", "--all-targets" , "--package", "xla", "--no-default-features", "--features", "trn"] I had to manually override the entire build commands because by default rust-analyzer passes |
Beta Was this translation helpful? Give feedback.
I switched to VSCode to remove vim and the coc-rust-analyzer plugin as a variable here. My settings.json:
However, rust-analyzer logs show it is still trying to build the kernels package. I believe this is because rust-analyzer is issuing this command: