← Back to issue list

Refactor repository method dispatching

View original Github issue

Metadata

Project
craft-parts
Number
#1259
Type
issue
State
open
Author
cmatsuoka
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed

Current evaluation

Refactor _RepositoryProxy in craft_parts/packages to use top-level methods instead of a proxy class for deferred repository detection. Triaged enhancement, no PR created, proxy code still present in codebase.

Suggested action: keep open

Reason: The issue is triaged (Status: Triaged, Type: Enhancement labels) and the _RepositoryProxy class still exists in craft_parts/packages/__init__.py, so the refactor remains applicable. Multiple call sites (executor.py, part_handler.py, lifecycle_manager.py, overlay_manager.py) would need updating, including special handling for _defer_evaluation in overlays, making it a moderate-scope internal cleanup with no user-facing impact.

Impact: 15 Quick Win: 7.5 Staleness: 70 Complexity: 50 Confidence: 80 Support Request: 5

Issue body

### What needs to get done Instead of using a proxy class for deferred repository detection, use top level methods resolving the repository internally. See https://github.com/canonical/craft-parts/pull/1231#discussion_r2321840994 ### Why it needs to get done Cleaner code.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 15
Quick Win: 7.5
Staleness: 70
Complexity: 50
Confidence: 80
Support Request: 5
keep open Refactor _RepositoryProxy in craft_parts/packages to use top-level methods instead of a proxy class for deferred repository detection. Triaged enhancement, no PR created, proxy code still present in codebase.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 45
Confidence: 85
Support Request: 0
keep open Enhancement to refactor repository method dispatching by replacing a proxy class with top-level methods. Triaged by a maintainer, currently inactive for over 10 months, awaiting implementation.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 45
Confidence: 75
Support Request: 5
keep open Refactor repository method dispatching to replace a proxy class with top-level internal resolution methods. Issue is triaged and pending implementation.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 40
Confidence: 75
Support Request: 5
close stale Replace deferred repository detection proxy with top-level methods resolving the repository internally for cleaner code. Currently triaged and awaiting implementation.

Update history

No update history recorded yet.

Related work

  • Related To: craft-parts#1231 (confidence 90%)

    Merged PR where the code review discussion (r2321840994) suggested replacing the proxy with top-level methods

Related issues

No related issues found above the similarity threshold.