Skip to content

Add Cargo dependency license bundles - #89

Merged
timkpaine merged 2 commits into
mainfrom
cargo-license-bundles
Oct 11, 2026
Merged

timkpaine merged 2 commits into
mainfrom
cargo-license-bundles

Conversation

@timkpaine

Copy link
Copy Markdown
Member

Description

Add opt-in cargo-bundle-licenses integration through the hatch-rs licenses table. Package original dependency license texts in per-artifact JSON bundles, using the existing wheel artifact registration.

Resolve selected workspace packages before collection, forward structured features and artifact environments, and expand all-features from Cargo metadata. Support reviewed previous JSON bundles and enforce complete package/license/text comparisons when check-previous is enabled. Fail on missing texts, failed collectors, unsafe destinations, output collisions, and raw Cargo dependency-selection overrides.

Document setup, wheel-only collection, conservative dependency scope, and packaging limitations. Install collector version 4.2.0 in CI. Version unchanged; no release requested.

Verified locally on macOS with Python 3.12.14 and Cargo 1.95.0: 147 tests pass, including real standalone and virtual-workspace wheels built from sdists. Ruff, ty, documentation checks, wheel/sdist builds, twine, and check-dist pass.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup
  • CI / build configuration
  • Other (describe below)

Checklist

  • Linting passes (make lint)
  • Tests pass (make test)
  • New tests added for new functionality
  • Documentation updated (if applicable)
  • Changelog / version bump (if applicable)

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.39228% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.92%. Comparing base (a22f633) to head (ff7ff52).

Files with missing lines Patch % Lines
hatch_rs/structs.py 95.83% 4 Missing ⚠️
hatch_rs/tests/test_licenses.py 99.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
+ Coverage   87.46%   90.92%   +3.46%     
==========================================
  Files          12       13       +1     
  Lines        1699     2006     +307     
==========================================
+ Hits         1486     1824     +338     
+ Misses        213      182      -31     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@timkpaine
timkpaine merged commit 81b3de7 into main Oct 11, 2026
6 checks passed
@timkpaine
timkpaine deleted the cargo-license-bundles branch October 11, 2026 18:44
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