git.delta.rocks / jrsonnet / refs/commits / 88be4ee7c720

difftreelog

feat help headings and colors

Yaroslav Bolyukin2020-10-19parent: #e99c281.patch.diff
in: master

9 files changed

modifiedCargo.lockdiffbeforeafterboth
6262
63[[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",
8080
81[[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",
modifiedcmds/jrsonnet/Cargo.tomldiffbeforeafterboth
2323
24[dependencies.clap]24[dependencies.clap]
25git = "https://github.com/clap-rs/clap"25git = "https://github.com/clap-rs/clap"
26rev = "3e9ee86713b5c407b50ba76f30cffaed25952063"26rev = "1d0b21908f93478e75b4b1a21533d86325d39386"
2727
modifiedcmds/jrsonnet/src/main.rsdiffbeforeafterboth
1use 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;
1415
15#[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}
2324
24#[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,
modifiedcrates/jrsonnet-cli/Cargo.tomldiffbeforeafterboth
1313
14[dependencies.clap]14[dependencies.clap]
15git = "https://github.com/clap-rs/clap"15git = "https://github.com/clap-rs/clap"
16rev = "3e9ee86713b5c407b50ba76f30cffaed25952063"16rev = "1d0b21908f93478e75b4b1a21533d86325d39386"
1717
modifiedcrates/jrsonnet-cli/src/ext.rsdiffbeforeafterboth
54}54}
5555
56#[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 preferred
modifiedcrates/jrsonnet-cli/src/lib.rsdiffbeforeafterboth
17}17}
1818
19#[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}
3434
35#[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.
modifiedcrates/jrsonnet-cli/src/manifest.rsdiffbeforeafterboth
23}23}
2424
25#[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/yaml
39 #[clap(long, short = 'y')]38 #[clap(long, short = 'y')]
modifiedcrates/jrsonnet-cli/src/tla.rsdiffbeforeafterboth
3use jrsonnet_evaluator::{error::Result, EvaluationState};3use jrsonnet_evaluator::{error::Result, EvaluationState};
44
5#[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.
modifiedcrates/jrsonnet-cli/src/trace.rsdiffbeforeafterboth
25}25}
2626
27#[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