Skip to content

rust: upgrade clap from 3.0.0-beta.2 to 3.2.23 #6040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
818 changes: 378 additions & 440 deletions tensorboard/data/server/Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tensorboard/data/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async-trait = "0.1.41"
base64 = "0.13.0"
byteorder = "1.3.4"
bytes = "1.0.1"
clap = "3.0.0-beta.2"
clap = { version = "3.2.23", features = ["derive", "env", "cargo"] }
crc = "1.8.1"
crossbeam = "0.8.0"
env_logger = "0.8.2"
Expand Down
4 changes: 2 additions & 2 deletions tensorboard/data/server/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.

//! Simple benchmark to completely load a logdir and then exit.

use clap::Clap;
use clap::Parser;
use log::info;
use std::path::PathBuf;
use std::sync::Arc;
Expand All @@ -25,7 +25,7 @@ use rustboard_core::commit::Commit;
use rustboard_core::logdir::LogdirLoader;
use rustboard_core::{cli::dynamic_logdir::DynLogdir, types::PluginSamplingHint};

#[derive(Clap)]
#[derive(Parser)]
struct Opts {
#[clap(long)]
logdir: PathBuf,
Expand Down
38 changes: 19 additions & 19 deletions tensorboard/data/server/cargo/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ licenses([
# Aliased targets
alias(
name = "async_stream",
actual = "@raze__async_stream__0_3_0//:async_stream",
actual = "@raze__async_stream__0_3_3//:async_stream",
tags = [
"cargo-raze",
"manual",
Expand All @@ -23,7 +23,7 @@ alias(

alias(
name = "async_trait",
actual = "@raze__async_trait__0_1_41//:async_trait",
actual = "@raze__async_trait__0_1_58//:async_trait",
tags = [
"cargo-raze",
"manual",
Expand All @@ -32,7 +32,7 @@ alias(

alias(
name = "base64",
actual = "@raze__base64__0_13_0//:base64",
actual = "@raze__base64__0_13_1//:base64",
tags = [
"cargo-raze",
"manual",
Expand All @@ -41,7 +41,7 @@ alias(

alias(
name = "byteorder",
actual = "@raze__byteorder__1_3_4//:byteorder",
actual = "@raze__byteorder__1_4_3//:byteorder",
tags = [
"cargo-raze",
"manual",
Expand All @@ -50,7 +50,7 @@ alias(

alias(
name = "bytes",
actual = "@raze__bytes__1_0_1//:bytes",
actual = "@raze__bytes__1_2_1//:bytes",
tags = [
"cargo-raze",
"manual",
Expand All @@ -59,7 +59,7 @@ alias(

alias(
name = "clap",
actual = "@raze__clap__3_0_0_beta_2//:clap",
actual = "@raze__clap__3_2_23//:clap",
tags = [
"cargo-raze",
"manual",
Expand All @@ -77,7 +77,7 @@ alias(

alias(
name = "crossbeam",
actual = "@raze__crossbeam__0_8_0//:crossbeam",
actual = "@raze__crossbeam__0_8_2//:crossbeam",
tags = [
"cargo-raze",
"manual",
Expand All @@ -86,7 +86,7 @@ alias(

alias(
name = "env_logger",
actual = "@raze__env_logger__0_8_2//:env_logger",
actual = "@raze__env_logger__0_8_4//:env_logger",
tags = [
"cargo-raze",
"manual",
Expand All @@ -95,7 +95,7 @@ alias(

alias(
name = "futures_core",
actual = "@raze__futures_core__0_3_12//:futures_core",
actual = "@raze__futures_core__0_3_25//:futures_core",
tags = [
"cargo-raze",
"manual",
Expand All @@ -104,7 +104,7 @@ alias(

alias(
name = "log",
actual = "@raze__log__0_4_11//:log",
actual = "@raze__log__0_4_17//:log",
tags = [
"cargo-raze",
"manual",
Expand Down Expand Up @@ -158,7 +158,7 @@ alias(

alias(
name = "rayon",
actual = "@raze__rayon__1_5_0//:rayon",
actual = "@raze__rayon__1_5_3//:rayon",
tags = [
"cargo-raze",
"manual",
Expand All @@ -167,7 +167,7 @@ alias(

alias(
name = "reqwest",
actual = "@raze__reqwest__0_11_0//:reqwest",
actual = "@raze__reqwest__0_11_12//:reqwest",
tags = [
"cargo-raze",
"manual",
Expand All @@ -176,7 +176,7 @@ alias(

alias(
name = "serde",
actual = "@raze__serde__1_0_118//:serde",
actual = "@raze__serde__1_0_147//:serde",
tags = [
"cargo-raze",
"manual",
Expand All @@ -185,7 +185,7 @@ alias(

alias(
name = "serde_json",
actual = "@raze__serde_json__1_0_61//:serde_json",
actual = "@raze__serde_json__1_0_87//:serde_json",
tags = [
"cargo-raze",
"manual",
Expand All @@ -194,7 +194,7 @@ alias(

alias(
name = "tempfile",
actual = "@raze__tempfile__3_1_0//:tempfile",
actual = "@raze__tempfile__3_3_0//:tempfile",
tags = [
"cargo-raze",
"manual",
Expand All @@ -203,7 +203,7 @@ alias(

alias(
name = "thiserror",
actual = "@raze__thiserror__1_0_22//:thiserror",
actual = "@raze__thiserror__1_0_37//:thiserror",
tags = [
"cargo-raze",
"manual",
Expand All @@ -212,7 +212,7 @@ alias(

alias(
name = "tokio",
actual = "@raze__tokio__1_19_2//:tokio",
actual = "@raze__tokio__1_21_2//:tokio",
tags = [
"cargo-raze",
"manual",
Expand All @@ -221,7 +221,7 @@ alias(

alias(
name = "tokio_stream",
actual = "@raze__tokio_stream__0_1_2//:tokio_stream",
actual = "@raze__tokio_stream__0_1_11//:tokio_stream",
tags = [
"cargo-raze",
"manual",
Expand Down Expand Up @@ -257,7 +257,7 @@ alias(

alias(
name = "walkdir",
actual = "@raze__walkdir__2_3_1//:walkdir",
actual = "@raze__walkdir__2_3_2//:walkdir",
tags = [
"cargo-raze",
"manual",
Expand Down
8 changes: 4 additions & 4 deletions tensorboard/data/server/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.

//! Command-line interface for the main entry point.

use clap::Clap;
use clap::Parser;
use log::{debug, error, info, LevelFilter};
use std::fs::File;
use std::io::{Read, Write};
Expand All @@ -39,7 +39,7 @@ use data::tensor_board_data_provider_server::TensorBoardDataProviderServer;
pub mod dynamic_logdir;
use dynamic_logdir::DynLogdir;

#[derive(Clap, Debug)]
#[derive(Parser, Debug)]
#[clap(name = "rustboard", version = crate::VERSION)]
struct Opts {
/// Log directory to load
Expand All @@ -48,7 +48,7 @@ struct Opts {
/// directory, its descendants, and its event files will be periodically polled for new data.
///
/// If this log directory is invalid or unsupported, exits with status 8.
#[clap(long, setting(clap::ArgSettings::AllowEmptyValues))]
#[clap(long)]
logdir: PathBuf,

/// Bind to this host name
Expand Down Expand Up @@ -134,7 +134,7 @@ struct Opts {
/// jobs. Each `num_samples` may be the special token `all` to retain all data without
/// downsampling. For instance, `--samples_per_plugin=scalars=500,images=all,audio=0` keeps 500
/// events in each scalar series, all of the images, and none of the audio.
#[clap(long, default_value = "", setting(clap::ArgSettings::AllowEmptyValues))]
#[clap(long, default_value = "")]
samples_per_plugin: PluginSamplingHint,
}

Expand Down
12 changes: 6 additions & 6 deletions tensorboard/data/server/gcs/gsutil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ limitations under the License.

//! CLI for testing GCS integration.

use clap::Clap;
use clap::Parser;
use std::io::Write;

use rustboard_core::gcs;

#[derive(Clap, Debug)]
#[derive(Parser, Debug)]
#[clap(name = "gsutil")]
struct Opts {
#[clap(long, default_value = "info")]
Expand All @@ -29,22 +29,22 @@ struct Opts {
subcmd: Subcommand,
}

#[derive(Clap, Debug)]
#[derive(Parser, Debug)]
enum Subcommand {
/// List objects in a bucket.
Ls(LsOpts),
/// Print (partial) object contents.
Cat(CatOpts),
}

#[derive(Clap, Debug)]
#[derive(Parser, Debug)]
struct LsOpts {
bucket: String,
#[clap(long, default_value = "", setting(clap::ArgSettings::AllowEmptyValues))]
#[clap(long, default_value = "")]
prefix: String,
}

#[derive(Clap, Debug)]
#[derive(Parser, Debug)]
struct CatOpts {
bucket: String,
object: String,
Expand Down
Loading