-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Downloading a single package is much more painful on master than on 0.31 #6518
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
Comments
FWIW |
Thanks! let package_ids: [PackageId];
let source: Box<Source + 'a>;
let config: Config;
let sources = {
let mut s = SourceMap::new();
s.insert(source);
s
};
let package_set = PackageSet::new(&package_ids, sources, config)?;
let package = package_set.get_one(package_ids[0])?; |
I feel bad for the libraries removal thing. I'd be happy to try and land some improvements to the API if you have any recommendations... |
@dwijnand I pretty much agree with you that we should be able to do that via the We can revisit adding a better API to cargo for that if the |
Good to hear! But I actually was thinking for the single download API. Perhaps source.source could have a download method that does the necessary packageset/sourcemap setup to download a package. |
That would help! |
So I was looking back at this, trying to understand what cargo API rust-semverver used to use that's now gone. And I'm confused because cargo/src/cargo/core/source/mod.rs Lines 50 to 52 in 23fa400
So going back to the outset, why doesn't that work any more? |
@dwijnand It was changed to return a |
Introduce Source::download_now Fixes #6518
Uh oh!
There was an error while loading. Please reload this page.
Problem
Downloading a single package in
cargo
0.31 was as simple as:With
cargo
master one needs to:This feels like a big API regression.
The text was updated successfully, but these errors were encountered: