Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated metadata::creader::resolve_crate_deps to use the correct span…
…. Clarified error message when an external crate's dependency is missing. Closes #2404.
- Loading branch information
Showing
6 changed files
with
74 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-include ../tools.mk | ||
|
||
all: | ||
$(RUSTC) --crate-type=rlib crateA.rs | ||
$(RUSTC) --crate-type=rlib crateB.rs | ||
rm $(TMPDIR)/$(call RLIB_GLOB,crateA) | ||
# Ensure crateC fails to compile since dependency crateA is missing | ||
$(RUSTC) crateC.rs 2>&1 | \ | ||
grep "error: can't find crate for \`crateA\` which \`crateB\` depends on" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// Base crate | ||
pub fn func() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
extern crate crateA; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
extern crate crateB; | ||
|
||
fn main() {} |
37bf97a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at cmacknz@37bf97a
37bf97a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging gentlefolk/rust/issue-2404 = 37bf97a into auto
37bf97a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gentlefolk/rust/issue-2404 = 37bf97a merged ok, testing candidate = 25147b2
37bf97a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/4295
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/2137
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/2138
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/4293
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/3393
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/3399
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/4308
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/3396
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/3402
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/4310
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/3396
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/3401
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/3470
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1249
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/4302
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/3403
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/3409
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/4070
37bf97a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 25147b2