-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
rm: add verbose output and trim multiple slashes #1988
Conversation
Uses the normalize_path used in cargo to strip duplicate slashes With a link to a std rfc rust-lang/rfcs#2208 This fixes uutils#1829 This also touches uutils#1768 but does not attempt to fully solve it
This is ambiguous as we have no precedent for how windows paths should be formatted So I picked the canonical form
I noticed that running the test suite on windows that there are unrelated tests failing, but they were failing before my change and since ci is happy I'm assuming its fine. There are also unrelated rustfmt changes that I did not commit because they are not relevant to the change at hand Let me know if there is anything I can do to improve the change as I can test on both platforms |
Seems like I got hit by rust-lang/rustfmt#803 It did not ran formatting on the tests
Since we don't run uucore tests by default I added them to our ci and readme
Should be ready to review now :)
|
@sylvestre let me know if anything is still missing :) |
@@ -150,7 +150,7 @@ jobs: | |||
uses: actions-rs/cargo@v1 | |||
with: | |||
command: test | |||
args: --features "feat_os_unix" | |||
args: --features "feat_os_unix" -p uucore -p coreutils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this
args: --features "feat_os_unix" -p uucore -p coreutils | |
args: --features "feat_os_unix" |
please create a separate PR for this with the rational
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created #2030 which now blocks this pr :)
@@ -536,6 +536,17 @@ jobs: | |||
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo "-puu_${u}"; done;)" | |||
echo set-output name=UTILITY_LIST::${UTILITY_LIST} | |||
echo ::set-output name=CARGO_UTILITY_LIST_OPTIONS::${CARGO_UTILITY_LIST_OPTIONS} | |||
- name: Test uucore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
@@ -226,6 +226,11 @@ If you would prefer to test a select few utilities: | |||
$ cargo test --features "chmod mv tail" --no-default-features | |||
``` | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
Before this change we never ran tests on uucore itself meaning that is was not possible to test functions of the shared core, only their usage in the different binaries This change adds running uucore to our ci, which will increase coverage for the few doctests that exist and is extracted from uutils#1988 where first tests for uucore will be introduced
Fixes #1829
Uses the
normalize_path
used in cargo to strip duplicate slashesWith a link to a std rfc rust-lang/rfcs#2208
This fixes #1829
This also touches #1768
but does not attempt to fully solve it, as I rather have that be a separate pr
The fix to enable any output was to use the recursive version whenever we want to be verbose. #1768 (comment) suggests to anyway run
remove_dir_all
after we do the recursive delete but I feel more tests are neededI also updated the test proposed in #1829 to account for windows having a different normalized path using
\\