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

needs cargo updated to parse latest ed2018 crates #141

Closed
matthiaskrgr opened this issue Sep 24, 2018 · 10 comments
Closed

needs cargo updated to parse latest ed2018 crates #141

matthiaskrgr opened this issue Sep 24, 2018 · 10 comments

Comments

@matthiaskrgr
Copy link

The latest cargo shipped by rust nightly has the edition = "2018" feature stabilized but cargo outdated still relies on cargo 0.28 which does not have the feature stabilized.

Thus cargo outdated fails to parse Cargo.toml's which use the ed2018 feature without the feature gate.

 error: failed to parse manifest at `/home/matthias/vcs/github/cargo-cache/Cargo.toml`
Caused by:
  editions are unstable
Caused by:
  feature `edition` is required
consider adding `cargo-features = ["edition"]` to the manifest
@joelgallant
Copy link
Contributor

joelgallant commented Sep 28, 2018

This is due to the Manifest struct not holding on to cargo-features, so the TempProject does not write them to its Cargo.toml (causing the parsing of it later on to fail).

joelgallant@6930e6a (like rust-lang/rls#1045)

This patch gets some of the way there, but the TempProject thing requires more work. I might guess that the author will just wait for this to stabilize instead of adding work for themselves, but carrying over cargo-features seems worthwhile nonetheless.

@BlinkyStitt
Copy link

I just ran into this. Worked around it by commenting out edition = "2018" in my Cargo.toml when I need to run cargo outdated.

@svenstaro
Copy link

Isn't this going to fix itself once the next rust is released which will bring edition 2018 to stable?

@aldanor
Copy link

aldanor commented Dec 6, 2018

Nope; 2018 is out today, this still fails on 1.31 stable.

@joelgallant
Copy link
Contributor

Is because it uses the API of an older version of cargo

@svenstaro
Copy link

Should be fixed by #145.

@est31
Copy link
Contributor

est31 commented Dec 22, 2018

Particularly sad for me because I just updated my copy of cargo-outdated from an ancient version that didn't have the edition feature gating yet to the broken one... I guess I'll use @bbigras 's workaround for the time being.

@kornelski
Copy link
Collaborator

This is fixed. It's waiting for crates.io release, but for now you can also install it from git.

@dbrgn
Copy link

dbrgn commented Jan 7, 2019

Any chance for a crates.io release? 🙂

@kornelski
Copy link
Collaborator

kornelski commented Jan 7, 2019

About the release, please see #153 (comment)

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

No branches or pull requests

8 participants