Skip to content

Fix build hook compatibility with Hatchling 1.32.1 - #132

Merged
timkpaine merged 2 commits into
mainfrom
fix-hatchling-build-hook-interface
Sep 16, 2026
Merged

timkpaine merged 2 commits into
mainfrom
fix-hatchling-build-hook-interface

Conversation

@timkpaine

@timkpaine timkpaine commented Sep 16, 2026

Copy link
Copy Markdown
Member

Description

Hatchling 1.32.1 breaks plugin imports by adding a second generic parameter to BuildHookInterface. Remove runtime generic arguments from the build hook and add a registration/construction regression test. This preserves hook compatibility with older Hatchling versions.

The same upstream release also imports hatch.plugin.manager without declaring Hatch, breaking CLI builds with ModuleNotFoundError. Exclude exactly 1.32.1 in build-system, runtime, and development requirements so installations select a working backend without requiring Hatch. Future releases remain allowed within existing version bounds.

Verified without Hatch installed: 77 selected C++ tests pass with resolved Hatchling 1.32.0, and isolated wheel/sdist builds pass. Hook regression tests were also verified against 1.20.0 and 1.32.1. Versions remain unchanged.

Type of Change

  • Bug fix

Checklist

  • Relevant local tests pass
  • Isolated wheel and source distribution builds pass
  • Full CI suite passes

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

Copy link
Copy Markdown
Contributor

Test Results

87 tests  +1   87 ✅ +1   52s ⏱️ -9s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit bb68ff3. ± Comparison against base commit 6ab620a.

@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Test Results

87 tests  +1   87 ✅ +1   1m 5s ⏱️ +4s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit b41e49a. ± Comparison against base commit 6ab620a.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.94%. Comparing base (6ab620a) to head (b41e49a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #132      +/-   ##
==========================================
+ Coverage   95.90%   95.94%   +0.03%     
==========================================
  Files          14       15       +1     
  Lines        1271     1281      +10     
==========================================
+ Hits         1219     1229      +10     
  Misses         52       52              

☔ 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 27bdedd into main Sep 16, 2026
7 checks passed
@timkpaine
timkpaine deleted the fix-hatchling-build-hook-interface branch September 16, 2026 18:02
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