Skip to content

Rust 1.18 regression: coinbaser 0.1.0 #40955

Closed

Description

@alexcrichton

Reported on cargobomb

boom! running `docker start -a fcd992283fd7ae3f00c77dc9c371733b58ef79cf654f4113f69b8555e73a9612`
kablam!    Compiling coinbaser v0.1.0 (file:///source)
kablam! error[E0432]: unresolved import `hyper::client::Client`
kablam!  --> src/coinbaser.rs:5:5
kablam!   |
kablam! 5 | use hyper::client::Client;
kablam!   |     ^^^^^^^^^^^^^^^^^^^^^ Maybe a missing `extern crate hyper;`?
kablam! 
kablam! error[E0432]: unresolved import `hyper::status::StatusCode`
kablam!  --> src/coinbaser.rs:6:5
kablam!   |
kablam! 6 | use hyper::status::StatusCode;
kablam!   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ Maybe a missing `extern crate hyper;`?
kablam! 
kablam! error[E0432]: unresolved import `hyper::Url`
kablam!  --> src/coinbaser.rs:7:5
kablam!   |
kablam! 7 | use hyper::Url;
kablam!   |     ^^^^^^^^^^ Maybe a missing `extern crate hyper;`?
kablam! 
kablam! error[E0432]: unresolved import `error::Error`
kablam!  --> src/coinbaser.rs:9:5
kablam!   |
kablam! 9 | use error::Error as _CoinError;
kablam!   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ Did you mean `std::error`?
kablam! 
kablam! error: main function not found
kablam! 
kablam! error: aborting due to 5 previous errors
kablam! 
kablam! error: Could not compile `coinbaser`.
kablam! 

Unfortunately the source is not available, but @patrickjm can you perhaps help reproduce?

Activity

  1. jethrogb commented on Mar 31, 2017

    @jethrogb
    Contributor

    What do you mean source is not available? How did you find the regression in the first place?

  2. brson commented on Apr 1, 2017

    @brson
    Contributor

    @jethrogb I mean that I can't find the git repo. The source can be acquired from the published crate tarball.

    Edit: er, I didn't file this bug, but that's what @alexcrichton meant.

  3. patrickjm commented on Apr 2, 2017

    @patrickjm

    The repo has been deleted for some time now - I tried to delete it from cargo but that's not allowed.

  4. brson commented on Apr 2, 2017

    @brson
    Contributor

    Should probably still be investigated, unless @patrickjm doesn't want us testing his yanked crate. We'll have to grab it from crates.io.

    I wonder if maybe cargobomb shouldn't test yanked crates.

  5. alexcrichton commented on Apr 3, 2017

    @alexcrichton
    MemberAuthor

    This is a regression in Cargo. With a Cargo.toml that looks like:

    [project]
    name = "foo"
    
    [[bin]]
    name = "foo"
    

    And files at src/main.rs and src/foo.rs on stable Cargo will compile src/main.rs, on beta Cargo will compile src/foo.rs instead.

    cc @jmatraszek, is this related to rust-lang/cargo#3609 perhaps?

  6. jmatraszek commented on Apr 4, 2017

    @jmatraszek

    Hi @alexcrichton, will investigate this today, but looks like it is related.

  7. alexcrichton commented on Apr 4, 2017

    @alexcrichton
    MemberAuthor

    Thanks @jmatraszek!

  8. patrickjm commented on Apr 4, 2017

    @patrickjm

    Sorry about the hassle guys. I removed it because I didn't want my useless and dead project polluting things up, but that just caused more trouble!

    No worries about testing my yanked crate. @brson

  9. alexcrichton commented on Apr 4, 2017

    @alexcrichton
    MemberAuthor

    @patrickjm oh no worries! This crate helped us detect a regression and what's what we're worried about :)

  10. jmatraszek commented on Apr 4, 2017

    @jmatraszek

    Hi @alexcrichton,
    I think this was caused by this: https://github.com/rust-lang/cargo/blob/master/src/cargo/util/toml.rs#L1367, but it worked because of the bug I fixed in 3609 (cargo always assumed src/main.rs as a source file for a bin target).

    You can find the proposed fix in rust-lang/cargo#3898. I tried to get rid of quick fixes and implement a full featured solution for inferring bin target's source file paths. Please review the inferring logic — I am not 100% sure that it covers all cargo's usecases, but it seems reasonable for me.

  11. alexcrichton commented on Apr 4, 2017

    @alexcrichton
    MemberAuthor

    Awesome thanks for the investigation @jmatraszek!

  12. added a commit that references this issue on Apr 5, 2017
  13. added a commit that references this issue on Apr 8, 2017
  14. modified the milestone: 1.18 on Apr 10, 2017
  15. added 2 commits that reference this issue on Apr 12, 2017
  16. added a commit that references this issue on Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions