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

Clap 3 #2863

Merged
merged 111 commits into from
Jan 20, 2022
Merged

Clap 3 #2863

merged 111 commits into from
Jan 20, 2022

Conversation

tertsdiepraam
Copy link
Member

This is going to fail a lot of tests, but I tried to port everything to clap 3 all at once. I did this very naively with a lot of search & replace, so with the help of the CI, I try to fix the utils before marking this as ready.

@tertsdiepraam tertsdiepraam linked an issue Jan 11, 2022 that may be closed by this pull request
@tertsdiepraam
Copy link
Member Author

@sylvestre I just realized that clap's MSRV is 1.54. Any chance we can bump our MSRV up?

@sylvestre
Copy link
Contributor

yeah, clap is probably a good reason

@jtracey jtracey mentioned this pull request Jan 16, 2022
10 tasks
@tertsdiepraam tertsdiepraam marked this pull request as ready for review January 17, 2022 12:26
@sylvestre
Copy link
Contributor

/me is staring at the CI result :)

@tertsdiepraam
Copy link
Member Author

tertsdiepraam commented Jan 17, 2022

That was interesting, the unit tests in od were using a mock object that was no longer valid with the new clap implementation, but the clap implementation was still correct. I removed the mock object and replaced it with the actual app.

Now we can stare at the results again :)

@tertsdiepraam
Copy link
Member Author

Well, a few GNU tests are broken with this one. I'll look into those later:

Error: GNU test failed: tests/misc/chcon-fail. tests/misc/chcon-fail is passing on 'master'. Maybe you have to rebase?
Error: GNU test failed: tests/rm/dangling-symlink. tests/rm/dangling-symlink is passing on 'master'. Maybe you have to rebase?
Error: GNU test failed: tests/rm/dir-no-w. tests/rm/dir-no-w is passing on 'master'. Maybe you have to rebase?
Error: GNU test failed: tests/rm/rm2. tests/rm/rm2 is passing on 'master'. Maybe you have to rebase?

@tertsdiepraam
Copy link
Member Author

I have filed an issue with clap for 3 leading hyphens in options (clap-rs/clap#3309), but I also found a workaround, which I will push.

@tertsdiepraam
Copy link
Member Author

tertsdiepraam commented Jan 18, 2022

Only this GNU test is failing (ignoring rm2):

tests/misc/chcon-fail.sh

Locally, it didn't seem to work either, until I did cargo build --release in src/uu/chcon and then it did work. I'm not sure what's going on...

@tertsdiepraam
Copy link
Member Author

@sylvestre do you think we can merge this regardless of the failing GNU test? If not, then I need some help figuring out what's going wrong :)

@sylvestre
Copy link
Contributor

@tertsdiepraam yeah, no big deal :)
Do you want me to merge it?

@tertsdiepraam tertsdiepraam merged commit 55a47f6 into uutils:main Jan 20, 2022
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.

Move to Clap 3
2 participants