IogaMaster / warden

A self hostable nixpkgs review bot
MIT License
13 stars 1 forks source link

document usage? #2

Closed KiaraGrouwstra closed 2 months ago

KiaraGrouwstra commented 4 months ago

me, naively trying this not sure how it works:

$ nix run github:IogaMaster/warden
You need to specify the pr number or url
RUST_BACKTRACE=full nix run github:IogaMaster/warden -- 289578
thread 'main' panicked at src/checks/statix.rs:14:14:
Failed to execute statix: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
   0:     0x64dd19a37eab - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h85e32f8f7b08f729
   1:     0x64dd19a700c0 - core::fmt::write::hae1cf5cde4ee2188
   2:     0x64dd19a2cf25 - std::io::Write::write_fmt::h4ae54bff47727b29
   3:     0x64dd19a37c84 - std::sys_common::backtrace::print::hea248a594c5888cf
   4:     0x64dd19a388d7 - std::panicking::default_hook::{{closure}}::h545cae1ad29f25d2
   5:     0x64dd19a38624 - std::panicking::default_hook::hc1d7fee5faf0cc8a
   6:     0x64dd19a38e38 - std::panicking::rust_panic_with_hook::h0e7975574d129b7c
   7:     0x64dd19a38d1e - std::panicking::begin_panic_handler::{{closure}}::h420dcc10a77211ab
   8:     0x64dd19a380c6 - std::sys_common::backtrace::__rust_end_short_backtrace::he6597460302ecd4a
   9:     0x64dd19a38a82 - rust_begin_unwind
  10:     0x64dd19761cd5 - core::panicking::panic_fmt::h3cf3338e18ada46e
  11:     0x64dd19761c93 - core::result::unwrap_failed::h22597ad5fa95281f
  12:     0x64dd197f6a1c - warden::main::{{closure}}::h044ba0fa21efe1a6
  13:     0x64dd197e66e9 - tokio::runtime::park::CachedParkThread::block_on::hbc0b9c8a7dd1054c
  14:     0x64dd198341aa - tokio::runtime::runtime::Runtime::block_on::h1c4da197e889c1c7
  15:     0x64dd1984b419 - warden::main::h6f6882220ce3e58b
  16:     0x64dd1984b503 - std::sys_common::backtrace::__rust_begin_short_backtrace::h388d50cab3907306
  17:     0x64dd1984b539 - std::rt::lang_start::{{closure}}::h67391b56508fdd5b
  18:     0x64dd19a38974 - std::panicking::try::h839c5e98485eaaba
  19:     0x64dd19a428eb - std::rt::lang_start_internal::h6a4b333c7c2ab7bd
  20:     0x64dd1984b52e - std::rt::lang_start::hd0a8a2c6d7bd9562
  21:     0x71b3b35ad0ce - __libc_start_call_main
  22:     0x71b3b35ad189 - __libc_start_main@GLIBC_2.2.5
  23:     0x64dd19762445 - _start
  24:                0x0 - <unknown>

i don't think it's broken, i think i just don't get it :)

IogaMaster commented 4 months ago

The number code is broken, give it the url of a pr and it should work

IogaMaster commented 4 months ago

nvm, the number is working. You need to have statix in your path. Maybe I need to change the package to use runtimeDeps instead of buildInputs.

IogaMaster commented 4 months ago

Seems to work in 20f4236fa37133d9e46e5cb71b23a417ae7a00d6

IogaMaster commented 4 months ago

Try nix run github:IogaMaster/warden/20f4236fa37133d9e46e5cb71b23a417ae7a00d6 -- 289578

KiaraGrouwstra commented 4 months ago

thanks for the quick fix! looking forward to using this more :)

KiaraGrouwstra commented 4 months ago

hm, not sure that worked for me. tried to run on a PR that seemed smaller to build, but still found it complaining about missing statix somehow:

$ nix run github:IogaMaster/warden/20f4236fa37133d9e46e5cb71b23a417ae7a00d6 -- 292120
thread 'main' panicked at src/checks/statix.rs:14:14:
Failed to execute statix: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
$ RUST_BACKTRACE=full nix run github:IogaMaster/warden/20f4236fa37133d9e46e5cb71b23a417ae7a00d6 -- https://github.com/NixOS/nixpkgs/pull/292120
thread 'main' panicked at src/checks/statix.rs:1                           4:14:
Failed to execute statix: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
   0:     0x599851db4eab - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h85e32f8f7b08f729
   1:     0x599851ded0c0 - core::fmt::write::hae1cf5cde4ee2188
   2:     0x599851da9f25 - std::io::Write::write_fmt::h4ae54bff47727b29
   3:     0x599851db4c84 - std::sys_common::backtrace::print::hea248a594c5888cf
   4:     0x599851db58d7 - std::panicking::default_hook::{{closure}}::h545cae1ad29f25d2
   5:     0x599851db5624 - std::panicking::default_hook::hc1d7fee5faf0cc8a
   6:     0x599851db5e38 - std::panicking::rust_panic_with_hook::h0e7975574d129b7c
   7:     0x599851db5d1e - std::panicking::begin_panic_handler::{{closure}}::h420dcc10a77211ab
   8:     0x599851db50c6 - std::sys_common::backtrace::__rust_end_short_backtrace::he6597460302ecd4a
   9:     0x599851db5a82 - rust_begin_unwind
  10:     0x599851adecd5 - core::panicking::panic_fmt::h3cf3338e18ada46e
  11:     0x599851adec93 - core::result::unwrap_failed::h22597ad5fa95281f
  12:     0x599851b73a1c - warden::main::{{closure}}::h044ba0fa21efe1a6
  13:     0x599851b636e9 - tokio::runtime::park::CachedParkThread::block_on::hbc0b9c8a7dd1054c
  14:     0x599851bb11aa - tokio::runtime::runtime::Runtime::block_on::h1c4da197e889c1c7
  15:     0x599851bc8419 - warden::main::h6f6882220ce3e58b
  16:     0x599851bc8503 - std::sys_common::backtrace::__rust_begin_short_backtrace::h388d50cab3907306
  17:     0x599851bc8539 - std::rt::lang_start::{{closure}}::h67391b56508fdd5b
  18:     0x599851db5974 - std::panicking::try::h839c5e98485eaaba
  19:     0x599851dbf8eb - std::rt::lang_start_internal::h6a4b333c7c2ab7bd
  20:     0x599851bc852e - std::rt::lang_start::hd0a8a2c6d7bd9562
  21:     0x7df0b74ae0ce - __libc_start_call_main
  22:     0x7df0b74ae189 - __libc_start_main@GLIBC_2.2.5
  23:     0x599851adf445 - _start
  24:                0x0 - <unknown>
 ~  101  %  RUST_BACKTRACE=full nix run github:IogaMaster/warden/20f4236fa37133d9e46e5cb71b23a417ae7a00d6 -- https://github.com/NixOS/nixpkgs/pull/292120
thread 'main' panicked at src/checks/statix.rs:14:14:
Failed to execute statix: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
   0:     0x5717e1fdeeab - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h85e32f8f7b08f729
   1:     0x5717e20170c0 - core::fmt::write::hae1cf5cde4ee2188
   2:     0x5717e1fd3f25 - std::io::Write::write_fmt::h4ae54bff47727b29
   3:     0x5717e1fdec84 - std::sys_common::backtrace::print::hea248a594c5888cf
   4:     0x5717e1fdf8d7 - std::panicking::default_hook::{{closure}}::h545cae1ad29f25d2
   5:     0x5717e1fdf624 - std::panicking::default_hook::hc1d7fee5faf0cc8a
   6:     0x5717e1fdfe38 - std::panicking::rust_panic_with_hook::h0e7975574d129b7c
   7:     0x5717e1fdfd1e - std::panicking::begin_panic_handler::{{closure}}::h420dcc10a77211ab
   8:     0x5717e1fdf0c6 - std::sys_common::backtrace::__rust_end_short_backtrace::he6597460302ecd4a
   9:     0x5717e1fdfa82 - rust_begin_unwind
  10:     0x5717e1d08cd5 - core::panicking::panic_fmt::h3cf3338e18ada46e
  11:     0x5717e1d08c93 - core::result::unwrap_failed::h22597ad5fa95281f
  12:     0x5717e1d9da1c - warden::main::{{closure}}::h044ba0fa21efe1a6
  13:     0x5717e1d8d6e9 - tokio::runtime::park::CachedParkThread::block_on::hbc0b9c8a7dd1054c
  14:     0x5717e1ddb1aa - tokio::runtime::runtime::Runtime::block_on::h1c4da197e889c1c7
  15:     0x5717e1df2419 - warden::main::h6f6882220ce3e58b
  16:     0x5717e1df2503 - std::sys_common::backtrace::__rust_begin_short_backtrace::h388d50cab3907306
  17:     0x5717e1df2539 - std::rt::lang_start::{{closure}}::h67391b56508fdd5b
  18:     0x5717e1fdf974 - std::panicking::try::h839c5e98485eaaba
  19:     0x5717e1fe98eb - std::rt::lang_start_internal::h6a4b333c7c2ab7bd
  20:     0x5717e1df252e - std::rt::lang_start::hd0a8a2c6d7bd9562
  21:     0x741e767a30ce - __libc_start_call_main
  22:     0x741e767a3189 - __libc_start_main@GLIBC_2.2.5
  23:     0x5717e1d09445 - _start
  24:                0x0 - <unknown>

i wasn't personally familiar with statix.

IogaMaster commented 2 months ago

This bug has been fixed with the inclusion of #3 The custom package now properly wraps the runtime deps

IogaMaster commented 2 months ago

Interesting, the issue is only present on certain pr's