Skip to content

Fix build hook compatibility with Hatchling 1.32.1 - #78

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: all 75 Rust tests, including integration builds 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>
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@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 86.67%. Comparing base (7b06b14) to head (e1c4431).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   86.52%   86.67%   +0.15%     
==========================================
  Files          11       12       +1     
  Lines        1551     1561      +10     
==========================================
+ Hits         1342     1353      +11     
+ Misses        209      208       -1     

☔ 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.

@timkpaine
timkpaine merged commit ffd385d into main Sep 16, 2026
6 checks passed
@timkpaine
timkpaine deleted the fix-hatchling-build-hook-interface branch September 16, 2026 18:01
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