From bbd0040bb3c7f37f5af621a68dc212cdde2667ac Mon Sep 17 00:00:00 2001 From: Wesley Wiser Date: Wed, 5 Oct 2016 20:27:47 -0400 Subject: [PATCH 1/7] Fix documentation for `write!` on `std::fmt` page Fixes #36906 --- src/libcollections/fmt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs index beb3e6b3d4e31..b095b8131b644 100644 --- a/src/libcollections/fmt.rs +++ b/src/libcollections/fmt.rs @@ -261,8 +261,8 @@ //! This and `writeln` are two macros which are used to emit the format string //! to a specified stream. This is used to prevent intermediate allocations of //! format strings and instead directly write the output. Under the hood, this -//! function is actually invoking the `write` function defined in this module. -//! Example usage is: +//! function is actually invoking the `write_fmt` function defined on the +//! `std::io::Write` trait. Example usage is: //! //! ``` //! # #![allow(unused_must_use)] From 9ca382f95fff732f6cd2a6cffbd04825ff6c4145 Mon Sep 17 00:00:00 2001 From: Ahmed Charles Date: Fri, 2 Sep 2016 01:55:29 -0700 Subject: [PATCH 2/7] Use workspaces and switch to a single Cargo.lock. This involves hacking the code used to run cargo test on various packages, because it reads Cargo.lock to determine which packages should be tested. This change implements a blacklist, since that will catch new crates when they are added in the future. --- src/Cargo.lock | 808 +++++++++++++++++++++ src/Cargo.toml | 13 + src/bootstrap/Cargo.lock | 180 ----- src/bootstrap/check.rs | 52 +- src/libpanic_unwind/Cargo.lock | 36 - src/rustc/Cargo.lock | 413 ----------- src/rustc/std_shim/Cargo.lock | 132 ---- src/rustc/test_shim/Cargo.lock | 23 - src/tools/cargotest/Cargo.lock | 4 - src/tools/compiletest/Cargo.lock | 92 --- src/tools/error_index_generator/Cargo.lock | 4 - src/tools/linkchecker/Cargo.lock | 50 -- src/tools/rustbook/Cargo.lock | 4 - src/tools/tidy/Cargo.lock | 4 - 14 files changed, 864 insertions(+), 951 deletions(-) create mode 100644 src/Cargo.lock create mode 100644 src/Cargo.toml delete mode 100644 src/bootstrap/Cargo.lock delete mode 100644 src/libpanic_unwind/Cargo.lock delete mode 100644 src/rustc/Cargo.lock delete mode 100644 src/rustc/std_shim/Cargo.lock delete mode 100644 src/rustc/test_shim/Cargo.lock delete mode 100644 src/tools/cargotest/Cargo.lock delete mode 100644 src/tools/compiletest/Cargo.lock delete mode 100644 src/tools/error_index_generator/Cargo.lock delete mode 100644 src/tools/linkchecker/Cargo.lock delete mode 100644 src/tools/rustbook/Cargo.lock delete mode 100644 src/tools/tidy/Cargo.lock diff --git a/src/Cargo.lock b/src/Cargo.lock new file mode 100644 index 0000000000000..cd7a9a8d5e09b --- /dev/null +++ b/src/Cargo.lock @@ -0,0 +1,808 @@ +[root] +name = "unwind" +version = "0.0.0" +dependencies = [ + "core 0.0.0", + "libc 0.0.0", +] + +[[package]] +name = "aho-corasick" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "alloc" +version = "0.0.0" +dependencies = [ + "core 0.0.0", +] + +[[package]] +name = "alloc_jemalloc" +version = "0.0.0" +dependencies = [ + "build_helper 0.1.0", + "core 0.0.0", + "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.0.0", +] + +[[package]] +name = "alloc_system" +version = "0.0.0" +dependencies = [ + "core 0.0.0", + "libc 0.0.0", +] + +[[package]] +name = "arena" +version = "0.0.0" + +[[package]] +name = "bootstrap" +version = "0.0.0" +dependencies = [ + "build_helper 0.1.0", + "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc 0.3.35 (git+https://github.com/alexcrichton/gcc-rs)", + "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "md5 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "build_helper" +version = "0.1.0" + +[[package]] +name = "cargotest" +version = "0.1.0" + +[[package]] +name = "cmake" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "collections" +version = "0.0.0" +dependencies = [ + "alloc 0.0.0", + "core 0.0.0", + "rustc_unicode 0.0.0", +] + +[[package]] +name = "compiletest" +version = "0.0.0" +dependencies = [ + "env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serialize 0.0.0", +] + +[[package]] +name = "core" +version = "0.0.0" + +[[package]] +name = "env_logger" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "error_index_generator" +version = "0.0.0" + +[[package]] +name = "filetime" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "flate" +version = "0.0.0" +dependencies = [ + "build_helper 0.1.0", + "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fmt_macros" +version = "0.0.0" + +[[package]] +name = "gcc" +version = "0.3.35" +source = "git+https://github.com/alexcrichton/gcc-rs#03e22a4425c011fa8c96681591432456fa70d60c" + +[[package]] +name = "gcc" +version = "0.3.35" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "getopts" +version = "0.0.0" + +[[package]] +name = "getopts" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "graphviz" +version = "0.0.0" + +[[package]] +name = "idna" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "libc" +version = "0.0.0" +dependencies = [ + "core 0.0.0", +] + +[[package]] +name = "libc" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "linkchecker" +version = "0.1.0" +dependencies = [ + "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "log" +version = "0.0.0" + +[[package]] +name = "log" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "matches" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "md5" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "memchr" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num_cpus" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "panic_abort" +version = "0.0.0" +dependencies = [ + "core 0.0.0", + "libc 0.0.0", +] + +[[package]] +name = "panic_unwind" +version = "0.0.0" +dependencies = [ + "alloc 0.0.0", + "core 0.0.0", + "libc 0.0.0", + "unwind 0.0.0", +] + +[[package]] +name = "proc_macro" +version = "0.0.0" +dependencies = [ + "log 0.0.0", + "rustc_plugin 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rand" +version = "0.0.0" +dependencies = [ + "core 0.0.0", +] + +[[package]] +name = "rbml" +version = "0.0.0" +dependencies = [ + "log 0.0.0", + "serialize 0.0.0", +] + +[[package]] +name = "regex" +version = "0.1.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aho-corasick 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "regex-syntax" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rustbook" +version = "0.0.0" + +[[package]] +name = "rustc" +version = "0.0.0" +dependencies = [ + "arena 0.0.0", + "flate 0.0.0", + "fmt_macros 0.0.0", + "graphviz 0.0.0", + "log 0.0.0", + "rbml 0.0.0", + "rustc_back 0.0.0", + "rustc_bitflags 0.0.0", + "rustc_const_math 0.0.0", + "rustc_data_structures 0.0.0", + "rustc_errors 0.0.0", + "rustc_llvm 0.0.0", + "serialize 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc-main" +version = "0.0.0" +dependencies = [ + "rustc_back 0.0.0", + "rustc_driver 0.0.0", + "rustdoc 0.0.0", +] + +[[package]] +name = "rustc-serialize" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rustc_back" +version = "0.0.0" +dependencies = [ + "log 0.0.0", + "serialize 0.0.0", + "syntax 0.0.0", +] + +[[package]] +name = "rustc_bitflags" +version = "0.0.0" + +[[package]] +name = "rustc_borrowck" +version = "0.0.0" +dependencies = [ + "graphviz 0.0.0", + "log 0.0.0", + "rustc 0.0.0", + "rustc_data_structures 0.0.0", + "rustc_errors 0.0.0", + "rustc_mir 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_const_eval" +version = "0.0.0" +dependencies = [ + "graphviz 0.0.0", + "log 0.0.0", + "rustc 0.0.0", + "rustc_back 0.0.0", + "rustc_const_math 0.0.0", + "rustc_errors 0.0.0", + "serialize 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_const_math" +version = "0.0.0" +dependencies = [ + "log 0.0.0", + "serialize 0.0.0", + "syntax 0.0.0", +] + +[[package]] +name = "rustc_data_structures" +version = "0.0.0" +dependencies = [ + "log 0.0.0", + "serialize 0.0.0", +] + +[[package]] +name = "rustc_driver" +version = "0.0.0" +dependencies = [ + "arena 0.0.0", + "flate 0.0.0", + "graphviz 0.0.0", + "log 0.0.0", + "proc_macro 0.0.0", + "rustc 0.0.0", + "rustc_back 0.0.0", + "rustc_borrowck 0.0.0", + "rustc_const_eval 0.0.0", + "rustc_errors 0.0.0", + "rustc_incremental 0.0.0", + "rustc_lint 0.0.0", + "rustc_llvm 0.0.0", + "rustc_metadata 0.0.0", + "rustc_mir 0.0.0", + "rustc_passes 0.0.0", + "rustc_plugin 0.0.0", + "rustc_privacy 0.0.0", + "rustc_resolve 0.0.0", + "rustc_save_analysis 0.0.0", + "rustc_trans 0.0.0", + "rustc_typeck 0.0.0", + "serialize 0.0.0", + "syntax 0.0.0", + "syntax_ext 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_errors" +version = "0.0.0" +dependencies = [ + "log 0.0.0", + "serialize 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_incremental" +version = "0.0.0" +dependencies = [ + "graphviz 0.0.0", + "log 0.0.0", + "rbml 0.0.0", + "rustc 0.0.0", + "rustc_data_structures 0.0.0", + "serialize 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_lint" +version = "0.0.0" +dependencies = [ + "log 0.0.0", + "rustc 0.0.0", + "rustc_back 0.0.0", + "rustc_const_eval 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_llvm" +version = "0.0.0" +dependencies = [ + "build_helper 0.1.0", + "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_bitflags 0.0.0", +] + +[[package]] +name = "rustc_metadata" +version = "0.0.0" +dependencies = [ + "flate 0.0.0", + "log 0.0.0", + "rbml 0.0.0", + "rustc 0.0.0", + "rustc_back 0.0.0", + "rustc_bitflags 0.0.0", + "rustc_const_math 0.0.0", + "rustc_data_structures 0.0.0", + "rustc_errors 0.0.0", + "rustc_llvm 0.0.0", + "serialize 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_mir" +version = "0.0.0" +dependencies = [ + "graphviz 0.0.0", + "log 0.0.0", + "rustc 0.0.0", + "rustc_back 0.0.0", + "rustc_bitflags 0.0.0", + "rustc_const_eval 0.0.0", + "rustc_const_math 0.0.0", + "rustc_data_structures 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_passes" +version = "0.0.0" +dependencies = [ + "log 0.0.0", + "rustc 0.0.0", + "rustc_const_eval 0.0.0", + "rustc_const_math 0.0.0", + "rustc_errors 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_platform_intrinsics" +version = "0.0.0" + +[[package]] +name = "rustc_plugin" +version = "0.0.0" +dependencies = [ + "log 0.0.0", + "rustc 0.0.0", + "rustc_back 0.0.0", + "rustc_bitflags 0.0.0", + "rustc_errors 0.0.0", + "rustc_metadata 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_privacy" +version = "0.0.0" +dependencies = [ + "rustc 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_resolve" +version = "0.0.0" +dependencies = [ + "arena 0.0.0", + "log 0.0.0", + "rustc 0.0.0", + "rustc_errors 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_save_analysis" +version = "0.0.0" +dependencies = [ + "log 0.0.0", + "rustc 0.0.0", + "serialize 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_trans" +version = "0.0.0" +dependencies = [ + "arena 0.0.0", + "flate 0.0.0", + "graphviz 0.0.0", + "log 0.0.0", + "rustc 0.0.0", + "rustc_back 0.0.0", + "rustc_const_eval 0.0.0", + "rustc_const_math 0.0.0", + "rustc_data_structures 0.0.0", + "rustc_errors 0.0.0", + "rustc_incremental 0.0.0", + "rustc_llvm 0.0.0", + "rustc_platform_intrinsics 0.0.0", + "serialize 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_typeck" +version = "0.0.0" +dependencies = [ + "arena 0.0.0", + "fmt_macros 0.0.0", + "log 0.0.0", + "rustc 0.0.0", + "rustc_back 0.0.0", + "rustc_const_eval 0.0.0", + "rustc_const_math 0.0.0", + "rustc_errors 0.0.0", + "rustc_platform_intrinsics 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "rustc_unicode" +version = "0.0.0" +dependencies = [ + "core 0.0.0", +] + +[[package]] +name = "rustdoc" +version = "0.0.0" +dependencies = [ + "arena 0.0.0", + "build_helper 0.1.0", + "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.0.0", + "rustc 0.0.0", + "rustc_back 0.0.0", + "rustc_const_eval 0.0.0", + "rustc_const_math 0.0.0", + "rustc_data_structures 0.0.0", + "rustc_driver 0.0.0", + "rustc_errors 0.0.0", + "rustc_lint 0.0.0", + "rustc_metadata 0.0.0", + "rustc_resolve 0.0.0", + "rustc_trans 0.0.0", + "serialize 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "serialize" +version = "0.0.0" +dependencies = [ + "log 0.0.0", +] + +[[package]] +name = "std" +version = "0.0.0" +dependencies = [ + "alloc 0.0.0", + "alloc_jemalloc 0.0.0", + "alloc_system 0.0.0", + "build_helper 0.1.0", + "collections 0.0.0", + "core 0.0.0", + "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.0.0", + "panic_abort 0.0.0", + "panic_unwind 0.0.0", + "rand 0.0.0", + "rustc_unicode 0.0.0", + "unwind 0.0.0", +] + +[[package]] +name = "std_shim" +version = "0.1.0" +dependencies = [ + "std 0.0.0", +] + +[[package]] +name = "syntax" +version = "0.0.0" +dependencies = [ + "log 0.0.0", + "rustc_bitflags 0.0.0", + "rustc_errors 0.0.0", + "serialize 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "syntax_ext" +version = "0.0.0" +dependencies = [ + "fmt_macros 0.0.0", + "log 0.0.0", + "rustc_errors 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", +] + +[[package]] +name = "syntax_pos" +version = "0.0.0" +dependencies = [ + "serialize 0.0.0", +] + +[[package]] +name = "term" +version = "0.0.0" + +[[package]] +name = "test" +version = "0.0.0" +dependencies = [ + "getopts 0.0.0", + "term 0.0.0", +] + +[[package]] +name = "test_shim" +version = "0.1.0" +dependencies = [ + "test 0.0.0", +] + +[[package]] +name = "thread-id" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "thread_local" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tidy" +version = "0.1.0" + +[[package]] +name = "toml" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-bidi" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "url" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "utf8-ranges" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[metadata] +"checksum aho-corasick 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2b3fb52b09c1710b961acb35390d514be82e4ac96a9969a8e38565a29b878dc9" +"checksum cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "dfcf5bcece56ef953b8ea042509e9dcbdfe97820b7e20d86beb53df30ed94978" +"checksum env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "82dcb9ceed3868a03b335657b85a159736c961900f7e7747d3b0b97b9ccb5ccb" +"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922" +"checksum gcc 0.3.35 (git+https://github.com/alexcrichton/gcc-rs)" = "" +"checksum gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "91ecd03771effb0c968fd6950b37e89476a578aaf1c70297d8e92b6516ec3312" +"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685" +"checksum idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1053236e00ce4f668aeca4a769a09b3bf5a682d802abd6f3cb39374f6b162c11" +"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +"checksum libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "23e3757828fa702a20072c37ff47938e9dd331b92fac6e223d26d4b7a55f7ee2" +"checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054" +"checksum matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "15305656809ce5a4805b1ff2946892810992197ce1270ff79baded852187942e" +"checksum md5 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a5539a8dee9b4ae308c9c406a379838b435a8f2c84cf9fedc6d5a576be9888db" +"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" +"checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3" +"checksum regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)" = "56b7ee9f764ecf412c6e2fff779bca4b22980517ae335a21aeaf4e32625a5df2" +"checksum regex-syntax 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "31040aad7470ad9d8c46302dcffba337bb4289ca5da2e3cd6e37b64109a85199" +"checksum rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6159e4e6e559c81bd706afe9c8fd68f547d3e851ce12e76b1de7914bab61691b" +"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" +"checksum thread_local 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "55dd963dbaeadc08aa7266bf7f91c3154a7805e32bb94b820b769d2ef3b4744d" +"checksum toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "0590d72182e50e879c4da3b11c6488dae18fccb1ae0c7a3eda18e16795844796" +"checksum unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c1f7ceb96afdfeedee42bade65a0d585a6a0106f681b6749c8ff4daa8df30b3f" +"checksum unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "26643a2f83bac55f1976fb716c10234485f9202dcd65cfbdf9da49867b271172" +"checksum url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afe9ec54bc4db14bc8744b7fed060d785ac756791450959b2248443319d5b119" +"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" +"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/src/Cargo.toml b/src/Cargo.toml new file mode 100644 index 0000000000000..dbd2f7743dc08 --- /dev/null +++ b/src/Cargo.toml @@ -0,0 +1,13 @@ +[workspace] +members = [ + "bootstrap", + "rustc", + "rustc/std_shim", + "rustc/test_shim", + "tools/cargotest", + "tools/compiletest", + "tools/error_index_generator", + "tools/linkchecker", + "tools/rustbook", + "tools/tidy", +] diff --git a/src/bootstrap/Cargo.lock b/src/bootstrap/Cargo.lock deleted file mode 100644 index babbb6a16bae0..0000000000000 --- a/src/bootstrap/Cargo.lock +++ /dev/null @@ -1,180 +0,0 @@ -[root] -name = "bootstrap" -version = "0.0.0" -dependencies = [ - "build_helper 0.1.0", - "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "gcc 0.3.35 (git+https://github.com/alexcrichton/gcc-rs)", - "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", - "md5 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "aho-corasick" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "build_helper" -version = "0.1.0" - -[[package]] -name = "cmake" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "filetime" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "gcc" -version = "0.3.35" -source = "git+https://github.com/alexcrichton/gcc-rs#8ff5360b6e0dc4f3c9d3f71036f1ff403c68469d" - -[[package]] -name = "gcc" -version = "0.3.35" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "getopts" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "libc" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "md5" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num_cpus" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex" -version = "0.1.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc-serialize" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "thread-id" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "toml" -version = "0.1.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf8-ranges" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2b3fb52b09c1710b961acb35390d514be82e4ac96a9969a8e38565a29b878dc9" -"checksum cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "dfcf5bcece56ef953b8ea042509e9dcbdfe97820b7e20d86beb53df30ed94978" -"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922" -"checksum gcc 0.3.35 (git+https://github.com/alexcrichton/gcc-rs)" = "" -"checksum gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "91ecd03771effb0c968fd6950b37e89476a578aaf1c70297d8e92b6516ec3312" -"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "23e3757828fa702a20072c37ff47938e9dd331b92fac6e223d26d4b7a55f7ee2" -"checksum md5 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a5539a8dee9b4ae308c9c406a379838b435a8f2c84cf9fedc6d5a576be9888db" -"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -"checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3" -"checksum regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)" = "56b7ee9f764ecf412c6e2fff779bca4b22980517ae335a21aeaf4e32625a5df2" -"checksum regex-syntax 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "31040aad7470ad9d8c46302dcffba337bb4289ca5da2e3cd6e37b64109a85199" -"checksum rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6159e4e6e559c81bd706afe9c8fd68f547d3e851ce12e76b1de7914bab61691b" -"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" -"checksum thread_local 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "55dd963dbaeadc08aa7266bf7f91c3154a7805e32bb94b820b769d2ef3b4744d" -"checksum toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "0590d72182e50e879c4da3b11c6488dae18fccb1ae0c7a3eda18e16795844796" -"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index b8417218a2231..8d160a9935241 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -268,10 +268,47 @@ pub fn krate(build: &Build, compiler: &Compiler, target: &str, mode: Mode) { - let (name, path, features) = match mode { - Mode::Libstd => ("libstd", "src/rustc/std_shim", build.std_features()), - Mode::Libtest => ("libtest", "src/rustc/test_shim", String::new()), - Mode::Librustc => ("librustc", "src/rustc", build.rustc_features()), + let (name, path, features, excluded) = match mode { + Mode::Libstd => { + let excluded = vec![ + "alloc_jemalloc", "arena", "bootstrap", "cargotest", "compiletest", + "error_index_generator", "flate", "fmt_macros", "getopts", "graphviz", + "linkchecker", "log", "proc_macro", "rbml", "rustbook", "rustc", "rustc-main", + "rustc_back", "rustc_bitflags", "rustc_borrowck", "rustc_const_eval", + "rustc_const_math", "rustc_data_structures", "rustc_driver", "rustc_errors", + "rustc_incremental", "rustc_lint", "rustc_llvm", "rustc_metadata", "rustc_mir", + "rustc_passes", "rustc_platform_intrinsics", "rustc_plugin", "rustc_privacy", + "rustc_resolve", "rustc_save_analysis", "rustc_trans", "rustc_typeck", "rustdoc", + "serialize", "syntax", "syntax_ext", "syntax_pos", "term", "test", "test_shim", + "tidy", "unwind", + ]; + ("libstd", "src/rustc/std_shim", build.std_features(), excluded) + } + Mode::Libtest => { + let excluded = vec![ + "alloc", "alloc_jemalloc", "alloc_system", "arena", "bootstrap", "build_helper", + "cargotest", "collections", "compiletest", "core", "error_index_generator", + "flate", "fmt_macros", "graphviz", "libc", "linkchecker", "log", "panic_abort", + "panic_unwind", "proc_macro", "rand", "rbml", "rustbook", "rustc", "rustc-main", + "rustc_back", "rustc_bitflags", "rustc_borrowck", "rustc_const_eval", + "rustc_const_math", "rustc_data_structures", "rustc_driver", "rustc_errors", + "rustc_incremental", "rustc_lint", "rustc_llvm", "rustc_metadata", "rustc_mir", + "rustc_passes", "rustc_platform_intrinsics", "rustc_plugin", "rustc_privacy", + "rustc_resolve", "rustc_save_analysis", "rustc_trans", "rustc_typeck", + "rustc_unicode", "rustdoc", "serialize", "std", "std_shim", "syntax", "syntax_ext", + "syntax_pos", "tidy", "unwind", + ]; + ("libtest", "src/rustc/test_shim", String::new(), excluded) + } + Mode::Librustc => { + let excluded = vec![ + "alloc", "alloc_jemalloc", "alloc_system", "bootstrap", "cargotest", "collections", + "compiletest", "core", "error_index_generator", "getopts", "libc", "linkchecker", + "panic_abort", "panic_unwind", "rand", "rustbook", "rustc_unicode", "std", + "std_shim", "term", "test", "test_shim", "tidy", "unwind", + ]; + ("librustc", "src/rustc", build.rustc_features(), excluded) + } _ => panic!("can only test libraries"), }; println!("Testing {} stage{} ({} -> {})", name, compiler.stage, @@ -285,7 +322,7 @@ pub fn krate(build: &Build, // Generate a list of `-p` arguments to pass to the `cargo test` invocation // by crawling the corresponding Cargo.lock file. - let lockfile = build.src.join(path).join("Cargo.lock"); + let lockfile = build.src.join("src").join("Cargo.lock"); let mut contents = String::new(); t!(t!(File::open(&lockfile)).read_to_string(&mut contents)); let mut lines = contents.lines(); @@ -305,10 +342,7 @@ pub fn krate(build: &Build, let crate_name = &line[prefix.len()..line.len() - 1]; - // Right now jemalloc is our only target-specific crate in the sense - // that it's not present on all platforms. Custom skip it here for now, - // but if we add more this probably wants to get more generalized. - if crate_name.contains("jemalloc") { + if excluded.contains(&crate_name) { continue } diff --git a/src/libpanic_unwind/Cargo.lock b/src/libpanic_unwind/Cargo.lock deleted file mode 100644 index 0cf75c941508b..0000000000000 --- a/src/libpanic_unwind/Cargo.lock +++ /dev/null @@ -1,36 +0,0 @@ -[root] -name = "panic_unwind" -version = "0.0.0" -dependencies = [ - "alloc 0.0.0", - "core 0.0.0", - "libc 0.0.0", - "unwind 0.0.0", -] - -[[package]] -name = "alloc" -version = "0.0.0" -dependencies = [ - "core 0.0.0", -] - -[[package]] -name = "core" -version = "0.0.0" - -[[package]] -name = "libc" -version = "0.0.0" -dependencies = [ - "core 0.0.0", -] - -[[package]] -name = "unwind" -version = "0.0.0" -dependencies = [ - "core 0.0.0", - "libc 0.0.0", -] - diff --git a/src/rustc/Cargo.lock b/src/rustc/Cargo.lock deleted file mode 100644 index 192d14b8fb158..0000000000000 --- a/src/rustc/Cargo.lock +++ /dev/null @@ -1,413 +0,0 @@ -[root] -name = "rustc-main" -version = "0.0.0" -dependencies = [ - "rustc_back 0.0.0", - "rustc_driver 0.0.0", - "rustdoc 0.0.0", -] - -[[package]] -name = "arena" -version = "0.0.0" - -[[package]] -name = "build_helper" -version = "0.1.0" - -[[package]] -name = "flate" -version = "0.0.0" -dependencies = [ - "build_helper 0.1.0", - "gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fmt_macros" -version = "0.0.0" - -[[package]] -name = "gcc" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "graphviz" -version = "0.0.0" - -[[package]] -name = "log" -version = "0.0.0" - -[[package]] -name = "proc_macro" -version = "0.0.0" -dependencies = [ - "syntax 0.0.0", -] - -[[package]] -name = "proc_macro_plugin" -version = "0.0.0" -dependencies = [ - "log 0.0.0", - "rustc_plugin 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc" -version = "0.0.0" -dependencies = [ - "arena 0.0.0", - "flate 0.0.0", - "fmt_macros 0.0.0", - "graphviz 0.0.0", - "log 0.0.0", - "rustc_back 0.0.0", - "rustc_bitflags 0.0.0", - "rustc_const_math 0.0.0", - "rustc_data_structures 0.0.0", - "rustc_errors 0.0.0", - "rustc_llvm 0.0.0", - "serialize 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_back" -version = "0.0.0" -dependencies = [ - "log 0.0.0", - "serialize 0.0.0", - "syntax 0.0.0", -] - -[[package]] -name = "rustc_bitflags" -version = "0.0.0" - -[[package]] -name = "rustc_borrowck" -version = "0.0.0" -dependencies = [ - "graphviz 0.0.0", - "log 0.0.0", - "rustc 0.0.0", - "rustc_data_structures 0.0.0", - "rustc_errors 0.0.0", - "rustc_mir 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_const_eval" -version = "0.0.0" -dependencies = [ - "graphviz 0.0.0", - "log 0.0.0", - "rustc 0.0.0", - "rustc_back 0.0.0", - "rustc_const_math 0.0.0", - "rustc_errors 0.0.0", - "serialize 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_const_math" -version = "0.0.0" -dependencies = [ - "log 0.0.0", - "serialize 0.0.0", - "syntax 0.0.0", -] - -[[package]] -name = "rustc_data_structures" -version = "0.0.0" -dependencies = [ - "log 0.0.0", - "serialize 0.0.0", -] - -[[package]] -name = "rustc_driver" -version = "0.0.0" -dependencies = [ - "arena 0.0.0", - "flate 0.0.0", - "graphviz 0.0.0", - "log 0.0.0", - "proc_macro_plugin 0.0.0", - "rustc 0.0.0", - "rustc_back 0.0.0", - "rustc_borrowck 0.0.0", - "rustc_const_eval 0.0.0", - "rustc_errors 0.0.0", - "rustc_incremental 0.0.0", - "rustc_lint 0.0.0", - "rustc_llvm 0.0.0", - "rustc_metadata 0.0.0", - "rustc_mir 0.0.0", - "rustc_passes 0.0.0", - "rustc_plugin 0.0.0", - "rustc_privacy 0.0.0", - "rustc_resolve 0.0.0", - "rustc_save_analysis 0.0.0", - "rustc_trans 0.0.0", - "rustc_typeck 0.0.0", - "serialize 0.0.0", - "syntax 0.0.0", - "syntax_ext 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_errors" -version = "0.0.0" -dependencies = [ - "log 0.0.0", - "serialize 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_incremental" -version = "0.0.0" -dependencies = [ - "graphviz 0.0.0", - "log 0.0.0", - "rustc 0.0.0", - "rustc_data_structures 0.0.0", - "serialize 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_lint" -version = "0.0.0" -dependencies = [ - "log 0.0.0", - "rustc 0.0.0", - "rustc_back 0.0.0", - "rustc_const_eval 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_llvm" -version = "0.0.0" -dependencies = [ - "build_helper 0.1.0", - "gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_bitflags 0.0.0", -] - -[[package]] -name = "rustc_metadata" -version = "0.0.0" -dependencies = [ - "flate 0.0.0", - "log 0.0.0", - "proc_macro 0.0.0", - "rustc 0.0.0", - "rustc_back 0.0.0", - "rustc_const_math 0.0.0", - "rustc_data_structures 0.0.0", - "rustc_errors 0.0.0", - "rustc_llvm 0.0.0", - "serialize 0.0.0", - "syntax 0.0.0", - "syntax_ext 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_mir" -version = "0.0.0" -dependencies = [ - "graphviz 0.0.0", - "log 0.0.0", - "rustc 0.0.0", - "rustc_back 0.0.0", - "rustc_bitflags 0.0.0", - "rustc_const_eval 0.0.0", - "rustc_const_math 0.0.0", - "rustc_data_structures 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_passes" -version = "0.0.0" -dependencies = [ - "log 0.0.0", - "rustc 0.0.0", - "rustc_const_eval 0.0.0", - "rustc_const_math 0.0.0", - "rustc_errors 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_platform_intrinsics" -version = "0.0.0" - -[[package]] -name = "rustc_plugin" -version = "0.0.0" -dependencies = [ - "log 0.0.0", - "rustc 0.0.0", - "rustc_back 0.0.0", - "rustc_bitflags 0.0.0", - "rustc_errors 0.0.0", - "rustc_metadata 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_privacy" -version = "0.0.0" -dependencies = [ - "rustc 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_resolve" -version = "0.0.0" -dependencies = [ - "arena 0.0.0", - "log 0.0.0", - "rustc 0.0.0", - "rustc_errors 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_save_analysis" -version = "0.0.0" -dependencies = [ - "log 0.0.0", - "rustc 0.0.0", - "serialize 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_trans" -version = "0.0.0" -dependencies = [ - "arena 0.0.0", - "flate 0.0.0", - "graphviz 0.0.0", - "log 0.0.0", - "rustc 0.0.0", - "rustc_back 0.0.0", - "rustc_const_eval 0.0.0", - "rustc_const_math 0.0.0", - "rustc_data_structures 0.0.0", - "rustc_errors 0.0.0", - "rustc_incremental 0.0.0", - "rustc_llvm 0.0.0", - "rustc_platform_intrinsics 0.0.0", - "serialize 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustc_typeck" -version = "0.0.0" -dependencies = [ - "arena 0.0.0", - "fmt_macros 0.0.0", - "log 0.0.0", - "rustc 0.0.0", - "rustc_back 0.0.0", - "rustc_const_eval 0.0.0", - "rustc_const_math 0.0.0", - "rustc_errors 0.0.0", - "rustc_platform_intrinsics 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "rustdoc" -version = "0.0.0" -dependencies = [ - "arena 0.0.0", - "build_helper 0.1.0", - "gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.0.0", - "rustc 0.0.0", - "rustc_back 0.0.0", - "rustc_const_eval 0.0.0", - "rustc_const_math 0.0.0", - "rustc_data_structures 0.0.0", - "rustc_driver 0.0.0", - "rustc_errors 0.0.0", - "rustc_lint 0.0.0", - "rustc_metadata 0.0.0", - "rustc_resolve 0.0.0", - "rustc_trans 0.0.0", - "serialize 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "serialize" -version = "0.0.0" -dependencies = [ - "log 0.0.0", -] - -[[package]] -name = "syntax" -version = "0.0.0" -dependencies = [ - "log 0.0.0", - "rustc_bitflags 0.0.0", - "rustc_errors 0.0.0", - "serialize 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "syntax_ext" -version = "0.0.0" -dependencies = [ - "fmt_macros 0.0.0", - "log 0.0.0", - "proc_macro 0.0.0", - "rustc_errors 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", -] - -[[package]] -name = "syntax_pos" -version = "0.0.0" -dependencies = [ - "serialize 0.0.0", -] - -[metadata] -"checksum gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)" = "3da3a2cbaeb01363c8e3704fd9fd0eb2ceb17c6f27abd4c1ef040fb57d20dc79" diff --git a/src/rustc/std_shim/Cargo.lock b/src/rustc/std_shim/Cargo.lock deleted file mode 100644 index b460235545759..0000000000000 --- a/src/rustc/std_shim/Cargo.lock +++ /dev/null @@ -1,132 +0,0 @@ -[root] -name = "std_shim" -version = "0.1.0" -dependencies = [ - "core 0.0.0", - "std 0.0.0", -] - -[[package]] -name = "alloc" -version = "0.0.0" -dependencies = [ - "core 0.0.0", -] - -[[package]] -name = "alloc_jemalloc" -version = "0.0.0" -dependencies = [ - "build_helper 0.1.0", - "core 0.0.0", - "gcc 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.0.0", -] - -[[package]] -name = "alloc_system" -version = "0.0.0" -dependencies = [ - "core 0.0.0", - "libc 0.0.0", -] - -[[package]] -name = "build_helper" -version = "0.1.0" - -[[package]] -name = "collections" -version = "0.0.0" -dependencies = [ - "alloc 0.0.0", - "core 0.0.0", - "rustc_unicode 0.0.0", -] - -[[package]] -name = "compiler_builtins" -version = "0.0.0" -dependencies = [ - "core 0.0.0", - "gcc 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "core" -version = "0.0.0" - -[[package]] -name = "gcc" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.0.0" -dependencies = [ - "core 0.0.0", -] - -[[package]] -name = "panic_abort" -version = "0.0.0" -dependencies = [ - "core 0.0.0", - "libc 0.0.0", -] - -[[package]] -name = "panic_unwind" -version = "0.0.0" -dependencies = [ - "alloc 0.0.0", - "core 0.0.0", - "libc 0.0.0", - "unwind 0.0.0", -] - -[[package]] -name = "rand" -version = "0.0.0" -dependencies = [ - "core 0.0.0", -] - -[[package]] -name = "rustc_unicode" -version = "0.0.0" -dependencies = [ - "core 0.0.0", -] - -[[package]] -name = "std" -version = "0.0.0" -dependencies = [ - "alloc 0.0.0", - "alloc_jemalloc 0.0.0", - "alloc_system 0.0.0", - "build_helper 0.1.0", - "collections 0.0.0", - "compiler_builtins 0.0.0", - "core 0.0.0", - "gcc 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.0.0", - "panic_abort 0.0.0", - "panic_unwind 0.0.0", - "rand 0.0.0", - "rustc_unicode 0.0.0", - "unwind 0.0.0", -] - -[[package]] -name = "unwind" -version = "0.0.0" -dependencies = [ - "core 0.0.0", - "libc 0.0.0", -] - -[metadata] -"checksum gcc 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)" = "806e63121fbf30760b060a5fc2d1e9f47e1bd356d183e8870367c6c12cc9d5ed" diff --git a/src/rustc/test_shim/Cargo.lock b/src/rustc/test_shim/Cargo.lock deleted file mode 100644 index 73df56d3594f1..0000000000000 --- a/src/rustc/test_shim/Cargo.lock +++ /dev/null @@ -1,23 +0,0 @@ -[root] -name = "test_shim" -version = "0.1.0" -dependencies = [ - "test 0.0.0", -] - -[[package]] -name = "getopts" -version = "0.0.0" - -[[package]] -name = "term" -version = "0.0.0" - -[[package]] -name = "test" -version = "0.0.0" -dependencies = [ - "getopts 0.0.0", - "term 0.0.0", -] - diff --git a/src/tools/cargotest/Cargo.lock b/src/tools/cargotest/Cargo.lock deleted file mode 100644 index bafde903baa44..0000000000000 --- a/src/tools/cargotest/Cargo.lock +++ /dev/null @@ -1,4 +0,0 @@ -[root] -name = "cargotest" -version = "0.1.0" - diff --git a/src/tools/compiletest/Cargo.lock b/src/tools/compiletest/Cargo.lock deleted file mode 100644 index 755697806a00e..0000000000000 --- a/src/tools/compiletest/Cargo.lock +++ /dev/null @@ -1,92 +0,0 @@ -[root] -name = "compiletest" -version = "0.0.0" -dependencies = [ - "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serialize 0.0.0", -] - -[[package]] -name = "aho-corasick" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "env_logger" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.62 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "libc" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log" -version = "0.0.0" - -[[package]] -name = "log" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mempool" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "regex" -version = "0.1.62" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "mempool 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serialize" -version = "0.0.0" -dependencies = [ - "log 0.0.0", -] - -[[package]] -name = "utf8-ranges" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "67077478f0a03952bed2e6786338d400d40c25e9836e08ad50af96607317fd03" -"checksum env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "aba65b63ffcc17ffacd6cf5aa843da7c5a25e3bd4bbe0b7def8b214e411250e5" -"checksum libc 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "95ca44454e7cfe7f8a2095a41a10c79d96a177c0b1672cbf1a30d901a9c16ee5" -"checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054" -"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -"checksum mempool 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f997e65fe3eb7a6f8557a7a477de9ed5c511850c85363d13f7b0145b526ed36a" -"checksum regex 0.1.62 (registry+https://github.com/rust-lang/crates.io-index)" = "22bdab319e36735729aa280752c9293b29ec0053a6810679d697515f80a986fe" -"checksum regex-syntax 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "841591b1e05609a643e3b4d0045fce04f701daba7151ddcd3ad47b080693d5a9" -"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" diff --git a/src/tools/error_index_generator/Cargo.lock b/src/tools/error_index_generator/Cargo.lock deleted file mode 100644 index b7d2cfcaaa1a8..0000000000000 --- a/src/tools/error_index_generator/Cargo.lock +++ /dev/null @@ -1,4 +0,0 @@ -[root] -name = "error_index_generator" -version = "0.0.0" - diff --git a/src/tools/linkchecker/Cargo.lock b/src/tools/linkchecker/Cargo.lock deleted file mode 100644 index d71df6d3f83a8..0000000000000 --- a/src/tools/linkchecker/Cargo.lock +++ /dev/null @@ -1,50 +0,0 @@ -[root] -name = "linkchecker" -version = "0.1.0" -dependencies = [ - "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "idna" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "matches" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-bidi" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "url" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[metadata] -"checksum idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1053236e00ce4f668aeca4a769a09b3bf5a682d802abd6f3cb39374f6b162c11" -"checksum matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "15305656809ce5a4805b1ff2946892810992197ce1270ff79baded852187942e" -"checksum unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c1f7ceb96afdfeedee42bade65a0d585a6a0106f681b6749c8ff4daa8df30b3f" -"checksum unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "26643a2f83bac55f1976fb716c10234485f9202dcd65cfbdf9da49867b271172" -"checksum url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afe9ec54bc4db14bc8744b7fed060d785ac756791450959b2248443319d5b119" diff --git a/src/tools/rustbook/Cargo.lock b/src/tools/rustbook/Cargo.lock deleted file mode 100644 index e541ce4b2b807..0000000000000 --- a/src/tools/rustbook/Cargo.lock +++ /dev/null @@ -1,4 +0,0 @@ -[root] -name = "rustbook" -version = "0.0.0" - diff --git a/src/tools/tidy/Cargo.lock b/src/tools/tidy/Cargo.lock deleted file mode 100644 index acaf9e5550fd3..0000000000000 --- a/src/tools/tidy/Cargo.lock +++ /dev/null @@ -1,4 +0,0 @@ -[root] -name = "tidy" -version = "0.1.0" - From 32089ae2c6eb37339e4f90e29057d92fe45219b8 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 7 Oct 2016 12:28:54 -0700 Subject: [PATCH 3/7] rustbuild: Fix dependencies of check-docs step Some of the doc tests depend on `extern crate test`, so depend on libtest instead of libstd here. --- src/bootstrap/step.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/step.rs b/src/bootstrap/step.rs index 22539b31ef2bd..3bf0f21192147 100644 --- a/src/bootstrap/step.rs +++ b/src/bootstrap/step.rs @@ -524,7 +524,7 @@ impl<'a> Step<'a> { self.target(compiler.host).tool_compiletest(compiler.stage)] } Source::CheckDocs { compiler } => { - vec![self.libstd(compiler)] + vec![self.libtest(compiler)] } Source::CheckErrorIndex { compiler } => { vec![self.libstd(compiler), From c66ae29883faaed0fd32ad03165e6882069c4832 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 7 Oct 2016 15:12:21 -0500 Subject: [PATCH 4/7] rewrite checked_{div,rem} to no contain any reference to panics even without optimizations --- src/libcore/num/mod.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 9a403891ebf82..516d6f7c4a0bd 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -516,11 +516,10 @@ macro_rules! int_impl { #[stable(feature = "rust1", since = "1.0.0")] #[inline] pub fn checked_div(self, other: Self) -> Option { - if other == 0 { + if other == 0 || (self == Self::min_value() && other == -1) { None } else { - let (a, b) = self.overflowing_div(other); - if b {None} else {Some(a)} + Some(unsafe { intrinsics::unchecked_div(self, other) }) } } @@ -541,11 +540,10 @@ macro_rules! int_impl { #[stable(feature = "wrapping", since = "1.7.0")] #[inline] pub fn checked_rem(self, other: Self) -> Option { - if other == 0 { + if other == 0 || (self == Self::min_value() && other == -1) { None } else { - let (a, b) = self.overflowing_rem(other); - if b {None} else {Some(a)} + Some(unsafe { intrinsics::unchecked_rem(self, other) }) } } @@ -1688,7 +1686,7 @@ macro_rules! uint_impl { pub fn checked_div(self, other: Self) -> Option { match other { 0 => None, - other => Some(self / other), + other => Some(unsafe { intrinsics::unchecked_div(self, other) }), } } @@ -1709,7 +1707,7 @@ macro_rules! uint_impl { if other == 0 { None } else { - Some(self % other) + Some(unsafe { intrinsics::unchecked_rem(self, other) }) } } From 75c0d3f6573b034e98a9bf13403feba2fd8ad3cf Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Fri, 7 Oct 2016 15:00:48 -0700 Subject: [PATCH 5/7] Fix a typo in a comment describing gcc.rs's eh_frame_registry module s/reigster/register/ --- src/libpanic_unwind/gcc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libpanic_unwind/gcc.rs b/src/libpanic_unwind/gcc.rs index bd0c2f5126d13..4d97df067dcd9 100644 --- a/src/libpanic_unwind/gcc.rs +++ b/src/libpanic_unwind/gcc.rs @@ -284,7 +284,7 @@ unsafe extern "C" fn rust_eh_unwind_resume(panic_ctx: *mut u8) -> ! { // to actively register their unwind info sections via unwinder API. // // This module defines two symbols which are referenced and called from -// rsbegin.rs to reigster our information with the GCC runtime. The +// rsbegin.rs to register our information with the GCC runtime. The // implementation of stack unwinding is (for now) deferred to libgcc_eh, however // Rust crates use these Rust-specific entry points to avoid potential clashes // with any GCC runtime. From 0d1ab4e9e4e1a6b481a3cf32088ab7d7e7e673ef Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Sat, 8 Oct 2016 01:42:58 +0200 Subject: [PATCH 6/7] Do not add an empty #[derive()] list in expand_derive (fixes #37033) --- src/libsyntax_ext/deriving/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libsyntax_ext/deriving/mod.rs b/src/libsyntax_ext/deriving/mod.rs index 111596cfe88e0..fdb10a2beb230 100644 --- a/src/libsyntax_ext/deriving/mod.rs +++ b/src/libsyntax_ext/deriving/mod.rs @@ -154,11 +154,13 @@ pub fn expand_derive(cx: &mut ExtCtxt, }); if new_attributes.len() > 0 { item = item.map(|mut i| { - let list = cx.meta_list(mitem.span, - intern_and_get_ident("derive"), - traits); i.attrs.extend(new_attributes); - i.attrs.push(cx.attribute(mitem.span, list)); + if traits.len() > 0 { + let list = cx.meta_list(mitem.span, + intern_and_get_ident("derive"), + traits); + i.attrs.push(cx.attribute(mitem.span, list)); + } i }); return vec![Annotatable::Item(item)] From 147e2da13af98af32689bb8b3a3bb2b92862b8d4 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 6 Oct 2016 23:30:38 -0700 Subject: [PATCH 7/7] rustbuild: Use `cargo metadata` to learn about DAG This updates the commit to use workspaces to use `cargo metadata` instead of hardcoded lists about what to test. This should help us be resilient to updates in the future on behalf of the crate DAG and minimize the amount of files that need to be touched. --- src/Cargo.lock | 34 +++++++---- src/bootstrap/check.rs | 131 ++++++++++++++++++++++------------------- 2 files changed, 91 insertions(+), 74 deletions(-) diff --git a/src/Cargo.lock b/src/Cargo.lock index cd7a9a8d5e09b..ecd94e5b7e92f 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -87,6 +87,14 @@ dependencies = [ "rustc_unicode 0.0.0", ] +[[package]] +name = "compiler_builtins" +version = "0.0.0" +dependencies = [ + "core 0.0.0", + "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "compiletest" version = "0.0.0" @@ -251,25 +259,24 @@ dependencies = [ name = "proc_macro" version = "0.0.0" dependencies = [ - "log 0.0.0", - "rustc_plugin 0.0.0", "syntax 0.0.0", - "syntax_pos 0.0.0", ] [[package]] -name = "rand" +name = "proc_macro_plugin" version = "0.0.0" dependencies = [ - "core 0.0.0", + "log 0.0.0", + "rustc_plugin 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", ] [[package]] -name = "rbml" +name = "rand" version = "0.0.0" dependencies = [ - "log 0.0.0", - "serialize 0.0.0", + "core 0.0.0", ] [[package]] @@ -302,7 +309,6 @@ dependencies = [ "fmt_macros 0.0.0", "graphviz 0.0.0", "log 0.0.0", - "rbml 0.0.0", "rustc_back 0.0.0", "rustc_bitflags 0.0.0", "rustc_const_math 0.0.0", @@ -395,7 +401,7 @@ dependencies = [ "flate 0.0.0", "graphviz 0.0.0", "log 0.0.0", - "proc_macro 0.0.0", + "proc_macro_plugin 0.0.0", "rustc 0.0.0", "rustc_back 0.0.0", "rustc_borrowck 0.0.0", @@ -434,7 +440,6 @@ version = "0.0.0" dependencies = [ "graphviz 0.0.0", "log 0.0.0", - "rbml 0.0.0", "rustc 0.0.0", "rustc_data_structures 0.0.0", "serialize 0.0.0", @@ -469,16 +474,16 @@ version = "0.0.0" dependencies = [ "flate 0.0.0", "log 0.0.0", - "rbml 0.0.0", + "proc_macro 0.0.0", "rustc 0.0.0", "rustc_back 0.0.0", - "rustc_bitflags 0.0.0", "rustc_const_math 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", "rustc_llvm 0.0.0", "serialize 0.0.0", "syntax 0.0.0", + "syntax_ext 0.0.0", "syntax_pos 0.0.0", ] @@ -647,6 +652,7 @@ dependencies = [ "alloc_system 0.0.0", "build_helper 0.1.0", "collections 0.0.0", + "compiler_builtins 0.0.0", "core 0.0.0", "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.0.0", @@ -661,6 +667,7 @@ dependencies = [ name = "std_shim" version = "0.1.0" dependencies = [ + "core 0.0.0", "std 0.0.0", ] @@ -681,6 +688,7 @@ version = "0.0.0" dependencies = [ "fmt_macros 0.0.0", "log 0.0.0", + "proc_macro 0.0.0", "rustc_errors 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 8d160a9935241..b8d0eb3ff996a 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -13,19 +13,44 @@ //! This file implements the various regression test suites that we execute on //! our CI. +use std::collections::{HashMap, HashSet}; use std::env; -use std::fs::{self, File}; -use std::io::prelude::*; +use std::fs; use std::path::{PathBuf, Path}; use std::process::Command; use build_helper::output; +use rustc_serialize::json; use {Build, Compiler, Mode}; use util::{self, dylib_path, dylib_path_var}; const ADB_TEST_DIR: &'static str = "/data/tmp"; +#[derive(RustcDecodable)] +struct Output { + packages: Vec, + resolve: Resolve, +} + +#[derive(RustcDecodable)] +struct Package { + id: String, + name: String, + source: Option, +} + +#[derive(RustcDecodable)] +struct Resolve { + nodes: Vec, +} + +#[derive(RustcDecodable)] +struct ResolveNode { + id: String, + dependencies: Vec, +} + /// Runs the `linkchecker` tool as compiled in `stage` by the `host` compiler. /// /// This tool in `src/tools` will verify the validity of all our links in the @@ -263,90 +288,74 @@ fn markdown_test(build: &Build, compiler: &Compiler, markdown: &Path) { /// It essentially is the driver for running `cargo test`. /// /// Currently this runs all tests for a DAG by passing a bunch of `-p foo` -/// arguments, and those arguments are discovered from `Cargo.lock`. +/// arguments, and those arguments are discovered from `cargo metadata`. pub fn krate(build: &Build, compiler: &Compiler, target: &str, mode: Mode) { - let (name, path, features, excluded) = match mode { + let (name, path, features, root) = match mode { Mode::Libstd => { - let excluded = vec![ - "alloc_jemalloc", "arena", "bootstrap", "cargotest", "compiletest", - "error_index_generator", "flate", "fmt_macros", "getopts", "graphviz", - "linkchecker", "log", "proc_macro", "rbml", "rustbook", "rustc", "rustc-main", - "rustc_back", "rustc_bitflags", "rustc_borrowck", "rustc_const_eval", - "rustc_const_math", "rustc_data_structures", "rustc_driver", "rustc_errors", - "rustc_incremental", "rustc_lint", "rustc_llvm", "rustc_metadata", "rustc_mir", - "rustc_passes", "rustc_platform_intrinsics", "rustc_plugin", "rustc_privacy", - "rustc_resolve", "rustc_save_analysis", "rustc_trans", "rustc_typeck", "rustdoc", - "serialize", "syntax", "syntax_ext", "syntax_pos", "term", "test", "test_shim", - "tidy", "unwind", - ]; - ("libstd", "src/rustc/std_shim", build.std_features(), excluded) + ("libstd", "src/rustc/std_shim", build.std_features(), "std_shim") } Mode::Libtest => { - let excluded = vec![ - "alloc", "alloc_jemalloc", "alloc_system", "arena", "bootstrap", "build_helper", - "cargotest", "collections", "compiletest", "core", "error_index_generator", - "flate", "fmt_macros", "graphviz", "libc", "linkchecker", "log", "panic_abort", - "panic_unwind", "proc_macro", "rand", "rbml", "rustbook", "rustc", "rustc-main", - "rustc_back", "rustc_bitflags", "rustc_borrowck", "rustc_const_eval", - "rustc_const_math", "rustc_data_structures", "rustc_driver", "rustc_errors", - "rustc_incremental", "rustc_lint", "rustc_llvm", "rustc_metadata", "rustc_mir", - "rustc_passes", "rustc_platform_intrinsics", "rustc_plugin", "rustc_privacy", - "rustc_resolve", "rustc_save_analysis", "rustc_trans", "rustc_typeck", - "rustc_unicode", "rustdoc", "serialize", "std", "std_shim", "syntax", "syntax_ext", - "syntax_pos", "tidy", "unwind", - ]; - ("libtest", "src/rustc/test_shim", String::new(), excluded) + ("libtest", "src/rustc/test_shim", String::new(), "test_shim") } Mode::Librustc => { - let excluded = vec![ - "alloc", "alloc_jemalloc", "alloc_system", "bootstrap", "cargotest", "collections", - "compiletest", "core", "error_index_generator", "getopts", "libc", "linkchecker", - "panic_abort", "panic_unwind", "rand", "rustbook", "rustc_unicode", "std", - "std_shim", "term", "test", "test_shim", "tidy", "unwind", - ]; - ("librustc", "src/rustc", build.rustc_features(), excluded) + ("librustc", "src/rustc", build.rustc_features(), "rustc-main") } _ => panic!("can only test libraries"), }; println!("Testing {} stage{} ({} -> {})", name, compiler.stage, compiler.host, target); + // Run `cargo metadata` to figure out what crates we're testing. + // + // Down below we're going to call `cargo test`, but to test the right set + // of packages we're going to have to know what `-p` arguments to pass it + // to know what crates to test. Here we run `cargo metadata` to learn about + // the dependency graph and what `-p` arguments there are. + let mut cargo = Command::new(&build.cargo); + cargo.arg("metadata") + .arg("--manifest-path").arg(build.src.join(path).join("Cargo.toml")); + let output = output(&mut cargo); + let output: Output = json::decode(&output).unwrap(); + let id2pkg = output.packages.iter() + .map(|pkg| (&pkg.id, pkg)) + .collect::>(); + let id2deps = output.resolve.nodes.iter() + .map(|node| (&node.id, &node.dependencies)) + .collect::>(); + // Build up the base `cargo test` command. + // + // Pass in some standard flags then iterate over the graph we've discovered + // in `cargo metadata` with the maps above and figure out what `-p` + // arguments need to get passed. let mut cargo = build.cargo(compiler, mode, target, "test"); cargo.arg("--manifest-path") .arg(build.src.join(path).join("Cargo.toml")) .arg("--features").arg(features); - // Generate a list of `-p` arguments to pass to the `cargo test` invocation - // by crawling the corresponding Cargo.lock file. - let lockfile = build.src.join("src").join("Cargo.lock"); - let mut contents = String::new(); - t!(t!(File::open(&lockfile)).read_to_string(&mut contents)); - let mut lines = contents.lines(); - while let Some(line) = lines.next() { - let prefix = "name = \""; - if !line.starts_with(prefix) { + let mut visited = HashSet::new(); + let root_pkg = output.packages.iter().find(|p| p.name == root).unwrap(); + let mut next = vec![&root_pkg.id]; + while let Some(id) = next.pop() { + // Skip any packages with sources listed, as these come from crates.io + // and we shouldn't be testing them. + if id2pkg[id].source.is_some() { continue } - lines.next(); // skip `version = ...` - - // skip crates.io or otherwise non-path crates - if let Some(line) = lines.next() { - if line.starts_with("source") { - continue - } + // Right now jemalloc is our only target-specific crate in the sense + // that it's not present on all platforms. Custom skip it here for now, + // but if we add more this probably wants to get more generalized. + if !id.contains("jemalloc") { + cargo.arg("-p").arg(&id2pkg[id].name); } - - let crate_name = &line[prefix.len()..line.len() - 1]; - - if excluded.contains(&crate_name) { - continue + for dep in id2deps[id] { + if visited.insert(dep) { + next.push(dep); + } } - - cargo.arg("-p").arg(crate_name); } // The tests are going to run with the *target* libraries, so we need to