Skip to content

Introduce the concept of a PackageManager for fetching and listing dependencies#265

Merged
jackh726 merged 2 commits into
mainfrom
pm-deps
Jul 21, 2026
Merged

Introduce the concept of a PackageManager for fetching and listing dependencies#265
jackh726 merged 2 commits into
mainfrom
pm-deps

Conversation

@jackh726

Copy link
Copy Markdown
Contributor

Part of the registry-centric plugins RFD.

Disclosure questions

AI disclosure.

  • The AI tool authored large parts of the code

jackh726 added 2 commits July 15, 2026 17:57
The in-process seam from the registry-centric plugin distribution RFD,
cut to the smallest slice that is a pure refactor: a PackageId names a
package as (pm, name, version), the PackageManager trait has a single
fetch operation, and CargoPm implements it by delegating to the
existing RustCrateFetch. The two direct fetch sites — crate-source
skill resolution and crate-info — now build a cargo id and fetch
through the seam.

No behavior change: an id's version is the same optional requirement
string RustCrateFetch::version took, and the fetched id carries back
exactly the name/version/path FetchResult did. Everything else the RFD
gives the PM layer (list_deps, list_plugins, search, more PMs, the
registry tier) is deliberately left for later steps so each can be
reviewed on its own.
The second and last behavior-preserving step: with fetch already behind
the PackageManager seam, list_deps moves the workspace dependency list
behind it too, and PredicateContext now holds PackageIds instead of
(String, semver::Version) pairs. Cargo is still the only dependency
source, so an id is an isomorphic re-representation of the pair — same
name, same version rendered as a string that parses back losslessly —
and the predicate matching logic is unchanged: a depends-on atom
matches by exact name, and a version requirement is checked when the
id's version component parses as semver (today: always). The predicate
test suite is untouched except for the representation in its fixtures.

Witnesses (the source = "crate" fetch set) and custom-predicate
selectedCrate records become PackageIds as well; the crate-skill
worklist keeps seeding from the witness name only, exactly as before.
Each of the seven former crate_pairs sites calls CargoPm.list_deps
directly — no registry/union tier, since there is only one PM.
crate_pairs itself is deleted.
@jackh726
jackh726 added this pull request to the merge queue Jul 21, 2026
Merged via the queue into main with commit d22a306 Jul 21, 2026
7 checks passed
@jackh726
jackh726 deleted the pm-deps branch July 21, 2026 19:30
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