docs(proposals): global hook for build-system dependency post-processing - #1272
docs(proposals): global hook for build-system dependency post-processing#1272vshawrh wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 56 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a proposal for a Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@vshawrh CI is failing here |
8c0b285 to
21c93a4
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/proposals/global-build-system-dependencies-hook.md`:
- Line 7: Update the GitHub PR reference in the proposal metadata to point to PR
`#1272`, replacing the current `#1271` link while preserving the existing link
format.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 79113956-8103-4ccd-aad0-004c6a8a5c2e
📒 Files selected for processing (1)
docs/proposals/global-build-system-dependencies-hook.md
| - Created: 2026-07-24 | ||
| - Status: Proposed | ||
| - GitHub issue: [#1263](https://github.com/python-wheel-build/fromager/issues/1263) | ||
| - GitHub PR: [#1271](https://github.com/python-wheel-build/fromager/pull/1271) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Correct the PR metadata.
Line 7 points readers to implementation PR #1271, but this proposal is PR #1272; #1271 is the separate implementation change. (github.com)
Suggested fix
-- GitHub PR: [`#1271`](https://github.com/python-wheel-build/fromager/pull/1271)
+- Implementation PR: [`#1271`](https://github.com/python-wheel-build/fromager/pull/1271)
+- Proposal PR: [`#1272`](https://github.com/python-wheel-build/fromager/pull/1272)As per path instructions, this is a factual metadata correction rather than a formatting suggestion.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - GitHub PR: [#1271](https://github.com/python-wheel-build/fromager/pull/1271) | |
| - Implementation PR: [`#1271`](https://github.com/python-wheel-build/fromager/pull/1271) | |
| - Proposal PR: [`#1272`](https://github.com/python-wheel-build/fromager/pull/1272) |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/proposals/global-build-system-dependencies-hook.md` at line 7, Update
the GitHub PR reference in the proposal metadata to point to PR `#1272`, replacing
the current `#1271` link while preserving the existing link format.
Source: Path instructions
21c93a4 to
2e8b635
Compare
Document the motivation, design, hook signature, chaining behavior, execution order, and interaction with existing mechanisms for the new get_build_system_dependencies global hook point. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Vikash Shaw <vshaw@redhat.com>
2e8b635 to
89eee4c
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/proposals/global-build-system-dependencies-hook.md`:
- Around line 139-146: Update the proposal documentation around
get_build_system_dependencies and its invocation examples to state that Fromager
materializes the Iterable[str] returned by overrides.find_and_invoke() into a
list before calling the global hook. Clarify that the hook receives list[str],
so expressions such as requirements + ["setuptools<82"] work for generator,
tuple, and set results from per-package plugins.
- Around line 124-134: Update the documented build-system dependency resolution
contract around the cache lookup and hook execution flow to define invalidation
when global hooks are installed or changed. Either require clearing existing
build-system-requirements.txt caches or specify how active hook
configuration/version data participates in the cache identity, ensuring stale
requirements cannot bypass run_get_build_system_dependencies_hooks().
- Around line 33-37: Update the Setuptools 81 description in the proposal to
state that it removed support for the setup.py --dry-run option and changed
related class/function signatures; remove the unsupported claim that
distutils.spawn(dry_run=...) and remove_tree(dry_run=...) were removed. Keep the
separate Setuptools 82 pkg_resources removal statement unchanged.
- Line 153: Define an explicit invocation-order contract for global
depends_on_requirement_hook handlers instead of relying on stevedore’s
HookManager discovery order. Either add a Fromager-controlled priority mechanism
or require hooks to be order-independent, and document and test behavior when
multiple global hooks modify build requirements.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f2b63f90-4cbe-484c-940a-272885cc7a66
📒 Files selected for processing (1)
docs/proposals/global-build-system-dependencies-hook.md
| setuptools 81 removed `distutils.spawn(dry_run=...)` and | ||
| `remove_tree(dry_run=...)`. setuptools 82 removed `pkg_resources` | ||
| entirely. Many PyPI packages still reference these removed APIs in their | ||
| `setup.py`, causing build failures when Fromager resolves an uncapped | ||
| setuptools. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
curl -fsSL 'https://setuptools.pypa.io/en/latest/history.html' |
rg -n -C3 'v81\.0\.0|dry-run|distutils\.spawn|remove_tree'Repository: python-wheel-build/fromager
Length of output: 2918
Clarify what Setuptools 81 removed.
Setuptools 81 removed support for the setup.py --dry-run option and changed some related class/function signatures. It does not document removal of distutils.spawn(dry_run=...) or remove_tree(dry_run=...).
Suggested wording
- setuptools 81 removed `distutils.spawn(dry_run=...)` and
- `remove_tree(dry_run=...)`.
+ setuptools 81 removed support for the `setup.py --dry-run` option
+ and changed some related distutils/setuptools signatures.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| setuptools 81 removed `distutils.spawn(dry_run=...)` and | |
| `remove_tree(dry_run=...)`. setuptools 82 removed `pkg_resources` | |
| entirely. Many PyPI packages still reference these removed APIs in their | |
| `setup.py`, causing build failures when Fromager resolves an uncapped | |
| setuptools. | |
| setuptools 81 removed support for the `setup.py --dry-run` option | |
| and changed some related distutils/setuptools signatures. setuptools 82 removed `pkg_resources` | |
| entirely. Many PyPI packages still reference these removed APIs in their | |
| `setup.py`, causing build failures when Fromager resolves an uncapped | |
| setuptools. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/proposals/global-build-system-dependencies-hook.md` around lines 33 -
37, Update the Setuptools 81 description in the proposal to state that it
removed support for the setup.py --dry-run option and changed related
class/function signatures; remove the unsupported claim that
distutils.spawn(dry_run=...) and remove_tree(dry_run=...) were removed. Keep the
separate Setuptools 82 pkg_resources removal statement unchanged.
Source: Path instructions
| 1. Check for cached requirements file (early return if exists) | ||
| 2. overrides.find_and_invoke() <-- per-package plugin or default | ||
| 3. hooks.run_get_build_system_dependencies_hooks() <-- NEW | ||
| 4. _filter_requirements() <-- marker evaluation | ||
| 5. Write requirements cache file | ||
| ``` | ||
|
|
||
| This means per-package plugins still produce the initial dependency | ||
| list, global hooks can then augment it, and marker filtering happens | ||
| last so hooks do not need to handle markers themselves. The result is | ||
| cached, so hooks run only once per package per build. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Define cache invalidation for global hook changes.
The resolver returns build-system-requirements.txt before it invokes any hook. If the file was created before a global hook was installed or changed, the hook never applies and stale requirements remain cached.
Document a required cache clear, or include the active hook configuration/version in the cache identity.
As per path instructions, this comment addresses a concrete dependency-resolution contract issue.
Also applies to: 191-192
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/proposals/global-build-system-dependencies-hook.md` around lines 124 -
134, Update the documented build-system dependency resolution contract around
the cache lookup and hook execution flow to define invalidation when global
hooks are installed or changed. Either require clearing existing
build-system-requirements.txt caches or specify how active hook
configuration/version data participates in the cache identity, ensuring stale
requirements cannot bypass run_get_build_system_dependencies_hooks().
Source: Path instructions
Summary
Adds a proposal document for extending
fromager.hookswith aget_build_system_dependenciesglobal hook point, allowing downstream projects to post-process build-system dependencies for all packages without per-package plugins.The implementation is in a separate PR: #1271
Related issue: #1263