-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
panicked at 'could not get packages from registry; ids=...' #937
Comments
It might be worth mentioning that:
…returns nothing. But both of these return data:
Not sure what's going on here. |
This is quite interesting! A few things:
What version of |
I get my cargo distributions from rustup. I ran it yesterday afternoon, and again this morning, and I could reproduce this problem with each. I checked
However, I was suspicious about my
Now that this has been done, I can't find any way to reproduce the problem. I've tried repackaging
I've uploaded a working |
See rust-lang/cargo#937 for discussion.
...and it just broke again, even with the Looks like I'll be manually checking this for now before uploading. |
We got hit by rust-lang/cargo#937 again.
Aha! I have found the bug. The problem here is that
Right now there are weird interactions with this causing problems, I'll try to fix pronto! |
ooooooh, another thing which I believe is why I've never seen this before, is that your dependency is a crates.io-based dependency, not a path-based dependency. This line should be a |
How does that work when the crates get uploaded? Right now, I'm just Le Fri Nov 21 2014 at 15:10:34, Alex Crichton notifications@github.com a
|
All |
See the discussion here for an explanation of how this works: rust-lang/cargo#937 We also remove the "exclude" line, since it doesn't work, and it's about to become unnecessary once the bug is fixed.
This definitely seems to have fixed the problems we were seeing yesterday. But I've found another way to abuse Cargo and confuse it with nested
For me, this yields an error of the form:
I'm using last night's cargo build, as usual. I admit that I'm doing something weird, but my thought process went as follows:
Now, maybe the right answer here is to say, "Please stop creatively abusing Cargo already!" And I'd be OK with that. :-) But if this seems like a vaguely rational usecase, I thought you'd be interested in knowing about the error. And cargo probably ought to stay out of Thanks for putting up with my creative cargo misuse. :-) |
Hmm, it's fully reproducible after |
The logic for "not recursing into `target`" was pretty hokey and needed replacement. This commit also unfies the paths a bit to ensure that the main loop is the same part that adds the root package itself. This reorganization ends up closing rust-lang#937
The logic for "not recursing into `target`" was pretty hokey and needed replacement. This commit also unfies the paths a bit to ensure that the main loop is the same part that adds the root package itself. This reorganization ends up closing #937
@emk I just landed a whole mess of bug fixes onto master, would you mind updating and trying again (the updates haven't hit nightlies yet sadly). Also, do you have a set of commands to reproduce the bug? It'd help me diagnose it over on my end. |
I'm running off nightlies, so I'll add this to my to-do list for tomorrow. Anyway, I can't provide you with a step-by step repro this morning, but here's how to set one up:
Here's the [package]
name = "foo-ext"
version = "0.0.1"
authors = ["Example <git@example.com>"]
[dependencies.foo]
path = ".." This will fail with various errors, though the details vary from day-to-day. I've tested it against the most recent nightlies. Sorry I can't do more until tomorrow. :-( But thank you, and please let me know if you have any questions. |
I'm unable to reproduce with master, but I'll wait to close this until nightlies are available and you can confirm as well. |
OK, this is really weird. It's still easily reproducible for me after git clone https://github.com/emk/rust-uchardet.git
cd rust-uchardet/uchardet-encoding
cargo package
cd ..
cargo package This gives some warnings spew from my work-in-progress, and then just fails:
If the answer to this is "Please don't try that; packages shouldn't contain their own add-on packages", I'll understand. :-) |
What version of cargo are you using? I tried that sequence and it worked ok for me:
|
Hmm. This is what I had after running rustup.sh this morning: $ rustc -v I don't know why that was stale—I've been running rustup every day, pretty Re-running rustup now gets me a newer build: $ cargo -V And this one works! Thank you for your help tracking this down, and my Le Wed Nov 26 2014 at 12:37:33, Alex Crichton notifications@github.com a
|
No worries at all! Glad to hear that it's working :) Closing for now, but please feel free to reopen if you run into any more issues! |
To reproduce: Create a project using
rust new testdummy
and replace theCargo.toml
file with:Run
cargo build
. You will see:This seems to affect
uchardet
, but not the other packages I've tried.The text was updated successfully, but these errors were encountered: