ls: Improve error handling and other improvements#2809
ls: Improve error handling and other improvements#2809sylvestre merged 23 commits intouutils:masterfrom kimono-koans:ls_error_handling_2
Conversation
There was a problem hiding this comment.
Alright, good stuff! You'll notice that I left a lot of comments, which is mostly because you included a lot more changes than you originally set out to do. I admire your enthusiasm, but please keep this PR focused on the orignal task: improving the error handling. That makes it much easier to review. The other changes require a bit more discussion and I think it's best to do that in issues and other PRs.
As a general remark: please follow clippy suggestions instead of putting an #[allow(...)]. Performance optimizations are also tricky. First, they should (almost) always come with measurements to show the impact, so we can evaluate whether the change is worth merging. We generally do this with hyperfine, see the BENCHMARKING.md file in the ls folder. Second, they should really be done in a separate PR, so that we can clearly see where the performance change is coming from.
|
Appreciate your review and your good suggestions! I know I gave you too much experimentation! I've excised my over-exubrance, and am working on small fixes elsewhere. I left 2 of your comments open. I hope you will take a look again, when I submit those changes. Re: UIoError, I am still have problems with formatting. Perhaps you saw that I left my implementation in comments throughout the list function. If you run, you will pop an error in one test, and it seems to have to do with quoting style on the path? I just fixed an error message ordering issue and perhaps you will take a look when I resubmit. Thanks! |
|
Thanks!
I found the two comments, but I can't reproduce this error. Do you maybe have a branch I can checkout where that error pops up? |
It's probably because I've been running the MSRV (caused clippy to not work correctly as well). I'll try again on stable and let you know if I have any issues. |
Unfortunately I get the 'Entity not found' error again, which doesn't match GNU semantics. This happens whether I create a UIoError::new or FromIo::map_err_context. See my branch: https://github.com/kimono-koans/coreutils/tree/ls_uioerror_native |
tertsdiepraam
left a comment
There was a problem hiding this comment.
Great job on the inodes! I think you found a great solution. It just needsI'm still seeing some things I requested changes on, could you fix those?
Re: error handling: I think the we should stick to your custom implementation for now and fix UIoError separately and port ls to use UIoError later.
…, should be fixed?!
tertsdiepraam
left a comment
There was a problem hiding this comment.
I think this is ready to get merged! Great work and I look forward to seeing your PRs with the changes we had to cut from this one!
|
bravo: |
Referenced as an issue as well: #2785