rust-lang / rust-lang/rust-analyzer
It should be possible to test and debug `#[cfg_attr(X, ignore)]` marked runnables in isolation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Follow-up to https://github.com/rust-lang/rust-analyzer/issues/15341.
The fix for the linked issue #15341 was to flag unit tests with
#[cfg_attr(miri, ignore)]
To ignore them when miri is enabled instead of a top-level #[cfg(not(miri))].
This allowed rust-analyzer to properly identify all unit tests again.
However, it is still no longer possible to click and test or debug single unit tests flagged this way. Clicking on the in-code links no longer works as intended. For example trying to run the flagged test is as if cargo test is run with all tests filtered out.
Temporarily unflagging the respective unit test fixes the issue. However, this obviously is not an acceptable long-term solution.
I mean those IDE links/buttons:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the linked issue #15341 and reproducing the problem with a unit test marked #[cfg_attr(miri, ignore)]. Check the in-code run and debug links for that test; done means either action targets the individual test successfully instead of filtering out all tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100