Skip to content
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

get_new_workspace_deps doesn't check that dependencies are on crates.io #182

Closed
bjgill opened this issue Dec 15, 2017 · 3 comments · Fixed by #200
Closed

get_new_workspace_deps doesn't check that dependencies are on crates.io #182

bjgill opened this issue Dec 15, 2017 · 3 comments · Fixed by #200
Assignees

Comments

@bjgill
Copy link
Collaborator

bjgill commented Dec 15, 2017

I think we need to add && dependency.source.as_ref().map(|x| &**x) == Some("registry+https://github.com/rust-lang/crates.io-index")

Otherwise, in a workspace with path dependencies, we get the following after asking crates.io for the (non-existent) crate.

Command failed due to unhandled error: Invalid JSON (the crate may not exist)

Caused by: missing field `versions` at line 1 column 35
@bjgill bjgill self-assigned this Dec 15, 2017
bjgill added a commit to bjgill/cargo-edit that referenced this issue Dec 23, 2017
@ordian
Copy link
Collaborator

ordian commented Feb 6, 2018

Should we also support alternative registries?

bors bot added a commit that referenced this issue Feb 16, 2018
200: Add `--precise` flag for cargo-upgrade  r=bjgill a=bjgill

Fixes #177. If this flag is provided, all dependencies upgraded will be blindly upgraded to the
version specified. Added a test for this new feature.

Also, there has been substantial refactoring. The new `Manifests` and `Dependencies` structs now
hold the logic for upgrade. This allows us to commonise the cases of a single and full
workspace upgrade quite considerably.

EDIT: this also fixes #182 (I'll open a new issue for alternate registries)
@bors bors bot closed this as completed in #200 Feb 16, 2018
@jcreedon
Copy link

jcreedon commented Feb 24, 2018

I am getting this exact same error. Seeing that it was fixed, I tried using a build from master by using cargo install --git https://github.com/killercup/cargo-edit cargo-edit but it still gives the same error. It showed Installing cargo-edit v0.3.0-beta.1 (https://github.com/killercup/cargo-edit#795876e7) and 795876e is the tip of master so theoretically the fix should be included. I am relatively new to rust, is there something I am missing?

@ordian
Copy link
Collaborator

ordian commented Feb 24, 2018

Hi @jcreedon!

Could you provide an example project you're trying to run cargo upgrade --all on?

Also, did you actually installed the latest cargo-edit (did you use the --force flag to override the existing binaries)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants