2018-12-11 01:57:10 +00:00
|
|
|
#![warn(rust_2018_idioms)] // while we're getting used to 2018
|
2018-12-20 01:40:01 +00:00
|
|
|
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
2018-12-12 21:20:55 +00:00
|
|
|
#![allow(clippy::blacklisted_name)]
|
|
|
|
#![allow(clippy::explicit_iter_loop)]
|
2019-04-15 20:49:04 +00:00
|
|
|
#![allow(clippy::redundant_closure)]
|
2020-06-03 22:44:59 +00:00
|
|
|
#![allow(clippy::blocks_in_if_conditions)] // clippy doesn't agree with rustfmt 😂
|
2019-11-12 08:44:56 +00:00
|
|
|
#![allow(clippy::inefficient_to_string)] // this causes suggestions that result in `(*s).to_string()`
|
2019-03-27 00:53:53 +00:00
|
|
|
#![warn(clippy::needless_borrow)]
|
2019-03-27 01:51:13 +00:00
|
|
|
#![warn(clippy::redundant_clone)]
|
2018-03-16 09:32:31 +00:00
|
|
|
|
2019-05-02 21:58:52 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate cargo_test_macro;
|
|
|
|
|
2019-11-24 17:43:59 +00:00
|
|
|
mod advanced_env;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod alt_registry;
|
|
|
|
mod bad_config;
|
|
|
|
mod bad_manifest_path;
|
|
|
|
mod bench;
|
2018-08-28 09:20:03 +00:00
|
|
|
mod build;
|
2017-08-03 14:02:00 +00:00
|
|
|
mod build_plan;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod build_script;
|
2018-08-28 09:20:03 +00:00
|
|
|
mod build_script_env;
|
2019-05-12 00:35:25 +00:00
|
|
|
mod cache_messages;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod cargo_alias_config;
|
2018-02-08 16:30:58 +00:00
|
|
|
mod cargo_command;
|
2018-08-28 09:20:03 +00:00
|
|
|
mod cargo_features;
|
2020-03-02 22:47:38 +00:00
|
|
|
mod cargo_targets;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod cfg;
|
|
|
|
mod check;
|
|
|
|
mod clean;
|
2018-11-12 15:13:13 +00:00
|
|
|
mod collisions;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod concurrent;
|
|
|
|
mod config;
|
2019-11-30 21:55:52 +00:00
|
|
|
mod config_cli;
|
2019-12-01 18:19:02 +00:00
|
|
|
mod config_include;
|
2018-03-02 17:44:47 +00:00
|
|
|
mod corrupt_git;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod cross_compile;
|
|
|
|
mod cross_publish;
|
2018-03-24 20:38:48 +00:00
|
|
|
mod custom_target;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod death;
|
|
|
|
mod dep_info;
|
|
|
|
mod directory;
|
|
|
|
mod doc;
|
2018-08-04 15:44:16 +00:00
|
|
|
mod edition;
|
2020-02-18 02:46:48 +00:00
|
|
|
mod error;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod features;
|
2019-09-10 22:38:01 +00:00
|
|
|
mod features2;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod fetch;
|
2018-07-14 01:49:26 +00:00
|
|
|
mod fix;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod freshness;
|
|
|
|
mod generate_lockfile;
|
|
|
|
mod git;
|
2019-11-25 02:42:45 +00:00
|
|
|
mod git_auth;
|
|
|
|
mod git_gc;
|
2020-07-06 00:51:22 +00:00
|
|
|
mod help;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod init;
|
|
|
|
mod install;
|
2019-03-31 00:33:35 +00:00
|
|
|
mod install_upgrade;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod jobserver;
|
2018-12-29 14:13:58 +00:00
|
|
|
mod list_targets;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod local_registry;
|
2019-12-10 00:18:12 +00:00
|
|
|
mod locate_project;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod lockfile_compat;
|
|
|
|
mod login;
|
2020-04-01 18:41:27 +00:00
|
|
|
mod lto;
|
2020-07-19 11:34:19 +00:00
|
|
|
mod member_discovery;
|
2018-10-09 13:05:10 +00:00
|
|
|
mod member_errors;
|
2019-08-05 16:42:28 +00:00
|
|
|
mod message_format;
|
2018-06-11 17:44:55 +00:00
|
|
|
mod metabuild;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod metadata;
|
2019-11-25 02:42:45 +00:00
|
|
|
mod minimal_versions;
|
2020-04-27 19:28:39 +00:00
|
|
|
mod multitarget;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod net_config;
|
|
|
|
mod new;
|
2019-04-23 22:13:55 +00:00
|
|
|
mod offline;
|
2018-04-03 06:51:52 +00:00
|
|
|
mod out_dir;
|
2020-01-09 13:18:45 +00:00
|
|
|
mod owner;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod package;
|
2020-04-08 21:06:09 +00:00
|
|
|
mod package_features;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod patch;
|
|
|
|
mod path;
|
2019-11-25 02:42:45 +00:00
|
|
|
mod paths;
|
2019-12-24 08:52:57 +00:00
|
|
|
mod pkgid;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod plugins;
|
|
|
|
mod proc_macro;
|
2018-05-06 22:14:46 +00:00
|
|
|
mod profile_config;
|
2019-09-12 13:27:15 +00:00
|
|
|
mod profile_custom;
|
2018-04-21 20:47:01 +00:00
|
|
|
mod profile_overrides;
|
2018-04-21 20:57:54 +00:00
|
|
|
mod profile_targets;
|
2018-08-28 09:20:03 +00:00
|
|
|
mod profiles;
|
2020-09-12 17:15:47 +00:00
|
|
|
mod progress;
|
2019-03-20 23:25:59 +00:00
|
|
|
mod pub_priv;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod publish;
|
2019-04-05 20:25:08 +00:00
|
|
|
mod publish_lockfile;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod read_manifest;
|
|
|
|
mod registry;
|
2018-02-22 16:37:51 +00:00
|
|
|
mod rename_deps;
|
2019-11-25 02:42:45 +00:00
|
|
|
mod replace;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod required_features;
|
|
|
|
mod run;
|
|
|
|
mod rustc;
|
2018-04-14 10:39:59 +00:00
|
|
|
mod rustc_info_cache;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod rustdoc;
|
2020-05-26 17:44:57 +00:00
|
|
|
mod rustdoc_extern_html;
|
2018-08-28 09:20:03 +00:00
|
|
|
mod rustdocflags;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod rustflags;
|
|
|
|
mod search;
|
2018-07-04 15:04:10 +00:00
|
|
|
mod shell_quoting;
|
2019-08-01 16:11:22 +00:00
|
|
|
mod standard_lib;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod test;
|
2019-09-20 21:11:49 +00:00
|
|
|
mod timings;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod tool_paths;
|
2020-03-19 17:51:25 +00:00
|
|
|
mod tree;
|
|
|
|
mod tree_graph_features;
|
2020-03-08 22:12:18 +00:00
|
|
|
mod unit_graph;
|
2018-03-06 05:21:47 +00:00
|
|
|
mod update;
|
Import the cargo-vendor subcommand into Cargo
This commit imports the external [alexcrichton/cargo-vendor
repository][repo] into Cargo itself. This means it will no longer be
necessary to install the `cargo-vendor` subcommand in order to vendor
dependencies. Additionally it'll always support the latest feature set
of Cargo as it'll be built into Cargo!
All tests were imported as part of this commit, but not all features
were imported. Some flags have been left out that were added later in
the lifetime of `cargo vendor` which seem like they're more questionable
to stabilize. I'm hoping that they can have separate PRs adding their
implementation here, and we can make a decision of their stabilization
at a later date.
The current man page for `cargo vendor -h` will look like:
cargo-vendor
Vendor all dependencies for a project locally
USAGE:
cargo vendor [OPTIONS] [--] [path]
OPTIONS:
-q, --quiet No output printed to stdout
--manifest-path <PATH> Path to Cargo.toml
--no-delete Don't delete older crates in the vendor directory
-s, --sync <TOML>... Additional `Cargo.toml` to sync and vendor
--respect-source-config Respect `[source]` config in `.cargo/config`
-v, --verbose Use verbose output (-vv very verbose/build.rs output)
--color <WHEN> Coloring: auto, always, never
--frozen Require Cargo.lock and cache are up to date
--locked Require Cargo.lock is up to date
-Z <FLAG>... Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
-h, --help Prints help information
ARGS:
<path> Where to vendor crates (`vendor` by default)
This cargo subcommand will vendor all crates.io and git dependencies for a
project into the specified directory at `<path>`. After this command completes
the vendor directory specified by `<path>` will contain all remote sources from
dependencies specified. Additionally manifest beyond the default one can be
specified with the `-s` option.
The `cargo vendor` command will also print out the configuration necessary
to use the vendored sources, which when needed is then encoded into
`.cargo/config`.
Since this change is not importing 100% of the functionality of the
existing `cargo vendor` this change does run a risk of being a breaking
change for any folks using such functionality. Executing `cargo vendor`
will favor the built-in command rather than an external subcommand,
causing unimplemented features to become errors about flag usage.
[repo]: https://github.com/alexcrichton/cargo-vendor
2019-04-23 00:54:27 +00:00
|
|
|
mod vendor;
|
2018-02-08 00:13:17 +00:00
|
|
|
mod verify_project;
|
|
|
|
mod version;
|
|
|
|
mod warn_on_failure;
|
|
|
|
mod workspaces;
|
2020-01-09 13:18:45 +00:00
|
|
|
mod yank;
|
2018-09-16 09:07:24 +00:00
|
|
|
|
2019-06-05 18:52:53 +00:00
|
|
|
#[cargo_test]
|
2018-09-16 09:07:24 +00:00
|
|
|
fn aaa_trigger_cross_compile_disabled_check() {
|
|
|
|
// This triggers the cross compile disabled check to run ASAP, see #5141
|
2019-09-12 17:14:29 +00:00
|
|
|
cargo_test_support::cross_compile::disabled();
|
2018-09-16 09:07:24 +00:00
|
|
|
}
|