diff --git a/.travis.yml b/.travis.yml index 280da05699506..4f94964a77691 100644 --- a/.travis.yml +++ b/.travis.yml @@ -175,7 +175,7 @@ matrix: - env: IMAGE=x86_64-gnu-nopt if: branch = auto - env: IMAGE=x86_64-gnu-distcheck - if: branch = auto + # if: branch = auto - env: IMAGE=x86_64-gnu-incremental if: branch = auto diff --git a/src/Cargo.lock b/Cargo.lock similarity index 100% rename from src/Cargo.lock rename to Cargo.lock diff --git a/src/Cargo.toml b/Cargo.toml similarity index 52% rename from src/Cargo.toml rename to Cargo.toml index c03301852cd3b..69655f8cdc24a 100644 --- a/src/Cargo.toml +++ b/Cargo.toml @@ -1,43 +1,43 @@ [workspace] members = [ - "bootstrap", - "rustc", - "libstd", - "libtest", - "librustc_trans", - "tools/cargotest", - "tools/clippy", - "tools/compiletest", - "tools/error_index_generator", - "tools/linkchecker", - "tools/rustbook", - "tools/unstable-book-gen", - "tools/tidy", - "tools/build-manifest", - "tools/remote-test-client", - "tools/remote-test-server", - "tools/rust-installer", - "tools/cargo", - "tools/rustdoc", - "tools/rls", - "tools/rustfmt", - "tools/miri", - "tools/rustdoc-themes", + "src/bootstrap", + "src/rustc", + "src/libstd", + "src/libtest", + "src/librustc_trans", + "src/tools/cargotest", + "src/tools/clippy", + "src/tools/compiletest", + "src/tools/error_index_generator", + "src/tools/linkchecker", + "src/tools/rustbook", + "src/tools/unstable-book-gen", + "src/tools/tidy", + "src/tools/build-manifest", + "src/tools/remote-test-client", + "src/tools/remote-test-server", + "src/tools/rust-installer", + "src/tools/cargo", + "src/tools/rustdoc", + "src/tools/rls", + "src/tools/rustfmt", + "src/tools/miri", + "src/tools/rustdoc-themes", # FIXME(https://github.com/rust-lang/cargo/issues/4089): move these to exclude - "tools/rls/test_data/bin_lib", - "tools/rls/test_data/borrow_error", - "tools/rls/test_data/common", - "tools/rls/test_data/deglob", - "tools/rls/test_data/features", - "tools/rls/test_data/find_all_refs_no_cfg_test", - "tools/rls/test_data/find_impls", - "tools/rls/test_data/infer_bin", - "tools/rls/test_data/infer_custom_bin", - "tools/rls/test_data/infer_lib", - "tools/rls/test_data/multiple_bins", - "tools/rls/test_data/reformat", - "tools/rls/test_data/reformat_with_range", - "tools/rls/test_data/workspace_symbol", + "src/tools/rls/test_data/bin_lib", + "src/tools/rls/test_data/borrow_error", + "src/tools/rls/test_data/common", + "src/tools/rls/test_data/deglob", + "src/tools/rls/test_data/features", + "src/tools/rls/test_data/find_all_refs_no_cfg_test", + "src/tools/rls/test_data/find_impls", + "src/tools/rls/test_data/infer_bin", + "src/tools/rls/test_data/infer_custom_bin", + "src/tools/rls/test_data/infer_lib", + "src/tools/rls/test_data/multiple_bins", + "src/tools/rls/test_data/reformat", + "src/tools/rls/test_data/reformat_with_range", + "src/tools/rls/test_data/workspace_symbol", ] # Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit @@ -63,7 +63,7 @@ debug-assertions = false # so we use a `[patch]` here to override the github repository with our local # vendored copy. [patch."https://github.com/rust-lang/cargo"] -cargo = { path = "tools/cargo" } +cargo = { path = "src/tools/cargo" } [patch.crates-io] # Similar to Cargo above we want the RLS to use a vendored version of `rustfmt` @@ -71,4 +71,4 @@ cargo = { path = "tools/cargo" } # `rustfmt` executable are the same exact vesion). Unlike Cargo, however, the # RLS depends on `rustfmt` from crates.io, so we put this in a `[patch]` section # for crates.io -rustfmt-nightly = { path = "tools/rustfmt" } +rustfmt-nightly = { path = "src/tools/rustfmt" } diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 603a97ddfd412..efd804139777d 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -720,7 +720,7 @@ def bootstrap(): registry = 'https://example.com' [source.vendored-sources] - directory = '{}/src/vendor' + directory = '{}/vendor' """.format(build.rust_root)) else: if os.path.exists('.cargo'): diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index e7aed7eb4fead..dccf8e51080ae 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -761,7 +761,7 @@ impl Step for Src { t!(fs::create_dir_all(&dst_src)); let src_files = [ - "src/Cargo.lock", + "Cargo.lock", ]; // This is the reduced set of paths which will become the rust-src component // (essentially libstd and all of its path dependencies) @@ -865,6 +865,8 @@ impl Step for PlainSourceTarball { "configure", "x.py", "config.toml.example", + "Cargo.toml", + "Cargo.lock", ]; let src_dirs = [ "src", @@ -911,7 +913,7 @@ impl Step for PlainSourceTarball { // Vendor all Cargo dependencies let mut cmd = Command::new(&build.initial_cargo); cmd.arg("vendor") - .current_dir(&plain_dst_src.join("src")); + .current_dir(&plain_dst_src); build.run(&mut cmd); } diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index 4dedf6bfe779b..2cf8c2d856d77 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -45,7 +45,8 @@ static EXCEPTIONS: &'static [&'static str] = &[ ]; pub fn check(path: &Path, bad: &mut bool) { - let path = path.join("vendor"); + // the vendor directly will be in project root whereas we're passed the src directory + let path = path.parent().expect("parent exist").join("vendor"); assert!(path.exists(), "vendor directory missing"); let mut saw_dir = false; 'next_path: for dir in t!(path.read_dir()) { @@ -57,7 +58,7 @@ pub fn check(path: &Path, bad: &mut bool) { if dir.path() .to_str() .unwrap() - .contains(&format!("src/vendor/{}", exception)) { + .contains(&format!("vendor/{}", exception)) { continue 'next_path; } }