Skip to content
This repository has been archived by the owner on May 11, 2020. It is now read-only.

Ported all the commits from structopt #23

Merged
merged 63 commits into from
Jan 7, 2020
Merged

Ported all the commits from structopt #23

merged 63 commits into from
Jan 7, 2020

Conversation

pksunkara
Copy link
Member

Except this one, TeXitoi/structopt@8068f96.

All the tests are passing,

    Finished dev [unoptimized + debuginfo] target(s) in 2.24s
     Running target/debug/deps/clap_derive-21c0b4e68271f5d6

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/arg_enum_basic-ffd07f5a01772105

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/arg_enum_case_sensitive-b9e58c509e694066

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/argument_naming-30db7cb783bfd8e6

running 19 tests
test test_rename_all_is_not_propagated_from_struct_into_flattened ... ok
test test_custom_short_overwrites_default_name ... ok
test test_custom_long_overwrites_default_name ... ok
test test_rename_all_is_propagated_from_struct_to_fields ... ok
test test_multi_word_enum_variant_is_renamed ... ok
test test_rename_all_is_not_propagated_from_struct_into_subcommand ... ok
test test_rename_all_is_propagated_from_enum_to_variants_and_their_fields ... ok
test test_rename_all_is_propagation_can_be_overridden ... ok
test test_single_word_enum_variant_is_default_renamed_into_kebab_case ... ok
test test_standalone_long_ignores_afterwards_defined_custom_name ... ok
test test_standalone_long_generates_kebab_case ... ok
test test_standalone_long_uses_previous_defined_casing ... ok
test test_standalone_long_uses_previous_defined_custom_name ... ok
test test_standalone_long_works_with_verbatim_casing ... ok
test test_standalone_short_generates_kebab_case ... ok
test test_standalone_short_ignores_afterwards_defined_custom_name ... ok
test test_standalone_short_uses_previous_defined_casing ... ok
test test_standalone_short_uses_previous_defined_custom_name ... ok
test test_standalone_short_works_with_verbatim_casing ... ok

test result: ok. 19 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/arguments-6212a6fda97e5720

running 5 tests
test arguments ... ok
test argument_with_default ... ok
test arguments_safe ... ok
test optional_argument ... ok
test required_argument ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/author_version_about-ccf42dd8fda1852a

running 3 tests
test no_author_version_about ... ok
test explicit_version_not_str ... ok
test use_env ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/basic-d1eeac03e5f113c0

running 1 test
test basic ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/custom_string_parsers-957bdcfa2bf08d02

running 7 tests
test test_every_custom_parser ... ok
test test_parse_hex ... ok
test test_cstring ... ok
test test_parser_occurrences ... ok
test test_parser_with_default_value ... ok
test test_path_opt_simple ... ok
test test_custom_bool ... ok

test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/deny_warnings-13fd209bb94fb527

running 2 tests
test warning_never_struct ... ok
test warning_never_enum ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/doc_comments_help-313ab307854a7767

running 5 tests
test empty_line_in_doc_comment_is_double_linefeed ... ok
test doc_comments ... ok
test field_long_doc_comment_both_help_long_help ... ok
test help_is_better_than_comments ... ok
test top_long_doc_comment_both_help_long_help ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/explicit_name_no_renaming-ff2771fb64407e30

running 2 tests
test explicit_short_long_no_rename ... ok
test explicit_name_no_rename ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/flags-9c61ed5f21f85299

running 4 tests
test non_bool_flags ... ok
test combined_flags ... ok
test multiple_flag ... ok
test unique_flag ... ok

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/flatten-a36f35bb815619bc

running 3 tests
test flatten_twice ... ok
test flatten_in_subcommand ... ok
test flatten ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/issues-ef35b580481ff2c0

running 2 tests
test issue_151 ... ok
test issue_289 ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/macro_errors-711275878cbd20a5

running 1 test
    Checking clap_derive-tests v0.0.0 (/Users/pksunkara/Coding/pksunkara/clap_derive/target/tests/clap_derive)
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s


test tests/ui/bool_default_value.rs ... ok
test tests/ui/bool_required.rs ... ok
test tests/ui/flatten_and_doc.rs ... ok
test tests/ui/flatten_and_methods.rs ... ok
test tests/ui/flatten_and_parse.rs ... ok
test tests/ui/non_existent_attr.rs ... ok
test tests/ui/opt_opt_nonpositional.rs ... ok
test tests/ui/opt_vec_nonpositional.rs ... ok
test tests/ui/option_default_value.rs ... ok
test tests/ui/option_required.rs ... ok
test tests/ui/parse_empty_try_from_os.rs ... ok
test tests/ui/parse_function_is_not_path.rs ... ok
test tests/ui/parse_literal_spec.rs ... ok
test tests/ui/parse_not_zero_args.rs ... ok
test tests/ui/positional_bool.rs ... ok
test tests/ui/raw.rs ... ok
test tests/ui/rename_all_wrong_casing.rs ... ok
test tests/ui/skip_flatten.rs ... ok
test tests/ui/skip_subcommand.rs ... ok
test tests/ui/skip_with_other_options.rs ... ok
test tests/ui/skip_without_default.rs ... ok
test tests/ui/struct_flatten.rs ... ok
test tests/ui/struct_parse.rs ... ok
test tests/ui/struct_subcommand.rs ... ok
test tests/ui/structopt_empty_attr.rs ... ok
test tests/ui/structopt_name_value_attr.rs ... ok
test tests/ui/subcommand_and_flatten.rs ... ok
test tests/ui/subcommand_and_methods.rs ... ok
test tests/ui/subcommand_and_parse.rs ... ok
test tests/ui/subcommand_opt_opt.rs ... ok
test tests/ui/subcommand_opt_vec.rs ... ok
test tests/ui/tuple_struct.rs ... ok


test ui ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/nested_subcommands-298f3143d9612751

running 6 tests
test test_add ... ok
test test_badinput ... ok
test test_fetch ... ok
test sub_sub_cmd_with_option ... ok
test test_subsubcommand ... ok
test test_no_cmd ... ok

test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/non_literal_attributes-571908e51a1b8381

running 5 tests
test test_parse_hex_function_path ... ok
test test_multi_args ... ok
test test_multi_args_fail ... ok
test test_bool ... ok
test test_slice ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/options-f3f548e7215b88f7

running 11 tests
test option_from_str ... ok
test default_value ... ok
test optional_option ... ok
test optional_argument_for_optional_option ... ok
test option_with_raw_default ... ok
test option_with_default ... ok
test options ... ok
test optional_vec ... ok
test required_option ... ok
test two_optional_vecs ... ok
test two_option_options ... ok

test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/privacy-108cead5b82e5f5b

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/raw_bool_literal-673f90a1614cc25d

running 1 test
test raw_bool_literal ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/raw_idents-4ca2a96f7cfdfac1

running 1 test
test raw_idents ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/skip-c7c3852379830980

running 5 tests
test skip_help_doc_comments ... ok
test skip_enum ... ok
test skip_2 ... ok
test skip_1 ... ok
test skip_val ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/special_types-02f80202d8801d2f

running 3 tests
test special_types_option ... ok
test special_types_bool ... ok
test special_types_vec ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/subcommands-4a4de9775f8d2058

running 8 tests
test test_add ... ok
test flatten_enum ... ok
test test_hyphenated_subcommands ... ok
test test_fetch ... ok
test test_null_commands ... ok
test enum_in_enum_subsubcommand ... ok
test test_no_parse ... ok
test test_tuple_commands ... ok

test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/utils-9eb6f482c5cc7669

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests clap_derive

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

0ndorio and others added 30 commits December 15, 2019 00:30
There was a typo preventing the probematic attr to be shown to the user.
was found in comments and code, but required no user-facing API change.
@pksunkara
Copy link
Member Author

@CreepySkeleton Check this PR. I have cherry picked almost every code commit and resolved the conflicts. We can close yours.

@CreepySkeleton
Copy link
Contributor

I gave it a shallow look, great job! I'll review it in detail in few days; for now I've noticed some minor mistakes like #[clap(name = "foo")] where it should be omitted, but otherwise looks great.

You have put a lot of time and effort into this @pksunkara , thank you!

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
examples/doc_comments.rs Outdated Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
README.md Show resolved Hide resolved
examples/README.md Show resolved Hide resolved
examples/enum_in_args.rs Outdated Show resolved Hide resolved
tests/ui/subcommand_and_flatten.rs Outdated Show resolved Hide resolved
tests/ui/subcommand_opt_opt.rs Outdated Show resolved Hide resolved
tests/ui/subcommand_opt_opt.rs Outdated Show resolved Hide resolved
tests/ui/subcommand_opt_vec.rs Outdated Show resolved Hide resolved
tests/ui/subcommand_opt_vec.rs Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
@CreepySkeleton
Copy link
Contributor

Also, it would be a good idea to rename tests/ui/structopt_* files to tests/ui/clap_derive_*

@pksunkara
Copy link
Member Author

Addressed all your comments.

@CreepySkeleton
Copy link
Contributor

Hey @Dylan-DPC , is this blocked on something? I think it's ready to be merged at last.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.