Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic on a filter #1413

Open
vlad-ivanov-name opened this issue Feb 24, 2025 · 0 comments
Open

Panic on a filter #1413

vlad-ivanov-name opened this issue Feb 24, 2025 · 0 comments

Comments

@vlad-ivanov-name
Copy link
Collaborator

    let filter = ":[::package-1/subfolder-1/,::package-2/subfolder-1/,::package-3/subfolder-1/,::package-4/subfolder-1/subsubfolder_1/training/,::package-4/subfolder-1/subsubfolder_1/utils/,::package-5/subfolder-1/,::folder_aaa/folder_bbb/folder_ccc/cc.py,::folder_aaa/folder_bbb/folder_ccc/c.py,::folder_aaa/folder_bbb/folder_ccc/du.py,::folder_aaa/folder_bbb/folder_ccc/subsubsubfolder_1,::folder_aaa/folder_bbb/folder_ccc/ep.py,::folder_aaa/folder_bbb/folder_ccc/er.py,::folder_aaa/folder_bbb/folder_ccc/evaluation_routines.py,::folder_aaa/folder_bbb/folder_ccc/inference_routines.py,::folder_aaa/folder_bbb/folder_ccc/load.py,::folder_aaa/folder_bbb/folder_ccc/model_cards.py,::folder_aaa/folder_bbb/folder_ccc/od.py,::folder_aaa/folder_bbb/folder_ccc/pt.py,::pyproject.toml,::package-4/subfolder-1/subsubfolder_1/__init__.py,::package-4/subfolder-1/subsubfolder_1/base_configs.py,::package-4/tests/conftest.py]";
    josh::filter::parse(filter).unwrap();
thread 'main' panicked at library/core/src/slice/sort/shared/smallsort.rs:865:5:
user-provided comparison function does not correctly implement a total order
stack backtrace:
   0: rust_begin_unwind
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:692:5
   1: core::panicking::panic_fmt
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/panicking.rs:75:14
   2: core::slice::sort::shared::smallsort::panic_on_ord_violation
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/slice/sort/shared/smallsort.rs:865:5
   3: core::slice::sort::shared::smallsort::bidirectional_merge
             at /Users/vladislavivanov/.rustup/toolchains/1.85.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/sort/shared/smallsort.rs:843:13
   4: core::slice::sort::shared::smallsort::small_sort_general_with_scratch
             at /Users/vladislavivanov/.rustup/toolchains/1.85.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/sort/shared/smallsort.rs:286:9
   5: <T as core::slice::sort::shared::smallsort::StableSmallSortTypeImpl>::small_sort
             at /Users/vladislavivanov/.rustup/toolchains/1.85.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/sort/shared/smallsort.rs:61:9
   6: core::slice::sort::stable::quicksort::quicksort
             at /Users/vladislavivanov/.rustup/toolchains/1.85.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/sort/stable/quicksort.rs:25:13
   7: core::slice::sort::stable::drift::create_run
             at /Users/vladislavivanov/.rustup/toolchains/1.85.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/sort/stable/drift.rs:255:9
   8: core::slice::sort::stable::drift::sort
             at /Users/vladislavivanov/.rustup/toolchains/1.85.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/sort/stable/drift.rs:64:17
   9: core::slice::sort::stable::driftsort_main
             at /Users/vladislavivanov/.rustup/toolchains/1.85.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/sort/stable/mod.rs:121:5
  10: core::slice::sort::stable::sort
             at /Users/vladislavivanov/.rustup/toolchains/1.85.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/sort/stable/mod.rs:79:13
  11: alloc::slice::stable_sort
             at /Users/vladislavivanov/.rustup/toolchains/1.85.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/slice.rs:910:5
  12: alloc::slice::<impl [T]>::sort_by
             at /Users/vladislavivanov/.rustup/toolchains/1.85.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/slice.rs:301:9
  13: josh::filter::opt::prefix_sort
             at ./josh-core/src/filter/opt.rs:202:5
  14: josh::filter::opt::step
             at ./josh-core/src/filter/opt.rs:357:35
  15: josh::filter::opt::iterate
             at ./josh-core/src/filter/opt.rs:272:25
  16: josh::filter::opt::optimize
             at ./josh-core/src/filter/opt.rs:30:25
  17: josh::filter::parse::parse
             at ./josh-core/src/filter/parse.rs:277:19
  18: filter_test::main
             at ./filter-test/src/main.rs:4:5
  19: core::ops::function::FnOnce::call_once
             at /Users/vladislavivanov/.rustup/toolchains/1.85.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
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

No branches or pull requests

1 participant