Skip to content

Commit ce9ba98

Browse files
committed
lsp-rust: Append --no-run flag for debugging
Change the logic of lsp-rust-analyzer-debug to append --no-run when it's not already in cargo-args, not the other way round. The result is used only for obtaining the compiler-artifact, no need to run the tests to obtain it.
1 parent 7fcd17e commit ce9ba98

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
* Make lsp-headerline--check-breadcrumb public
4444
* Added Odin langauge server support [[https://github.com/DanielGavin/ols][ols]]
4545
* Fix bug in lsp-odin where ~f-join~ collapses double slashes. Using ~format~ instead.
46+
* Debugging tests in Rust no longer runs all the tests prior to launching debug session.
4647

4748
** 9.0.0
4849
* Add language server config for QML (Qt Modeling Language) using qmlls.

clients/lsp-rust.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ and run a compilation"
15541554
:label) runnable))
15551555
(pcase (aref cargo-args 0)
15561556
("run" (aset cargo-args 0 "build"))
1557-
("test" (when (-contains? (append cargo-args ()) "--no-run")
1557+
("test" (unless (-contains? (append cargo-args ()) "--no-run")
15581558
(cl-callf append cargo-args (list "--no-run")))))
15591559
(->> (append (list (executable-find "cargo"))
15601560
cargo-args

0 commit comments

Comments
 (0)