coreutils
coreutils copied to clipboard
Remove all uses of `crash!`
The crash! macro is a leftover from old error handling in this project. We should always use UError and show! now.
Here are all uses of crash!: https://github.com/search?q=repo%3Auutils%2Fcoreutils%20crash!&type=code
We can tackle each of these in separate PRs. Make sure not to link those PRs to this issue (so don't write "closes #XXXX"), because that might close it prematurely. Only I've started here: https://github.com/search?q=repo%3Auutils%2Fcoreutils%20crash!&type=code
This is a good first issue if you're looking for one!
Awesome work here everyone! Just a couple of uses left!
I tried to run the cargo test and got the result below. Is the output intended like this?
failures:
---- test_du::test_du_no_dereference stdout ----
mkdir: /tmp/.tmpaRZr6V/a_dir
symlink: /tmp/.tmpaRZr6V/a_dir,/tmp/.tmpaRZr6V/symlink
run: /home/nemesis/Documents/Github/Focus/util/coreutils_master/target/debug/coreutils du -P
run: /home/nemesis/Documents/Github/Focus/util/coreutils_master/target/debug/coreutils du --dereference -P
run: /home/nemesis/Documents/Github/Focus/util/coreutils_master/target/debug/coreutils du -P --dereference
thread 'test_du::test_du_no_dereference' panicked at tests/by-util/test_du.rs:372:14:
'4 ./a_dir
8 ./subdir/deeper/deeper_dir
16 ./subdir/deeper
16 ./subdir/links
36 ./subdir
48 .
' does not contain 'symlink'
failures:
test_du::test_du_no_dereference
test result: FAILED. 2540 passed; 1 failed; 28 ignored; 0 measured; 0 filtered out; finished in 60.97s
error: test failed, to rerun pass `--test tests`
@allaboutevemirolive I get the same error on my local machine whereas it works fine in the CI. On my machine it is because /tmp is using tmpfs and there du --dereference doesn't work with both GNU du and uutils du.
Should we make a separate issue for that? It seems unrelated to this one
What concerns me is; why this error did not trigger repo CI? @tertsdiepraam
I'd love to discuss that in another issue :)
(It's probably like @cakebaker said because of the filesystem in the CI being different)