Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add partition-table subcommand #172

Merged
merged 3 commits into from
May 3, 2022

Conversation

svenstaro
Copy link
Contributor

@svenstaro svenstaro commented Apr 30, 2022

Fixes #165 and fixes #163. It's quite pretty too:
image

This is quite a bit more than I bargained for but I think this makes sense as parsing of the binary stuff is also in esp-idf's gen_esp32part.py and that's Python so we can't have that!

I had to bump the MSRV to 1.58 but I hope that's ok.

@svenstaro svenstaro force-pushed the add-partition-subcommand branch 4 times, most recently from ccc107b to 292238e Compare April 30, 2022 19:18
Comment on lines +68 to +75
#[clap(long, required_unless_present_any = ["info", "to-csv"])]
to_binary: bool,
/// Convert binary partition table to CSV representation
#[clap(long, required_unless_present_any = ["info", "to-binary"])]
to_csv: bool,
/// Show information on partition table
#[clap(short, long, required_unless_present_any = ["to-binary", "to-csv"])]
info: bool,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might make more sense to have these as sub commands

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine as they terminate the chain of commands and I don't like too deeply nested subcommands.

Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this, sorry again for the delays!

Overall I think this looks quite good, I don't have much else to say about the submitted code which isn't nitpicking. There are a couple things I'd like to see added though, if you are willing; I can do it myself if you are not feeling up to it however, please just let me know.

  1. Could you please update the top-level README to include the new MSRV?
  2. You have updated espflash/src/main.rs, but not cargo-espflash/src/main.rs; would it be possible for you to add this functionality to cargo-espflash as well?

@svenstaro
Copy link
Contributor Author

Cool, all done!

Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you so much!

@jessebraham jessebraham merged commit 711039c into esp-rs:master May 3, 2022
@svenstaro svenstaro deleted the add-partition-subcommand branch May 3, 2022 16:22
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.

Add image info subcommand Expose partition table csv->bin and bin->csv parsers as subcommand
3 participants