[Bug]: just uncovered reports no uncovered changed lines on Windows

Open Beginner friendly
#1,900 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python, rust
Domain
cli, testing

Research direction

Start with scripts/coverage-diff-analysis.py and follow how it compares uncovered line paths with changed file paths. Reproduce with just uncovered on Windows and compare the reported paths; the issue also notes a UnicodeEncodeError when redirecting the full report. Done when changed uncovered lines appear in the report on Windows and redirected output handles the emoji.

Written by the indexing model from the issue text.

Description

bug

Steps to reproduce

  1. On Windows, check out a branch whose changes leave some lines uncovered.
  2. Run just uncovered, or uv run scripts/coverage-diff-analysis.py --ide-links origin/develop for the full report.

Expected

The report lists the changed lines that the tests do not cover, as it does on Linux and macOS.

Actual

just uncovered prints nothing. The full report says "No intersection found - all changed lines are covered!" and "Coverage gap in changed code: 0/N lines", while its own list of uncovered lines includes changed lines.

The uncovered lines are listed with absolute Windows paths, such as C:\...\src\signal_windows.rs, while the changed lines use paths relative to the repository root with forward slashes, such as src/signal_windows.rs. So no file matches. The script makes a path relative only when it starts with / and uses / as the separator.

Notes

  • Found with RUSTUP_TOOLCHAIN=1.95.0-x86_64-pc-windows-msvc on ARM64 Windows, since coverage does not work with the native toolchain there (#1795).
  • With the output redirected to a file, the full report also fails with UnicodeEncodeError on its emoji unless PYTHONUTF8=1 is set, because Python then writes in the console's code page.
Dominant language
Rust
Stars
3.3k
Forks
67
Avg merge
3h 4m
Merged PRs (30d)
107

Getting set up

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.

More from pamburus/hl

All issues in pamburus/hl

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.