Skip to content

build(homebrew): normalize remapped LCOV source paths - #5518

Merged
ReenigneArcher merged 1 commit into
masterfrom
build/homebrew-lcov-fix
Aug 17, 2026
Merged

build(homebrew): normalize remapped LCOV source paths#5518
ReenigneArcher merged 1 commit into
masterfrom
build/homebrew-lcov-fix

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

Updates lcov_for_source_files in packaging/sunshine.rb to handle Homebrew shim-rewritten paths (./src/...) and already-relative src/... entries, while still supporting absolute paths via known source prefixes. Adds a test case to verify all three path forms are normalized to src/... and that non-source entries (like ./tests/...) are excluded.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

Updates `lcov_for_source_file_record` to normalize `SF:` paths with `Pathname.cleanpath` and correctly handle Homebrew/LLVM remapped relative paths (including `build/tests/src/...` and already-relative `src/...` entries). It now rewrites valid source paths to `src/...` and skips non-source records. Adds coverage assertions in the formula test to verify remapped, compile-dir-relative, relative, absolute, and excluded test paths are handled correctly.
@ReenigneArcher
ReenigneArcher force-pushed the build/homebrew-lcov-fix branch from 3a8a570 to 617f40c Compare August 17, 2026 18:22
@sonarqubecloud

Copy link
Copy Markdown

@ReenigneArcher
ReenigneArcher merged commit f0ea536 into master Aug 17, 2026
38 of 41 checks passed
@ReenigneArcher
ReenigneArcher deleted the build/homebrew-lcov-fix branch August 17, 2026 18:50
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 31.72%. Comparing base (68a5699) to head (617f40c).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5518      +/-   ##
==========================================
+ Coverage   23.08%   31.72%   +8.64%     
==========================================
  Files         103      104       +1     
  Lines       24019    24912     +893     
  Branches    10774    11062     +288     
==========================================
+ Hits         5544     7904    +2360     
+ Misses      16061    14716    -1345     
+ Partials     2414     2292     -122     
Flag Coverage Δ
Archlinux 0.00% <ø> (ø)
FreeBSD-amd64 18.16% <ø> (+<0.01%) ⬆️
Homebrew-macos-14 28.01% <ø> (?)
Homebrew-macos-15 28.70% <ø> (?)
Homebrew-ubuntu-24.04 ?
Linux-AppImage 18.26% <ø> (ø)
Windows-AMD64 23.62% <ø> (ø)
Windows-ARM64 20.32% <ø> (ø)
macOS-arm64 25.22% <ø> (ø)
macOS-x86_64 25.86% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 64 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68a5699...617f40c. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant