Open kzhui125 opened 3 months ago
Every fn main()
in rust is supposed to have the arrow with it, the file name shouldn't change that behaviour, what is your issue with it appearing in build.rs
this is what in vscode, fn main
in rust build scripts don't have run button @versecafe
A button that doesn't work shouldn't exist, that's a design problem.
to clarify, not all build.rs files, only rust build scripts
https://doc.rust-lang.org/cargo/reference/build-scripts.html
I agree that we shouldn't show a run button in build scripts, but to just put it out there: it's a bit harder than just checking if a file is named build.rs
, as the name of a build script can be arbitrary. We'd have to piggy-back out of output of cargo metadata
for that functionality.
also files not in crates:
If the rust analyzer isn't doing anything neither is the LSP and the LSP is where the hooks for the test functions go so that last example isn't configured correctly, also why is there an expectation that it shouldn't be there, is there any issue to offering the feature?
run button
should only exists when it's runnable @versecafe
Build scripts are runnable, you usually don't want to run them on their own but they should be runnable
build scripts are for cargo build
, run them on their own are not supported now https://github.com/rust-lang/cargo/issues/7178
We use run
to print output (for example println!)
but output is not supported by build scripts now. https://github.com/rust-lang/cargo/issues/985
Should run
button be added for build scripts, click it doesn't work now(will be another bug).
Check for existing issues
Describe the bug / provide steps to reproduce it
Environment
Zed: v0.144.3 (Zed) OS: macOS 14.5.0 Memory: 32 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log