Skip to content

Commit d0ebeac

Browse files
committed
Udate for the next six months
1 parent f5f682e commit d0ebeac

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/2025h1/pubgrub-in-cargo.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
| --- | --- |
55
| Owner(s) | @eh2406 |
66
| Teams | [cargo] |
7-
| Status | Accepted |
8-
| Tracking issue | [rust-lang/rust-project-goals#110] |
7+
| Status | Proposed |
98

109

1110
## Summary
1211

13-
Implement a standalone library based on pubgrub that model's cargo dependency resolution and validate its accurate with testing against crates found on crates.io. This lays the groundwork for improved cargo error messages, extensions for hotly requested features (e.g., better MSRV support, CVE-aware resolution, etc), and support for a richer ecosystem of cargo extensions.
12+
Implement a standalone library based on pubgrub that model's cargo dependency resolution and bring it to a quality of code so that it can be maintained by the cargo team. This lays the groundwork for improved cargo error messages, extensions for hotly requested features (e.g., better MSRV support, CVE-aware resolution, etc), and support for a richer ecosystem of cargo extensions.
1413

1514
## Motivation
1615

@@ -24,7 +23,7 @@ Big changes are required in cargo's resolver: there is lots of new functionality
2423

2524
### The next six months
2625

27-
Develop a standalone library for doing dependency resolution with all the functionality already supported by cargo's resolver. Extensively test this library to ensure maximum compatibility with existing behavior. Prepare for experimental use of this library inside cargo.
26+
Develop a standalone library for doing dependency resolution with all the functionality already supported by cargo's resolver. Prepare for experimental use of this library inside cargo.
2827

2928
### The "shiny future" we are working towards
3029

@@ -43,30 +42,34 @@ Eventually we should replace the existing entangled resolver in cargo with one b
4342

4443
I (@eh2406) will be working full time on this effort. I am a member of the Cargo Team and a maintainer of pubgrub-rs.
4544

46-
Integrating the new resolver into Cargo and reaching the shiny future will require extensive collaboration and review from the Cargo Team. However, the next milestones involve independent work exhaustively searching for differences in behavior between the new and old resolvers and fixing them. So only occasional consultation-level conversations will be needed during this proposal.
45+
Integrating the new resolver into Cargo and reaching the shiny future will require extensive collaboration and review from the Cargo Team. The next milestones involve independent work polishing various projects for publication. Review support from the cargo team, identifying what about the code needs to be documented and improved will be invaluable. However, there is plenty of work clearly available to do. If team members are not available progress will continue.
4746

4847
| Subgoal | Owner(s) or team(s) | Notes |
4948
| -------------------------------------- | ------------------- | ----- |
5049
| Implementation work on pubgrub library | eh2046 | |
51-
| Discussion and moral support | ![Team] [cargo] | |
50+
| Code review and discussion | ![Team] [cargo] | |
5251

5352
### Outputs
5453

5554
Standalone crates for independent components of cargo's resolver. We have already developed https://github.com/pubgrub-rs/pubgrub for solving the core of dependency resolution and https://github.com/pubgrub-rs/semver-pubgrub for doing mathematical set operations on Semver requirements. The shiny future will involve several more crates, although their exact borders have not yet been determined. Eventually we will also be delivering a `-Z pubgrub` for testing the new resolver in cargo itself.
5655

5756
### Milestones
5857

59-
#### For all crate versions on crates.io the two resolvers agree about whether there is a solution.
58+
#### For all crate versions on crates.io the performance is acceptable.
6059

61-
Build a tool that will look at the index from crates.io and for each version of each crate, make a resolution problem out of resolving the dependencies. This tool will save off an independent test case for each time pubgrub and cargo disagree about whether there *is* a solution. This will not check if the resulting lock files are the same or even compatible, just whether they agree that a lock file *is* possible. Even this crude comparison will find many bugs in how the problem is presented to pubgrub. This is known for sure, because this milestone has already been achieved.
60+
There are some crates where pubgrub takes a long time to do resolution, and more where pubgrub takes longer than cargo's existing resolver. Investigate each of these cases and figure out if performance can be improved either by improvements to the underlying pubgrub algorithm or the way the problem is presented to pubgrub.
6261

63-
#### For all crate versions on crates.io the two resolvers accept the other one's solution.
62+
#### Make a new release of pubgrub with the features developed for the prototype.
6463

65-
The tool from previous milestone will be extended to make sure that the lock file generated by pubgrub can be accepted by cargo's resolver and vice versa. How long will this take? What will this find? No way to know. To quote [FractalFir](https://www.reddit.com/r/rust/comments/1doh929/comment/la9oo2i/) "If I knew where / how many bugs there are, I would have fixed them already. So, providing any concrete timeline is difficult."
64+
The prototype testing tool has relied on pubgrub as a git dependency. This has allowed rapid feedback on proposed changes. Before cargo can depend on PubGrub these changes need to be polished and documented to a quality appropriate for publication on crates.io.
6665

67-
#### For all crate versions on crates.io the performance is acceptable.
66+
#### Determine what portion of the prototype can be maintained as a standalone library.
67+
68+
One of the goals of this effort is to have large portions of resolution be maintained as separate packages, allowing for their use and testing without depending on all of cargo. Figure out which parts of the prototype can be separate packages and which parts should be part of cargo.
69+
70+
#### Get cargo team review of code developed in the prototype.
6871

69-
There are some crates where pubgrub takes a long time to do resolution, and many more where pubgrub takes longer than cargo's existing resolver. Investigate each of these cases and figure out if performance can be improved either by improvements to the underlying pubgrub algorithm or the way the problem is presented to pubgrub.
72+
Much of the prototypes code has only ever been understood by me. Before it becomes a critical dependency of cargo or part of cargo, it needs to be polished and documented so that other members the cargo team would be comfortable maintaining it.
7073

7174
## Frequently asked questions
7275

0 commit comments

Comments
 (0)