Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All it checks, unfortunately, is that you actually printed at least two lines for crateA paths and at least one line for crateB paths. But that's enough to capture the spirit of the bug, I think. I did not bother trying to verify that the paths themselves reflected where the crates end up.
- Loading branch information
Showing
6 changed files
with
100 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
-include ../tools.mk | ||
|
||
# Modelled after compile-fail/changing-crates test, but this one puts | ||
# more than one (mismatching) candidate crate into the search path, | ||
# which did not appear directly expressible in compile-fail/aux-build | ||
# infrastructure. | ||
# | ||
# Note that we move the built libraries into target direcrtories rather than | ||
# use the `--out-dir` option because the `../tools.mk` file already bakes a | ||
# use of `--out-dir` into the definition of $(RUSTC). | ||
|
||
A1=$(TMPDIR)/a1 | ||
A2=$(TMPDIR)/a2 | ||
A3=$(TMPDIR)/a3 | ||
|
||
# A hack to match distinct lines of output from a single run. | ||
LOG=$(TMPDIR)/log.txt | ||
|
||
all: | ||
mkdir -p $(A1) $(A2) $(A3) | ||
$(RUSTC) --crate-type=rlib crateA1.rs | ||
mv $(TMPDIR)/$(call RLIB_GLOB,crateA) $(A1) | ||
$(RUSTC) --crate-type=rlib -L$(A1) crateB.rs | ||
$(RUSTC) --crate-type=rlib crateA2.rs | ||
mv $(TMPDIR)/$(call RLIB_GLOB,crateA) $(A2) | ||
$(RUSTC) --crate-type=rlib crateA3.rs | ||
mv $(TMPDIR)/$(call RLIB_GLOB,crateA) $(A3) | ||
# Ensure crateC fails to compile since A1 is "missing" and A2/A3 hashes do not match | ||
$(RUSTC) -L$(A2) -L$(A3) crateC.rs >$(LOG) 2>&1 || true | ||
grep "error: found possibly newer version of crate \`crateA\` which \`crateB\` depends on" $(LOG) | ||
grep "note: perhaps this crate needs to be recompiled?" $(LOG) | ||
grep "note: crate \`crateA\` path #1:" $(LOG) | ||
grep "note: crate \`crateA\` path #2:" $(LOG) | ||
grep "note: crate \`crateB\` path #1:" $(LOG) |
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,14 @@ | ||
// 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. | ||
|
||
#![crate_id="crateA"] | ||
|
||
// Base crate | ||
pub fn func<T>() {} |
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,14 @@ | ||
// 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. | ||
|
||
#![crate_id="crateA"] | ||
|
||
// Base crate | ||
pub fn func<T>() { println!("hello"); } |
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,14 @@ | ||
// 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. | ||
|
||
#![crate_id="crateA"] | ||
|
||
// Base crate | ||
pub fn foo<T>() { println!("world!"); } |
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() {} |
f4cde4e
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 pnkfelix@f4cde4e
f4cde4e
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 pnkfelix/rust/more-fs-info-on-crate-mismatch = f4cde4e into auto
f4cde4e
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.
pnkfelix/rust/more-fs-info-on-crate-mismatch = f4cde4e merged ok, testing candidate = 339d400
f4cde4e
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/5063
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/5063
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/4155
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/4169
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/5163
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/4250
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/4258
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/5165
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/4250
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/4255
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/4321
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/2050
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/5162
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/4259
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/4270
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/4926
f4cde4e
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 = 339d400