Skip to content

more: replace nix by rustix#12267

Closed
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:more-nix-rustix
Closed

more: replace nix by rustix#12267
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:more-nix-rustix

Conversation

@oech3
Copy link
Copy Markdown
Contributor

@oech3 oech3 commented May 13, 2026

I noticed that write is incorrectly used instead of write_all which might not write everything. But a large refactoring is needed to fix it...

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/retry (passes in this run but fails in the 'main' branch)

@xtqqczze
Copy link
Copy Markdown
Contributor

We have OwnedFd, so can do File::from(fd) without unsafe.

@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented May 13, 2026

But it is required at many places.

@oech3 oech3 marked this pull request as ready for review May 13, 2026 02:14
@xtqqczze
Copy link
Copy Markdown
Contributor

Another reason to use standard library instead of rustix is to get clippy warnings:

warning: written amount is not handled
  --> tests/by-util/test_more.rs:51:5
   |
51 |     controller.write(b"q").unwrap();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: use `Write::write_all` instead, or handle partial writes
   = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_io_amount
   = note: `-W clippy::unused-io-amount` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::unused_io_amount)]`

@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented May 13, 2026

But it requires many diff. So I don't at here.

@xtqqczze
Copy link
Copy Markdown
Contributor

I'd rather remove both nix and rustix. Close this PR, and I'll fix it.

@oech3 oech3 closed this May 13, 2026
@oech3 oech3 deleted the more-nix-rustix branch May 13, 2026 02:25
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.

2 participants