refactor: decompose build_context into focused submodules#3076
Merged
Conversation
Split build_context/mod.rs (1118 lines) into three focused files: - mod.rs (255 lines): struct definition, build_wheels() dispatch, platform tags, excludes — the orchestrator - wheels.rs (497 lines): all bridge-specific wheel builders (pyo3/abi3/cffi/uniffi/bin) and the shared write_wheel pipeline - repair.rs (396 lines): auditwheel policy checking, external lib grafting, rpath patching, artifact staging, reflink helpers Pure code-motion refactor, no logic changes, no public API changes.
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the build_context module by extracting wheel building and auditwheel/repair logic into dedicated submodules, reducing the size and responsibilities of build_context/mod.rs without intended behavior changes.
Changes:
- Extracted wheel-building logic into
src/build_context/wheels.rs. - Extracted auditwheel/repair + artifact staging/reflink helpers into
src/build_context/repair.rs. - Slimmed
src/build_context/mod.rsinto an orchestrator module wiring the new submodules.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/build_context/mod.rs | Wires in new wheels + repair submodules and removes the moved implementations from mod.rs. |
| src/build_context/wheels.rs | Hosts wheel builders (pyo3/abi3/cffi/uniffi/bin) and the shared write_wheel pipeline. |
| src/build_context/repair.rs | Hosts auditwheel policy checking, grafting/patching logic, artifact staging, and reflink helpers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split
build_context/mod.rs(1118 lines) into three focused files:build_wheels()dispatch, platform tags, excludes — the orchestratorwrite_wheelpipelinePure code-motion refactor, no logic changes, no public API changes.