diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-07-31 14:16:55 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-08-02 18:09:19 -0700 |
| commit | 0e034d162a5b61a47a251d8b0f1fe82dc6d434d5 (patch) | |
| tree | 8e707049f38bf2e50ccd9b56302b6fdbcf5431d8 /src/tools | |
| parent | 40e4b6ee3dd70a05007915bd1c15c150a7b7899f (diff) | |
| download | rust-0e034d162a5b61a47a251d8b0f1fe82dc6d434d5.tar.gz rust-0e034d162a5b61a47a251d8b0f1fe82dc6d434d5.zip | |
Update Cargo submodule
Bring in some fixes for `cargo fix` notably
Diffstat (limited to 'src/tools')
| m--------- | src/tools/cargo | 0 | ||||
| m--------- | src/tools/clippy | 24 | ||||
| m--------- | src/tools/rls | 0 | ||||
| -rw-r--r-- | src/tools/rustc-workspace-hack/Cargo.toml | 44 | ||||
| -rw-r--r-- | src/tools/rustc-workspace-hack/README.md | 25 | ||||
| -rw-r--r-- | src/tools/rustc-workspace-hack/lib.rs | 11 | ||||
| m--------- | src/tools/rustfmt | 28 |
7 files changed, 99 insertions, 33 deletions
diff --git a/src/tools/cargo b/src/tools/cargo -Subproject 2cd36b4ed1aef1ae39a30783e006411d1a4218a +Subproject 15433e8cc932a2b4c0d3f9638e07d08c1c7ac39 diff --git a/src/tools/clippy b/src/tools/clippy -Subproject b0dabce47803c18b935ec5390de69e04ad5304c +Subproject 8ef759e0273ad97f1acbb1ea9f94322aa2a2014 diff --git a/src/tools/rls b/src/tools/rls -Subproject 4c7cc91d5518bd29d3d59599cfb7a2e7e848d7b +Subproject 0e8d1f3e7acba9737f52dbfc4cb25e5259d4890 diff --git a/src/tools/rustc-workspace-hack/Cargo.toml b/src/tools/rustc-workspace-hack/Cargo.toml new file mode 100644 index 00000000000..8c947bbbcdd --- /dev/null +++ b/src/tools/rustc-workspace-hack/Cargo.toml @@ -0,0 +1,44 @@ +[package] +name = "rustc-workspace-hack" +version = "1.0.0" +authors = ["Alex Crichton <alex@alexcrichton.com>"] +license = 'MIT/Apache-2.0' +description = """ +Hack for the compiler's own build system +""" + +[lib] +path = "lib.rs" + +# For documentation about what this is and why in the world these dependencies +# are appearing, see `README.md`. + +[build-dependencies] +# Currently Cargo/RLS depend on `failure` which depends on `synstructure` which +# enables this feature. Clippy, however, does not depend on anything that +# enables this feature. Enable it unconditionally. +syn = { version = "0.14", features = ['extra-traits'] } + +[target.'cfg(windows)'.dependencies.winapi] +version = "0.3" +features = [ + "profileapi", + "memoryapi", + "minschannel", + "securitybaseapi", + "jobapi2", + "schannel", + "sysinfoapi", + "jobapi", + "synchapi", + "wincrypt", + "winbase", + "minwinbase", + "ntsecapi", + "basetsd", + "ntstatus", + "psapi", + "timezoneapi", + "lmcons", + "wincon", +] diff --git a/src/tools/rustc-workspace-hack/README.md b/src/tools/rustc-workspace-hack/README.md new file mode 100644 index 00000000000..4a5286fae9c --- /dev/null +++ b/src/tools/rustc-workspace-hack/README.md @@ -0,0 +1,25 @@ +# `rustc-workspace-hack` + +This crate is a bit of a hack to make workspaces in rustc work a bit better. +The rationale for this existence is a bit subtle, but the general idea is that +we want commands like `./x.py build src/tools/{rls,clippy,cargo}` to share as +many dependencies as possible. + +Each invocation is a different invocation of Cargo, however. Each time Cargo +runs a build it will re-resolve the dependency graph, notably selecting +different features sometimes for each build. + +For example, let's say there's a very deep dependency like `num-traits` in each +of these builds. For Cargo the `num-traits`'s `default` feature is turned off. +In RLS, however, the `default` feature is turned. This means that building Cargo +and then the RLS will actually build Cargo twice (as a transitive dependency +changed). This is bad! + +The goal of this crate is to solve this problem and ensure that the resolved +dependency graph for all of these tools is the same in the various subsets of +each tool, notably enabling the same features of transitive dependencies. + +All tools vendored here depend on the `rustc-workspace-hack` crate on crates.io. +When on crates.io this crate is an empty crate that is just a noop. We override +it, however, in this workspace to this crate here, which means we can control +crates in the dependency graph for each of these tools. diff --git a/src/tools/rustc-workspace-hack/lib.rs b/src/tools/rustc-workspace-hack/lib.rs new file mode 100644 index 00000000000..ab262975a09 --- /dev/null +++ b/src/tools/rustc-workspace-hack/lib.rs @@ -0,0 +1,11 @@ +// Copyright 2018 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. + +// intentionally left blank diff --git a/src/tools/rustfmt b/src/tools/rustfmt -Subproject 69ad879d52606ac03440744efa5b4d8ca8cc756 +Subproject d50e3618d419ec074927ea79741f0c595e7ff2d |
