From 9c2293584547e3250a2bd05d23e87d3d719e0c59 Mon Sep 17 00:00:00 2001 From: Chris Simpkins Date: Mon, 20 Nov 2023 21:37:12 -0500 Subject: [PATCH] add new `--vv` option for verbose debug version reporting --- fontc/src/args.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/fontc/src/args.rs b/fontc/src/args.rs index a94613583..39079589e 100644 --- a/fontc/src/args.rs +++ b/fontc/src/args.rs @@ -11,7 +11,11 @@ use serde::{Deserialize, Serialize}; #[command(version)] pub struct Args { /// A designspace, ufo, or glyphs file - #[arg(conflicts_with = "source", required_unless_present("source"))] + #[arg( + conflicts_with = "source", + required_unless_present("source"), + required_unless_present("verbose_version") + )] input_source: Option, /// DEPRECATED: old name for positional input file @@ -78,6 +82,12 @@ pub struct Args { // https://github.com/googlefonts/fontmake/blob/6a8b2907/Lib/fontmake/__main__.py#L602 #[arg(long, default_value = "false")] pub no_production_names: bool, + + /// Print verbose version information for debugging + // Includes fontc git commit, rustc host triple, rustc version and channel, llvm version, + // cargo profile, and cargo optimization level. + #[arg(long = "vv", default_value = "false")] + pub verbose_version: bool, } impl Args { @@ -123,6 +133,7 @@ impl Args { skip_features: false, keep_direction: false, no_production_names: false, + verbose_version: false, } }