Skip to content

serde_json 1.0.3 broke Diesel's build #357

Closed
@sgrif

Description

@sgrif

The following code will compile successfully on its own, but fails if extern crate serde_json; is added where serde_json is 1.0.3. 1.0.2 will compile successfully.

fn returns_generic_vec_result<T>() -> Result<Vec<T>, ()> {
    Ok(Vec::new())
}

fn main() {
    let bools = vec![true, false];
    let stuff = returns_generic_vec_result().unwrap();
    assert_eq!(bools, stuff);
}

I believe that this commit is what broke things. That is technically a minor breaking change as defined in RFC #1105. That said, I personally think that implementing a trait that is not defined in your library for a type that is not defined in your library should be reserved for semver-major, as it can cause completely unrelated code to break in surprising and hard to debug ways (like this case). I figured I'd bring it to your attention either way

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions