From 0790ff9ee4b044afd9653736fa1de3b4e1753365 Mon Sep 17 00:00:00 2001 From: Jeff Vander Stoep Date: Mon, 5 Dec 2022 15:49:44 +0100 Subject: Upgrade argh_shared to 0.1.9 This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update rust/crates/argh_shared For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md Test: TreeHugger Change-Id: I775c7dc73f7f6e2eb90409cd78e3f02bad3b2b46 --- .cargo_vcs_info.json | 2 +- Android.bp | 4 +--- Cargo.toml | 8 ++++++-- Cargo.toml.orig | 2 +- METADATA | 12 ++++++++---- README.md | 13 +++++++++++++ 6 files changed, 30 insertions(+), 11 deletions(-) diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 116e262..171d4a2 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "f1f85d2d89cbe09314dc1b59e581b8a43531cf3e" + "sha1": "adc704cd29f710864b0fc1872bc86f857bebfdbf" }, "path_in_vcs": "argh_shared" } \ No newline at end of file diff --git a/Android.bp b/Android.bp index 4d0ad6b..7b1403e 100644 --- a/Android.bp +++ b/Android.bp @@ -1,8 +1,6 @@ // This file is generated by cargo2android.py --config cargo2android.json. // Do not modify this file as changes will be overridden on upgrade. - - package { default_applicable_licenses: ["external_rust_crates_argh_shared_license"], } @@ -25,7 +23,7 @@ rust_library { host_supported: true, crate_name: "argh_shared", cargo_env_compat: true, - cargo_pkg_version: "0.1.7", + cargo_pkg_version: "0.1.9", srcs: ["src/lib.rs"], edition: "2018", apex_available: [ diff --git a/Cargo.toml b/Cargo.toml index d54a07f..bb09f25 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,8 +12,12 @@ [package] edition = "2018" name = "argh_shared" -version = "0.1.7" -authors = ["Taylor Cramer ", "Benjamin Brittain ", "Erick Tryzelaar "] +version = "0.1.9" +authors = [ + "Taylor Cramer ", + "Benjamin Brittain ", + "Erick Tryzelaar ", +] description = "Derive-based argument parsing optimized for code size" readme = "README.md" license = "BSD-3-Clause" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 1f7e694..ca85786 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "argh_shared" -version = "0.1.7" +version = "0.1.9" authors = ["Taylor Cramer ", "Benjamin Brittain ", "Erick Tryzelaar "] edition = "2018" license = "BSD-3-Clause" diff --git a/METADATA b/METADATA index e3c64c5..d7a3d40 100644 --- a/METADATA +++ b/METADATA @@ -1,3 +1,7 @@ +# This project was upgraded with external_updater. +# Usage: tools/external_updater/updater.sh update rust/crates/argh_shared +# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md + name: "argh_shared" description: "Derive-based argument parsing optimized for code size" third_party { @@ -7,13 +11,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/argh_shared/argh_shared-0.1.7.crate" + value: "https://static.crates.io/crates/argh_shared/argh_shared-0.1.9.crate" } - version: "0.1.7" + version: "0.1.9" license_type: NOTICE last_upgrade_date { year: 2022 - month: 1 - day: 13 + month: 12 + day: 5 } } diff --git a/README.md b/README.md index 4e949e4..7368162 100644 --- a/README.md +++ b/README.md @@ -175,3 +175,16 @@ struct SubCommandTwo { ``` NOTE: This is not an officially supported Google product. + + +## How to debug the expanded derive macro for `argh` + +The `argh::FromArgs` derive macro can be debugged with the [cargo-expand](https://crates.io/crates/cargo-expand) crate. + +### Expand the derive macro in `examples/simple_example.rs` + +See [argh/examples/simple_example.rs](./argh/examples/simple_example.rs) for the example struct we wish to expand. + +First, install `cargo-expand` by running `cargo install cargo-expand`. Note this requires the nightly build of Rust. + +Once installed, run `cargo expand` with in the `argh` package and you can see the expanded code. -- cgit v1.2.3