mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
refactor(arg): rename arg_jobs
to arg_parallel
This commit is contained in:
parent
5155d3f7dc
commit
ba209d6abd
@ -42,7 +42,7 @@ pub fn cli() -> Command {
|
|||||||
"Benchmark all targets",
|
"Benchmark all targets",
|
||||||
)
|
)
|
||||||
.arg_features()
|
.arg_features()
|
||||||
.arg_jobs_without_keep_going()
|
.arg_jobs()
|
||||||
.arg(flag("keep-going", "Use `--no-fail-fast` instead").hide(true)) // See rust-lang/cargo#11702
|
.arg(flag("keep-going", "Use `--no-fail-fast` instead").hide(true)) // See rust-lang/cargo#11702
|
||||||
.arg_profile("Build artifacts with the specified profile")
|
.arg_profile("Build artifacts with the specified profile")
|
||||||
.arg_target_triple("Build for the target triple")
|
.arg_target_triple("Build for the target triple")
|
||||||
|
@ -31,7 +31,7 @@ pub fn cli() -> Command {
|
|||||||
.arg_features()
|
.arg_features()
|
||||||
.arg_release("Build artifacts in release mode, with optimizations")
|
.arg_release("Build artifacts in release mode, with optimizations")
|
||||||
.arg_profile("Build artifacts with the specified profile")
|
.arg_profile("Build artifacts with the specified profile")
|
||||||
.arg_jobs()
|
.arg_parallel()
|
||||||
.arg_target_triple("Build for the target triple")
|
.arg_target_triple("Build for the target triple")
|
||||||
.arg_target_dir()
|
.arg_target_dir()
|
||||||
.arg(
|
.arg(
|
||||||
|
@ -29,7 +29,7 @@ pub fn cli() -> Command {
|
|||||||
"Check all targets",
|
"Check all targets",
|
||||||
)
|
)
|
||||||
.arg_features()
|
.arg_features()
|
||||||
.arg_jobs()
|
.arg_parallel()
|
||||||
.arg_release("Check artifacts in release mode, with optimizations")
|
.arg_release("Check artifacts in release mode, with optimizations")
|
||||||
.arg_profile("Check artifacts with the specified profile")
|
.arg_profile("Check artifacts with the specified profile")
|
||||||
.arg_target_triple("Check for the target triple")
|
.arg_target_triple("Check for the target triple")
|
||||||
|
@ -32,7 +32,7 @@ pub fn cli() -> Command {
|
|||||||
"Document only the specified example",
|
"Document only the specified example",
|
||||||
"Document all examples",
|
"Document all examples",
|
||||||
)
|
)
|
||||||
.arg_jobs()
|
.arg_parallel()
|
||||||
.arg_release("Build artifacts in release mode, with optimizations")
|
.arg_release("Build artifacts in release mode, with optimizations")
|
||||||
.arg_profile("Build artifacts with the specified profile")
|
.arg_profile("Build artifacts with the specified profile")
|
||||||
.arg_target_triple("Build for the target triple")
|
.arg_target_triple("Build for the target triple")
|
||||||
|
@ -47,7 +47,7 @@ pub fn cli() -> Command {
|
|||||||
"Fix all targets (default)",
|
"Fix all targets (default)",
|
||||||
)
|
)
|
||||||
.arg_features()
|
.arg_features()
|
||||||
.arg_jobs()
|
.arg_parallel()
|
||||||
.arg_release("Fix artifacts in release mode, with optimizations")
|
.arg_release("Fix artifacts in release mode, with optimizations")
|
||||||
.arg_profile("Build artifacts with the specified profile")
|
.arg_profile("Build artifacts with the specified profile")
|
||||||
.arg_target_triple("Fix for the target triple")
|
.arg_target_triple("Fix for the target triple")
|
||||||
|
@ -75,7 +75,7 @@ pub fn cli() -> Command {
|
|||||||
"Install all examples",
|
"Install all examples",
|
||||||
)
|
)
|
||||||
.arg_features()
|
.arg_features()
|
||||||
.arg_jobs()
|
.arg_parallel()
|
||||||
.arg(flag(
|
.arg(flag(
|
||||||
"debug",
|
"debug",
|
||||||
"Build in debug mode (with the 'dev' profile) instead of release mode",
|
"Build in debug mode (with the 'dev' profile) instead of release mode",
|
||||||
|
@ -33,7 +33,7 @@ pub fn cli() -> Command {
|
|||||||
.arg_features()
|
.arg_features()
|
||||||
.arg_target_triple("Build for the target triple")
|
.arg_target_triple("Build for the target triple")
|
||||||
.arg_target_dir()
|
.arg_target_dir()
|
||||||
.arg_jobs()
|
.arg_parallel()
|
||||||
.arg_manifest_path()
|
.arg_manifest_path()
|
||||||
.after_help("Run `cargo help package` for more detailed information.\n")
|
.after_help("Run `cargo help package` for more detailed information.\n")
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ pub fn cli() -> Command {
|
|||||||
.arg_quiet()
|
.arg_quiet()
|
||||||
.arg_package("Package to publish")
|
.arg_package("Package to publish")
|
||||||
.arg_features()
|
.arg_features()
|
||||||
.arg_jobs()
|
.arg_parallel()
|
||||||
.arg_target_triple("Build for the target triple")
|
.arg_target_triple("Build for the target triple")
|
||||||
.arg_target_dir()
|
.arg_target_dir()
|
||||||
.arg_manifest_path()
|
.arg_manifest_path()
|
||||||
|
@ -30,7 +30,7 @@ pub fn cli() -> Command {
|
|||||||
"Name of the example target to run",
|
"Name of the example target to run",
|
||||||
)
|
)
|
||||||
.arg_features()
|
.arg_features()
|
||||||
.arg_jobs()
|
.arg_parallel()
|
||||||
.arg_release("Build artifacts in release mode, with optimizations")
|
.arg_release("Build artifacts in release mode, with optimizations")
|
||||||
.arg_profile("Build artifacts with the specified profile")
|
.arg_profile("Build artifacts with the specified profile")
|
||||||
.arg_target_triple("Build for the target triple")
|
.arg_target_triple("Build for the target triple")
|
||||||
|
@ -44,7 +44,7 @@ pub fn cli() -> Command {
|
|||||||
"Build all targets",
|
"Build all targets",
|
||||||
)
|
)
|
||||||
.arg_features()
|
.arg_features()
|
||||||
.arg_jobs()
|
.arg_parallel()
|
||||||
.arg_release("Build artifacts in release mode, with optimizations")
|
.arg_release("Build artifacts in release mode, with optimizations")
|
||||||
.arg_profile("Build artifacts with the specified profile")
|
.arg_profile("Build artifacts with the specified profile")
|
||||||
.arg_target_triple("Target triple which compiles will be for")
|
.arg_target_triple("Target triple which compiles will be for")
|
||||||
|
@ -32,7 +32,7 @@ pub fn cli() -> Command {
|
|||||||
"Build all targets",
|
"Build all targets",
|
||||||
)
|
)
|
||||||
.arg_features()
|
.arg_features()
|
||||||
.arg_jobs()
|
.arg_parallel()
|
||||||
.arg_release("Build artifacts in release mode, with optimizations")
|
.arg_release("Build artifacts in release mode, with optimizations")
|
||||||
.arg_profile("Build artifacts with the specified profile")
|
.arg_profile("Build artifacts with the specified profile")
|
||||||
.arg_target_triple("Build for the target triple")
|
.arg_target_triple("Build for the target triple")
|
||||||
|
@ -48,7 +48,7 @@ pub fn cli() -> Command {
|
|||||||
"Test all targets (does not include doctests)",
|
"Test all targets (does not include doctests)",
|
||||||
)
|
)
|
||||||
.arg_features()
|
.arg_features()
|
||||||
.arg_jobs_without_keep_going()
|
.arg_jobs()
|
||||||
.arg(flag("keep-going", "Use `--no-fail-fast` instead").hide(true)) // See rust-lang/cargo#11702
|
.arg(flag("keep-going", "Use `--no-fail-fast` instead").hide(true)) // See rust-lang/cargo#11702
|
||||||
.arg_release("Build artifacts in release mode, with optimizations")
|
.arg_release("Build artifacts in release mode, with optimizations")
|
||||||
.arg_profile("Build artifacts with the specified profile")
|
.arg_profile("Build artifacts with the specified profile")
|
||||||
|
@ -82,8 +82,8 @@ pub trait CommandExt: Sized {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn arg_jobs(self) -> Self {
|
fn arg_parallel(self) -> Self {
|
||||||
self.arg_jobs_without_keep_going()._arg(
|
self.arg_jobs()._arg(
|
||||||
flag(
|
flag(
|
||||||
"keep-going",
|
"keep-going",
|
||||||
"Do not abort the build as soon as there is an error (unstable)",
|
"Do not abort the build as soon as there is an error (unstable)",
|
||||||
@ -92,7 +92,7 @@ pub trait CommandExt: Sized {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn arg_jobs_without_keep_going(self) -> Self {
|
fn arg_jobs(self) -> Self {
|
||||||
self._arg(
|
self._arg(
|
||||||
opt("jobs", "Number of parallel jobs, defaults to # of CPUs.")
|
opt("jobs", "Number of parallel jobs, defaults to # of CPUs.")
|
||||||
.short('j')
|
.short('j')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user