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

WIP: Update to latest structopt #22

Closed
wants to merge 84 commits into from
Closed

WIP: Update to latest structopt #22

wants to merge 84 commits into from

Conversation

CreepySkeleton
Copy link
Contributor

Fixes #17
This is import of structopt v0.3 crate.

This is purely work-in-progress, the job now is to make all the necessary changes to adapt this to clap 0.3.

This commit marks the beginning of `git rebase` that will pull all the
new comments that were made after the first import. The goal here is
to only pull the comments keeping their respective authors and
prioritizing `structopt`'s codebase on merge conflicts.
@CreepySkeleton
Copy link
Contributor Author

CreepySkeleton commented Oct 25, 2019

Hm, it seems certain commits are missing. Interesting...

OK, only one commit is missing, and it's mine. I don't care, actually, so it's fine.

@CreepySkeleton
Copy link
Contributor Author

CreepySkeleton commented Nov 8, 2019

OK guys, sorry for the radio silence, I got caught up in other projects and this one had mostly been blocked on TeXitoi/structopt#278 . I'll get to the work tomorrow, now I'm going to take a short break and play video games :)

@pksunkara
Copy link
Member

What! You just replaced this package with structopt.

@CreepySkeleton
Copy link
Contributor Author

@pksunkara Yes, this is the intention. Now I'm going to rework it a bit so it has the same API as clap_derive but implements all the features from structopt v0.3.

And no, I didn't forget about it, I just got lost in other stuff (and nobody tried to ping me anyway). I'll finish the work in a week or so.

@pksunkara
Copy link
Member

I will review it once this is ready. Even though I can't merge it.

@pksunkara
Copy link
Member

Looking at this, it looks like the rebase wasn't done properly. If we resolve the conflicts every commit (since there are only 25, it should be simple), then we don't need to make it this complex. Can you tell me the commits where structopt is completely in clap?

@CreepySkeleton
Copy link
Contributor Author

looking at this, it looks like the rebase wasn't done properly. If we resolve the conflicts every commit (since there are only 25, it should be simple), then we don't need to make it this complex.

I was thinking the same, initially, but I changed my mind. Now it's about 100 extra commits, the difference it pretty damn huge (structopt has evolved a lot since then) so I really feel like one big patch would be much simpler than 100 not-so-big patches.

since there are only 25

He-he-he, take a closer look 😄

Can you tell me the commits where structopt is completely in clap?

Could you please elaborate? I don't get what you mean.

@pksunkara
Copy link
Member

Could you please elaborate? I don't get what you mean.

If I want to start porting structopt changes to clap, from which commit in structopt should I start?

@pksunkara
Copy link
Member

TeXitoi/structopt@30da80c is the answer to my question.

@CreepySkeleton
Copy link
Contributor Author

If I want to start porting structopt changes to clap, from which commit in structopt should I start?

This is pretty useless question if you ask me. You don't really need to know the branching point, leave that for git to figure out!

This is how I did it:

git clone https://github.com/clap-rs/clap_derive
cd clap_derive

git remote add --mirror=fetch structopt https://github.com/TeXitoi/structopt/
git fetch structopt master
git co FETCH_HEAD
git rebase master
# resolve a LOT of merge conflicts ...
git co -b update_to_latest_structopt

@pksunkara
Copy link
Member

I am almost done porting the changes from structopt. Will make a PR soon.

@CreepySkeleton
Copy link
Contributor Author

Closing in favor of #23

@CreepySkeleton CreepySkeleton deleted the update_to_latest_structopt branch December 15, 2019 17:53
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.

Update to structopt 0.3 master