Skip to content

Conversation

@oech3
Copy link
Contributor

@oech3 oech3 commented Jan 4, 2026

Closes #10071

@oech3 oech3 changed the title hashsum: Move --ckeck confliction to clap hashsum: Move --check confliction to clap Jan 5, 2026
@RenjiSann
Copy link
Collaborator

Can you include this change in #10028 ?

@oech3 oech3 changed the title hashsum: Move --check confliction to clap hashsum, cksum: Move --check confliction to clap Jan 6, 2026
@oech3

This comment was marked as resolved.

@oech3 oech3 force-pushed the hashsum-windows branch 2 times, most recently from cd2f63b to c241bad Compare January 6, 2026 10:53
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

GNU testsuite comparison:

GNU test failed: tests/cksum/md5sum. tests/cksum/md5sum is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/shuf/shuf-reservoir is no longer failing!
Congrats! The gnu test tests/sort/sort-stale-thread-mem is no longer failing!

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 6, 2026

Merging this PR will not alter performance

Summary

✅ 139 untouched benchmarks
⏩ 37 skipped benchmarks1


Comparing oech3:hashsum-windows (cbf2e6b) with main (b93da48)2

Open in CodSpeed

Footnotes

  1. 37 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (bc3b613) during the generation of this report, so b93da48 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

GNU testsuite comparison:

GNU test failed: tests/cksum/md5sum. tests/cksum/md5sum is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/shuf/shuf-reservoir is no longer failing!
Congrats! The gnu test tests/sort/sort-stale-thread-mem is no longer failing!

@oech3

This comment was marked as resolved.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

GNU testsuite comparison:

GNU test failed: tests/cksum/md5sum. tests/cksum/md5sum is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/shuf/shuf-reservoir is no longer failing!
Congrats! The gnu test tests/sort/sort-stale-thread-mem is no longer failing!

@oech3

This comment was marked as resolved.

@oech3

This comment was marked as resolved.

@oech3 oech3 force-pushed the hashsum-windows branch 2 times, most recently from bd568b4 to 3615a87 Compare January 6, 2026 17:20
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

GNU testsuite comparison:

Congrats! The gnu test tests/shuf/shuf-reservoir is no longer failing!
Congrats! The gnu test tests/sort/sort-stale-thread-mem is no longer failing!

@sylvestre sylvestre merged commit 27060d8 into uutils:main Jan 7, 2026
130 checks passed
@oech3 oech3 deleted the hashsum-windows branch January 7, 2026 05:41
@RenjiSann
Copy link
Collaborator

Not sure we should have merged that, if we're going back to manual validation for --text/--tag and cie 🤔

wdyt @oech3 ?

@oech3
Copy link
Contributor Author

oech3 commented Jan 7, 2026

https://github.com/uutils/coreutils#goals says

Matching GNU's output (stdout and error code) exactly
Our key objectives include: Better error messages

clap does not provide the reason why are those flags conflicts (though I don't think GNU message is great...). If @sylvestre dislike clap's messages, I'll revert every thing at 1 commit.

I think we can reduce complexity of *.rs after clap-rs 5 without require bypass bug was fixed.

@sylvestre
Copy link
Contributor

yeah, please revert
i prefer quality of the error messages

@oech3
Copy link
Contributor Author

oech3 commented Jan 7, 2026

--tag --text:
clap:
error: the following required arguments were not provided:
  --untagged
gnu:
--text mode is only supported with --untagged

--warn:
clap:
error: the following required arguments were not provided:
  --check
gnu
cksum: the --warn option is meaningful only when verifying checksums

--text
clap:
error: the following required arguments were not provided:
  --untagged
gnu:
--text mode is only supported with --untagged

One of a clap's advantage is multiple errors like

--warn --text
clap:
error: the following required arguments were not provided:
  --check
  --untagged
gnu:
--text mode is only supported with --untagged

Is there any way to keep last one only?

@oech3
Copy link
Contributor Author

oech3 commented Jan 7, 2026

--check --text
clap: error: the argument '--check' cannot be used with '--text'
gnu: cksum: --text mode is only supported with --untagged

cksum --check -a crc by clap is impossible yet.

@oech3
Copy link
Contributor Author

oech3 commented Jan 7, 2026

@sylvestre I don't think GNU is much better at here. Would you evaluate #10041 (comment) ?

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.

hashsum: Should Windows/Cygwin accept --check --binary/--text?

3 participants