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

Getting started cargo.toml not valid #395

Closed
viraptor opened this Issue Aug 2, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@viraptor

viraptor commented Aug 2, 2016

The getting started guide contains:

diesel_codegen = { version = "0.7.0", default-features = false, features = ["nightly", "postgres"] }

However cargo says:

error: Package `diesel_codegen v0.7.0` does not have these features: `nightly`

Using rustc 1.12.0-nightly (28ce3e8a5 2016-08-01)

@vitiral

This comment has been minimized.

vitiral commented Aug 13, 2016

I am having the same issue:

# rustup show
Default host: x86_64-unknown-linux-gnu

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)

active toolchain
----------------

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.12.0-nightly (8787a1233 2016-08-11)

I just did a literal copy-paste of the tutorial (including version = "0.7.0" and got this rather confusing error:

 diesel_demo git:(master) cargo run --bin show_posts
    Updating registry `https://github.com/rust-lang/crates.io-index`
error: Package `diesel_codegen v0.7.1` does not have these features: `nightly`

So it seems to be using v0.7.1 instead of 0.7.0.

Fix

  • Take "nightly" out of diesel_codegen and set version to "0.7.1"
  • set dotenv_macros version to "0.9.0"

Then it seems to compile and run

@vitiral

This comment has been minimized.

vitiral commented Aug 13, 2016

I would recommend just changing the "getting started" guide to using the newer versions. Not sure why Cargo is trying to get 0.7.1 when I am explicitly telling it to use 0.7.0 -- could be a Cargo bug?

@vitiral

This comment has been minimized.

vitiral commented Aug 13, 2016

@vitiral

This comment has been minimized.

vitiral commented Aug 14, 2016

re-reading the tutorial I see that you require a specific nightly version. I will just use that -- thanks!

@killercup

This comment has been minimized.

Member

killercup commented Aug 15, 2016

FYI:

Not sure why Cargo is trying to get 0.7.1 when I am explicitly telling it to use 0.7.0 -- could be a Cargo bug?

Cargo treats 0.7.0 as ^0.7.0, which is the version range ≥0.7.0 AND < 0.8.0.

@sgrif sgrif closed this Dec 10, 2016

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