Skip to content

Conversation

@dfireBird
Copy link
Contributor

@dfireBird dfireBird commented Dec 20, 2025

fixes #21137

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 20, 2025
@dfireBird dfireBird force-pushed the runnable-subcommand-config branch from dc2bb03 to 97e140f Compare December 20, 2025 18:20
Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minus one thing: we generally have X_overrideCommand called for completely overriding the command, and be Option<Vec<String>>, while "X_command": "foo" is a single String and is being integrated in the existing place (cargo foo --args). You can have both are either, but please don't confuse them.

@dfireBird
Copy link
Contributor Author

Oh should this be then Option<Vec<String>>? Cuz we can't have single Single string here especially for doc tests.

@ChayimFriedman2
Copy link
Contributor

ChayimFriedman2 commented Dec 20, 2025

As I said, we generally have two configs, one X_overrideCommand: Option<Vec<String>> and one X_command: String. We can not have one if needed.

@dfireBird
Copy link
Contributor Author

I'm really sorry, I’m having some difficulty understanding what you mean.
Are you saying we need to have X_command: String and X_overrideCommand: Option<Vec<String>>, but we should not only have X_overrideCommand as I currently do now, is that right?

@ChayimFriedman2
Copy link
Contributor

Yes.

@dfireBird
Copy link
Contributor Author

dfireBird commented Dec 21, 2025

Oh I see. Thanks. Then I'll make the change for override command to be command and include an arguments config like so:

rust-analyzer.runnables.test.command: String = "test"
rust-analyzer.runnables.test.args: Vec<String> = []

So for example to use nextest those two will be

{
  "rust-analyzer.runnables.test.command": "nextest",
  "rust-analyzer.runnables.test.args": ["run"]
}

Similar for bench and doctest as well.

@dfireBird
Copy link
Contributor Author

I've pushed the changes as separate commit, so that if this change is fine I'll squash them into one before merging (if that's fine).

P.S: I'm sorry for earlier. I had some difficultly understanding what you changed were asked of me.

Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not what I suggested. I suggested a pair of fields for each configuration, X_command and X_overrideCommand. No X_args. If this setup does not work for doctests, we cam not provide X_command for it.

@dfireBird
Copy link
Contributor Author

Ah I see. Ok, then I'll remove doctests and include only bench and test.

@dfireBird dfireBird force-pushed the runnable-subcommand-config branch from 956e192 to 10ef612 Compare December 22, 2025 03:15
@dfireBird dfireBird force-pushed the runnable-subcommand-config branch from 10ef612 to 3790288 Compare December 22, 2025 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is it possible for Run Test and Run Tests in VS Code to invoke nextest?

3 participants