Skip to content

unused can run for minutes without output #2811

Description

@Widthdom

Summary

unused can run for a long time with no progress, partial output, or bounded completion signal, even when a small --limit is provided.

Observed

During dogfooding on the current repository, I ran:

dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll unused --path src/ --exclude-tests --json --limit 50

The command produced no output after more than 90 seconds. I eventually identified the running process and killed it:

  • PID: 9124
  • command: dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll unused --path src/ --exclude-tests --json --limit 50
  • exit after kill: 143

Expected

For expensive analysis commands, one or more of these should be true:

  • --limit should materially bound the work;
  • JSON mode should offer progress or a clear slow-query/profile path;
  • the command should emit a diagnostic explaining what phase is expensive;
  • the implementation should avoid unbounded joins/scans where possible.

Impact

Agents and users cannot distinguish a legitimate long-running analysis from a hang. This interrupts code-search-driven audits and makes unused hard to trust in automation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions