Skip to content

(refactor): Move caching from bootstrapper to resolver#941

Merged
rd4398 merged 1 commit intopython-wheel-build:mainfrom
rd4398:refactor-move-cache-to-resolver
Mar 4, 2026
Merged

(refactor): Move caching from bootstrapper to resolver#941
rd4398 merged 1 commit intopython-wheel-build:mainfrom
rd4398:refactor-move-cache-to-resolver

Conversation

@rd4398
Copy link
Contributor

@rd4398 rd4398 commented Feb 27, 2026

This commit improves cohesion by moving the session-level resolution cache (_resolved_requirements) from Bootstrapper into RequirementResolver.

The cache now lives alongside the resolution logic it supports.

Changes:

  • Added _resolved_requirements dict to RequirementResolver.init
  • Updated resolve_source() and resolve_prebuilt() to check cache first and update cache before returning
  • Added cache_resolution() public method for externally-resolved git URLs
  • Removed _resolved_requirements from Bootstrapper
  • Updated Bootstrapper.resolve_version() to use resolver.cache_resolution() for git URL results

This acts as next step towards implementing multiple version bootstrap

@rd4398 rd4398 requested a review from a team as a code owner February 27, 2026 21:04
@rd4398 rd4398 requested a review from dhellmann February 27, 2026 21:04
@rd4398
Copy link
Contributor Author

rd4398 commented Feb 27, 2026

The ticket for this is tracked downstream.

@rd4398 rd4398 force-pushed the refactor-move-cache-to-resolver branch from 472aef1 to 833dfbd Compare March 2, 2026 19:00
This commit improves cohesion by moving the session-level resolution cache
(_resolved_requirements) from Bootstrapper into RequirementResolver.

The cache now lives alongside the resolution logic it supports.

Changes:

- Added _resolved_requirements dict to RequirementResolver.__init__
- Updated resolve_source() and resolve_prebuilt() to check cache first
   and update cache before returning
- Added cache_resolution() public method for externally-resolved git URLs
- Removed _resolved_requirements from Bootstrapper
- Updated Bootstrapper.resolve_version() to use resolver.cache_resolution()
    for git URL results

This acts as next step towards implementing multiple version bootstrap

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Rohan Devasthale <rdevasth@redhat.com>
@rd4398 rd4398 force-pushed the refactor-move-cache-to-resolver branch from f9f48f4 to 454b5a6 Compare March 2, 2026 21:04
@rd4398 rd4398 merged commit 8ec6e4e into python-wheel-build:main Mar 4, 2026
47 checks passed
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.

2 participants