-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PubGrub resolver #1453
base: spr/main/293590d9
Are you sure you want to change the base?
PubGrub resolver #1453
Conversation
6ac7666
to
3c2d40c
Compare
57c7fea
to
5e3f300
Compare
5e3f300
to
beead3d
Compare
57efb17
to
7bf873b
Compare
beead3d
to
8a59b68
Compare
121762e
to
c33266d
Compare
c33266d
to
93173f0
Compare
28db9a7
to
a4d0ee0
Compare
06a2207
to
73b73d5
Compare
73b73d5
to
ec64268
Compare
3fc352c
to
158859b
Compare
ef18fc7
to
8aba988
Compare
31cbe81
to
33a0dad
Compare
8aba988
to
eaf5a76
Compare
eaf5a76
to
4805d2b
Compare
4805d2b
to
45a11b8
Compare
commit-id:d55b5ecb
c117830
to
a1502d4
Compare
45a11b8
to
e80c322
Compare
@@ -142,6 +145,9 @@ xxhash-rust = { version = "0.8", features = ["xxh3"] } | |||
zip = { version = "0.6", default-features = false, features = ["deflate"] } | |||
zstd = "0.13" | |||
|
|||
[patch.'https://github.com/pubgrub-rs/pubgrub.git'] | |||
pubgrub = { git = 'https://github.com/software-mansion-labs/pubgrub.git', branch = 'dev' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you doing this instead of just depending on our fork directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semver-pubgrub
depends on pubgrub
as well 🫤
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't you change this dependency in our semver-pubgrub fork?
packages: FxOnceMap<ManifestDependency, Arc<VersionsResponse>>, | ||
} | ||
|
||
pub(crate) type FxOnceMap<K, V> = OnceMap<K, V>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
@@ -165,6 +165,7 @@ fn fetch_with_nested_paths() { | |||
Scarb::quick_snapbox() | |||
.arg("fetch") | |||
.current_dir(&t) | |||
.timeout(std::time::Duration::from_secs(60)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
@@ -71,6 +71,19 @@ fn usage() { | |||
|
|||
### | |||
|
|||
GET /index/3/b/bar.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how did it happen that this request got repeated?
let cloned_lockfile = lockfile.clone(); | ||
thread::Builder::new() | ||
.name("scarb-resolver".into()) | ||
.spawn(move || { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider moving this to a separate named function to: reduce indentation, have something named in stack trace
// Backpressure is provided by at a more granular level by `DistributionDatabase` | ||
// and `SourceDispatch`, as well as the bounded request channel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do these two names refer to?
mod solution; | ||
mod state; | ||
|
||
pub async fn resolve<'c>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is the core algorithm, so I think it would be good to have it commented (at least the above the signature, and even better describe the steps of the algorithm).
fn format_error(err: PubGrubError<PubGrubDependencyProvider>) -> anyhow::Error { | ||
match err { | ||
PubGrubError::NoSolution(derivation_tree) => { | ||
anyhow::format_err!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: import directly
Stack: