You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
14
13
15
14
## Motivation
16
15
@@ -24,7 +23,7 @@ Big changes are required in cargo's resolver: there is lots of new functionality
24
23
25
24
### The next six months
26
25
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.
28
27
29
28
### The "shiny future" we are working towards
30
29
@@ -43,30 +42,34 @@ Eventually we should replace the existing entangled resolver in cargo with one b
43
42
44
43
I (@eh2406) will be working full time on this effort. I am a member of the Cargo Team and a maintainer of pubgrub-rs.
45
44
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.
| Implementation work on pubgrub library | eh2046 ||
51
-
|Discussion and moral support|![Team][cargo]||
50
+
|Code review and discussion |![Team][cargo]||
52
51
53
52
### Outputs
54
53
55
54
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.
56
55
57
56
### Milestones
58
57
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.
60
59
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.
62
61
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.
64
63
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.
66
65
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.
68
71
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.
0 commit comments