Cargo dependencies and features


#1

Hi!
I am writing a web app with Postgres for DB , I am trying to get rust-postgres and UUID crates to work together . In the rust-postgres documentation it says to enable ‘uuid’ feature . I’ve installed both crates and enable features ,but’s not working.
I keep getting 'the trait bound uuid::Uuid: postgres::types::ToSql is not satisfied ’ same with the time crate.
my cargo.toml file

[features]
production = []
dev = []

[dependencies]
hyper= "*"
cookie = "0.2"
uuid = { version = “0.3.1”,features = [“serde”, “v4”] }
time = "0.1.35"
regex = "0.1.73"
handlebars = "0.20.2"
rustc-serialize = "0.3"
rust-crypto = "0.2.36"
rand = "0.3.14"
url = “1.2.0”

[dependencies.postgres]
version = "0.11"
features = [“uuid” ]


#2

The latest released postgres crate depends on uuid “>= 0.1, < 0.3”. It has an impl ToSql for Uuid but that won’t apply to uuid version 0.3.1 because of the “< 0.3”.

You can either downgrade your uuid dependency to 0.2 or ask @sfackler for a new postgres release that supports uuid 0.3.


#3

I downgraded to rust-postgres’s version of uuid ,it works! thanks!

I think rust-postgres already upgraded , I’ll pull the new one.


#4

Hey! Just published 0.11.11 which bumps the uuid support to include 0.3