uutils / coreutils

Cross-platform Rust rewrite of the GNU coreutils
https://uutils.github.io/
MIT License
17.6k stars 1.27k forks source link

uucore: Move `pgrep/process.rs` to `uucore` #6483

Closed Krysztal112233 closed 2 months ago

Krysztal112233 commented 3 months ago

Follow the advance, moved procps/pgrep/process.rs to uucore/process.rs

Krysztal112233 commented 3 months ago

Waiting for https://github.com/uutils/procps/pull/95 merged

sylvestre commented 3 months ago

Could you please fix the clippy warnings?

Krysztal112233 commented 3 months ago

Could you please fix the clippy warnings?

I'll made a new pr to do this Theres already pr to do this #6482

cakebaker commented 3 months ago

@Krysztal112233 #6482 fixes the clippy errors in shuf.rs but there is also a clippy error shown in your code, see https://github.com/uutils/coreutils/actions/runs/9580690912/job/26415846170?pr=6483

sylvestre commented 3 months ago

please let us know when it is ready

github-actions[bot] commented 3 months ago

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Krysztal112233 commented 3 months ago

The pr related procps has been merged, I think it's time to move the code to uucore :) @sylvestre

github-actions[bot] commented 3 months ago

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
sylvestre commented 2 months ago

the coverage isn't ideal: "62.08% of diff hit (target 87.45%) " could you please improve it a bit ? thanks

Krysztal112233 commented 2 months ago

I need some help XP. @sylvestre @cakebaker

It looks like Codecov is not testing the tests in the process.rs file correctly, what should I do?

sylvestre commented 2 months ago

it isn't a coverage issue but a test:

--- TRY 3 STDERR:        uucore features::process::tests::test_process_information_new ---
thread 'features::process::tests::test_process_information_new' panicked at 'assertion failed: result.is_ok()', src/uucore/src/lib/features/process.rs:576:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:578:5
   1: core::panicking::panic_fmt
             at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:67:14
   2: core::panicking::panic
             at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:117:5
   3: uucore::features::process::tests::test_process_information_new
             at ./src/lib/features/process.rs:576:9
   4: uucore::features::process::tests::test_process_information_new::{{closure}}
             at ./src/lib/features/process.rs:574:39
   5: core::ops::function::FnOnce::call_once
             at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:250:5
   6: core::ops::function::FnOnce::call_once
             at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
github-actions[bot] commented 2 months ago

GNU testsuite comparison:

GNU test failed: tests/rm/rm2. tests/rm/rm2 is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)