difftreelog
feat help headings and colors
in: master
9 files changed
Cargo.lockdiffbeforeafterboth626263[[package]]63[[package]]64name = "clap"64name = "clap"65version = "3.0.0-beta.1"65version = "3.0.0-beta.2"66source = "git+https://github.com/clap-rs/clap?rev=3e9ee86713b5c407b50ba76f30cffaed25952063#3e9ee86713b5c407b50ba76f30cffaed25952063"66source = "git+https://github.com/clap-rs/clap?rev=1d0b21908f93478e75b4b1a21533d86325d39386#1d0b21908f93478e75b4b1a21533d86325d39386"67dependencies = [67dependencies = [68 "atty",68 "atty",69 "bitflags",69 "bitflags",808081[[package]]81[[package]]82name = "clap_derive"82name = "clap_derive"83version = "3.0.0-beta.1"83version = "3.0.0-beta.2"84source = "git+https://github.com/clap-rs/clap?rev=3e9ee86713b5c407b50ba76f30cffaed25952063#3e9ee86713b5c407b50ba76f30cffaed25952063"84source = "git+https://github.com/clap-rs/clap?rev=1d0b21908f93478e75b4b1a21533d86325d39386#1d0b21908f93478e75b4b1a21533d86325d39386"85dependencies = [85dependencies = [86 "heck",86 "heck",87 "proc-macro-error",87 "proc-macro-error",cmds/jrsonnet/Cargo.tomldiffbeforeafterboth232324[dependencies.clap]24[dependencies.clap]25git = "https://github.com/clap-rs/clap"25git = "https://github.com/clap-rs/clap"26rev = "3e9ee86713b5c407b50ba76f30cffaed25952063"26rev = "1d0b21908f93478e75b4b1a21533d86325d39386"2727cmds/jrsonnet/src/main.rsdiffbeforeafterboth1use clap::AppSettings;1use clap::Clap;2use clap::Clap;2use jrsonnet_cli::{ConfigureState, GeneralOpts, InputOpts, ManifestOpts, OutputOpts};3use jrsonnet_cli::{ConfigureState, GeneralOpts, InputOpts, ManifestOpts, OutputOpts};3use jrsonnet_evaluator::{error::LocError, EvaluationState};4use jrsonnet_evaluator::{error::LocError, EvaluationState};13static GLOBAL: mimallocator::Mimalloc = mimallocator::Mimalloc;14static GLOBAL: mimallocator::Mimalloc = mimallocator::Mimalloc;141515#[derive(Clap)]16#[derive(Clap)]16// #[clap(help_heading = "DEBUG")]17#[clap(help_heading = "DEBUG")]17struct DebugOpts {18struct DebugOpts {18 /// Required OS stack size.19 /// Required OS stack size.19 /// This shouldn't be changed unless jrsonnet is failing with stack overflow error.20 /// This shouldn't be changed unless jrsonnet is failing with stack overflow error.22}23}232424#[derive(Clap)]25#[derive(Clap)]26#[clap(27 global_setting = AppSettings::ColoredHelp,28 global_setting = AppSettings::DeriveDisplayOrder,29)]25struct Opts {30struct Opts {26 #[clap(flatten)]31 #[clap(flatten)]27 input: InputOpts,32 input: InputOpts,crates/jrsonnet-cli/Cargo.tomldiffbeforeafterboth131314[dependencies.clap]14[dependencies.clap]15git = "https://github.com/clap-rs/clap"15git = "https://github.com/clap-rs/clap"16rev = "3e9ee86713b5c407b50ba76f30cffaed25952063"16rev = "1d0b21908f93478e75b4b1a21533d86325d39386"1717crates/jrsonnet-cli/src/ext.rsdiffbeforeafterboth54}54}555556#[derive(Clap)]56#[derive(Clap)]57// #[clap(help_heading = "EXTERNAL VARIABLES")]57#[clap(help_heading = "EXTERNAL VARIABLES")]58pub struct ExtVarOpts {58pub struct ExtVarOpts {59 /// Add string external variable.59 /// Add string external variable.60 /// External variables are globally available so it is preferred60 /// External variables are globally available so it is preferredcrates/jrsonnet-cli/src/lib.rsdiffbeforeafterboth17}17}181819#[derive(Clap)]19#[derive(Clap)]20// #[clap(help_heading = "INPUT")]20#[clap(help_heading = "INPUT")]21pub struct InputOpts {21pub struct InputOpts {22 #[clap(22 #[clap(23 long,23 long,33}33}343435#[derive(Clap)]35#[derive(Clap)]36// #[clap(help_heading = "OPTIONS")]36#[clap(help_heading = "OPTIONS")]37pub struct MiscOpts {37pub struct MiscOpts {38 /// Disable standard library.38 /// Disable standard library.39 /// By default standard library will be available via global `std` variable.39 /// By default standard library will be available via global `std` variable.crates/jrsonnet-cli/src/manifest.rsdiffbeforeafterboth23}23}242425#[derive(Clap)]25#[derive(Clap)]26// TODO: Restore arg group after issue fixed in clap26#[clap(group = clap::ArgGroup::new("output_format"), help_heading = "MANIFESTIFICATION OUTPUT")]27// #[clap(group = clap::ArgGroup::new("output_format"), help_heading = "MANIFESTIFICATION OUTPUT")]28pub struct ManifestOpts {27pub struct ManifestOpts {29 /// Output format, wraps resulting value to corresponding std.manifest call.28 /// Output format, wraps resulting value to corresponding std.manifest call.30 /// If set to `string` then plain string value is expected to be returned,29 /// If set to `string` then plain string value is expected to be returned,33 format: ManifestFormatName,32 format: ManifestFormatName,34 /// Expect plain string as output.33 /// Expect plain string as output.35 /// Shortcut for `--format=string` thus this option is mutually exclusive with `format` option.34 /// Shortcut for `--format=string` thus this option is mutually exclusive with `format` option.36 #[clap(long, short = 'S'/*, group = "output_format"*/)]35 #[clap(long, short = 'S', group = "output_format")]37 string: bool,36 string: bool,38 /// Write output as YAML stream, can be used with --format json/yaml37 /// Write output as YAML stream, can be used with --format json/yaml39 #[clap(long, short = 'y')]38 #[clap(long, short = 'y')]crates/jrsonnet-cli/src/tla.rsdiffbeforeafterboth3use jrsonnet_evaluator::{error::Result, EvaluationState};3use jrsonnet_evaluator::{error::Result, EvaluationState};445#[derive(Clap)]5#[derive(Clap)]6// #[clap(help_heading = "TOP LEVEL ARGUMENTS")]6#[clap(help_heading = "TOP LEVEL ARGUMENTS")]7pub struct TLAOpts {7pub struct TLAOpts {8 /// Add top level string argument.8 /// Add top level string argument.9 /// Top level arguments will be passed to function before manifestification stage.9 /// Top level arguments will be passed to function before manifestification stage.crates/jrsonnet-cli/src/trace.rsdiffbeforeafterboth25}25}262627#[derive(Clap)]27#[derive(Clap)]28// #[clap(help_heading = "STACK TRACE VISUAL")]28#[clap(help_heading = "STACK TRACE VISUAL")]29pub struct TraceOpts {29pub struct TraceOpts {30 /// Format of stack traces' display in console.30 /// Format of stack traces' display in console.31 /// `compact` format only shows `filename:line:column`s31 /// `compact` format only shows `filename:line:column`s