Skip to content

examples: replace structopt with pico-args#357

Merged
kaleidawave merged 3 commits into
brendanzab:masterfrom
tamird:clap
Feb 5, 2025
Merged

examples: replace structopt with pico-args#357
kaleidawave merged 3 commits into
brendanzab:masterfrom
tamird:clap

Conversation

@tamird
Copy link
Copy Markdown
Contributor

@tamird tamird commented Jan 8, 2024

See TeXitoi/structopt#525.

Currently codespan-reporting is the most downloaded dependent of
structopt: https://crates.io/crates/structopt/reverse_dependencies.

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Jan 8, 2024

@Johann150 perhaps? Unclear if this repository is maintained.

@Johann150
Copy link
Copy Markdown
Contributor

Please check your code formatting (or run cargo fmt), as indicated by the CI. You would probably also want to rebase on the master branch, since there unfortunately was some broken CI.

There also seems to be an issue with the minimum supported Rust version so CI will probably not completely pass still, but I don't feel qualified to change that. I'm just a collaborator, not a maintainer of this package.

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Jan 8, 2024

Both issues should be fixed now. Could you trigger another run?

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Jan 8, 2024

One more attempt please! Should be fixed now. Implementing "possible values" on foreign types is a bit clumsier now.

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Jan 8, 2024

Looks like we'd need to bump MSRV to 1.56 fro 1.46 to allow this to land. See description in d-e-s-o/test-log@9619698.

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Jan 9, 2024

Would you mind allowing CI to run again?

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Jan 9, 2024

Sadly have to bump further to 1.60. Could you run CI again?

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Jan 9, 2024

Needed to update the arguments to cargo update. Another run, please!

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Jan 9, 2024

Once more please! Need 1.61.

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Jan 10, 2024

@Johann150 this is finally green. If you are not able to approve this MSRV bump, can you ping someone who is?

@Johann150
Copy link
Copy Markdown
Contributor

I don't think it makes sense to raise the MSRV for the entire library just because one of the examples requires it. It would probably be a better idea to use another parsing framework, e.g. pico-args for this, or alternatively remove command line parsing from the example files and documentation code examples.

See TeXitoi/structopt#525.

Currently codespan-reporting is the second most downloaded dependent of
structopt: https://crates.io/crates/structopt/reverse_dependencies.
This type doesn't provide any value over ColorChoice, which is already
FromStr.
@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Feb 22, 2024

Done.

I added another commit to remove ColorArg, but I can withdraw it if you prefer.

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Feb 28, 2024

@Johann150 can you please run CI?

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Mar 14, 2024

@Johann150 ping.

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented May 15, 2024

@Johann150 could you have a look please?

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Sep 9, 2024

@Johann150 ping.

@tamird tamird changed the title examples: replace structopt with clap examples: replace structopt with pico-args Nov 11, 2024
@kaleidawave
Copy link
Copy Markdown
Collaborator

kaleidawave commented Feb 5, 2025

Have moved pico-args to dev-dependencies. Therefore it should NOT introduce breakages for those who use this library.

I have checked and all the examples work and as intended (on latest Rust). The CI needs improving (and it is raising issues on dependencies, not this project) and as this does not touch library code it should be fine, for merging!

Thanks for updating from struct-opt which has been in maintenance for nearly 3 years. If you have any other changes, feel free to open a follow up PR.

@kaleidawave kaleidawave merged commit cd5f262 into brendanzab:master Feb 5, 2025
@tamird tamird deleted the clap branch February 5, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants