Replies: 1 comment 4 replies
-
First of all to be very clear: The change released with diesel 1.4.6 is not a breaking change, because the old version of ipnetwork continues to be compatible with diesel. We only included more versions in our supported version range. If some build is broken by this it means that someone issued a plain |
Beta Was this translation helpful? Give feedback.
-
When I updated diesel from 1.4.5 to 1.4.6 (a patch level update) my environment broke. The reason it broke is that I had copied the
ipnetwork
dependency from the Diesel Cargo.toml file, and Diesel had updated its dependency version foripnetwork
, where I had not.To avoid this kind of issue I suggest that all Rust dependencies used in in
diesel::sql_types
anddiesel::<database>::types
should be reexported. I would suggest creatingrust_types
modules only containing#[cfg(feature...)] pub extern crate XXX;
for the dependencies of that database type.Users would then use for example ipnetwork by setting the
diesel/network-address
flag and usingdiesel::pg::types::rust_types::ipnetwork::IpNetwork
.This is no longer part of the rust guidelines, but seem to be the agreed upon method if third party types are to be used, according to this discussion in rust-lang.
Beta Was this translation helpful? Give feedback.
All reactions