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

diesel_cli install fails on master #1683

Closed
1 task
kjeremy opened this issue May 6, 2018 · 5 comments
Closed
1 task

diesel_cli install fails on master #1683

kjeremy opened this issue May 6, 2018 · 5 comments

Comments

@kjeremy
Copy link

kjeremy commented May 6, 2018

Setup

Versions

  • Rust: rustc 1.27.0-nightly (f9bfe840f 2018-05-05)
  • Diesel:
  • Database:
  • Operating System Windows 10

Feature Flags

  • diesel:

Problem Description

diesel_cli fails to compile (see message below)

What are you trying to accomplish?

install diesel_cli

What is the expected output?

Should install properly

What is the actual output?

Updating git repository `https://github.com/diesel-rs/diesel`

Installing diesel_cli v1.2.0 (https://github.com/diesel-rs/diesel#91993354)
Updating registry https://github.com/rust-lang/crates.io-index
error: failed to compile diesel_cli v1.2.0 (https://github.com/diesel-rs/diesel#91993354), intermediate artifacts can be found at C:\Users\jkolb\AppData\Local\Temp\cargo-installxs057v

Caused by:
failed to select a version for infer_schema_internals.
... required by package diesel_cli v1.2.0 (https://github.com/diesel-rs/diesel#91993354)
versions that meet the requirements ~1.2.0 are: 1.2.0

the package diesel_cli depends on infer_schema_internals, with features: serde but infer_schema_internals does not have these features.

failed to select a version for infer_schema_internals which could resolve this conflict

Are you seeing any additional errors?

Steps to reproduce

cargo install diesel_cli --git https://github.com/diesel-rs/diesel

Updating git repository `https://github.com/diesel-rs/diesel`

Installing diesel_cli v1.2.0 (https://github.com/diesel-rs/diesel#91993354)
Updating registry https://github.com/rust-lang/crates.io-index
error: failed to compile diesel_cli v1.2.0 (https://github.com/diesel-rs/diesel#91993354), intermediate artifacts can be found at C:\Users\jkolb\AppData\Local\Temp\cargo-installxs057v

Caused by:
failed to select a version for infer_schema_internals.
... required by package diesel_cli v1.2.0 (https://github.com/diesel-rs/diesel#91993354)
versions that meet the requirements ~1.2.0 are: 1.2.0

the package diesel_cli depends on infer_schema_internals, with features: serde but infer_schema_internals does not have these features.

failed to select a version for infer_schema_internals which could resolve this conflict

Checklist

  • I have already looked over the issue tracker for similar issues.
@sgrif
Copy link
Member

sgrif commented May 6, 2018

Thank you for the issue. Installing from git is not expected to work, as cargo does not provide the tools we would need to make it work. You can install the latest master version by cloning the repo locally, and running cargo install from the diesel_cli directory there.

@sgrif sgrif closed this as completed May 6, 2018
@kjeremy
Copy link
Author

kjeremy commented May 6, 2018

I can cargo build from that directory but cargo install --path . still fails with the same error.

@sgrif
Copy link
Member

sgrif commented May 6, 2018

I am able to confirm this issue.

@sgrif sgrif reopened this May 6, 2018
@sgrif
Copy link
Member

sgrif commented May 6, 2018

It looks like the inability to install a local clone was due to a recent change in behavior w/ Cargo when installing a package in a workspace. I could not install on nightly (ac3c2288f 2018-04-18), but I could install on nightly (56733bc9f 2018-02-01). I would open an issue on https://github.com/rust-lang/cargo for that. In the mean time, applying this patch locally should help:

diff --git a/diesel_cli/Cargo.toml b/diesel_cli/Cargo.toml
index 2ebe774..c397a6d 100644
--- a/diesel_cli/Cargo.toml
+++ b/diesel_cli/Cargo.toml
@@ -20,7 +20,7 @@ clap = "2.27"
 clippy = { optional = true, version = "=0.0.195" }
 diesel = { version = "~1.2.0", default-features = false }
 dotenv = ">=0.8, <0.11"
-infer_schema_internals = { version = "~1.2.0", features = ["serde"] }
+infer_schema_internals = { version = "~1.2.0", path = "../diesel_infer_schema/infer_schema_internals", features = ["serde"] }
 migrations_internals = "~1.2.0"
 serde = { version = "1.0.0", features = ["derive"] }
 tempfile = "3.0.0"

@sgrif sgrif closed this as completed May 6, 2018
@sgrif
Copy link
Member

sgrif commented May 6, 2018

I'm heading out for the rest of the day. I do not think this is a bug in Diesel. If you have more issues, others can help you at https://gitter.im/diesel-rs/diesel

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

2 participants