rust-lang / rust-lang/rust-analyzer

Collapse runnable test lenses if a macro creates too many

Open
#10,244 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-feature S-actionable
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

Currently when a macro invocation creates more than one runnable test lens we give the lenses the functions name and still show them like here:
image
This works fine for a small number of lenses but can quickly become overwhelming, includeing bindgen output is a prime example for this:
image
Instead we should collapse these into one special lense that offers a selection on which test to run if a macro expands to X or more lenses.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the macro-expansion examples in the issue and tracing how runnable test lenses are generated and displayed. Determine the threshold for collapsing multiple lenses, then verify that a collapsed lens offers a test-selection menu and that small numbers of lenses retain their current behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
developer-experience, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.