Skip to content

Plugin is crashing when group-by is used #3

Description

@realknorke

Is this a gitql bug or in the plugin?

 with-env {RUST_BACKTRACE : full} {query git "select name, count(1) from commits group by 1"}
thread 'plugin runner (primary)' panicked at /home/knorke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitql-parser-0.8.0/src/parser.rs:1367:46:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:     0x55ed068f0376 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::he8cd6f8498d13785
   1:     0x55ed06598f9b - core::fmt::write::hc1b082ba0a6fc11c
   2:     0x55ed068fb19f - std::io::Write::write_fmt::h82b83f872da9c1a6
   3:     0x55ed068fee8b - std::panicking::default_hook::{{closure}}::hdd246f8991ed5f80
   4:     0x55ed068fe9b8 - std::panicking::default_hook::ha641aac0936707a1
   5:     0x55ed068ff532 - std::panicking::rust_panic_with_hook::ha049d193cc65543f
   6:     0x55ed068f0713 - std::panicking::begin_panic_handler::{{closure}}::hb2ea1e9aac12b33c
   7:     0x55ed068f0579 - std::sys::backtrace::__rust_end_short_backtrace::ha22b579dcb044f1c
   8:     0x55ed068ff074 - rust_begin_unwind
   9:     0x55ed0655caa3 - core::panicking::panic_fmt::h293d2254b180c654
  10:     0x55ed0655cb2c - core::panicking::panic::h629b72f7dffcf333
  11:     0x55ed0655d089 - core::option::unwrap_failed::h1adad2599d1edee7
  12:     0x55ed065d5a67 - gitql_parser::parser::parse_unary_expression::h615179ff33184771
  13:     0x55ed065d3e40 - gitql_parser::parser::parse_glob_expression::h25a3dd8a38b81c7b
  14:     0x55ed065d3abc - gitql_parser::parser::parse_like_expression::h561ca388d8046985
  15:     0x55ed065d36a8 - gitql_parser::parser::parse_factor_expression::h1c48e9da7ba34279
  16:     0x55ed065d32d9 - gitql_parser::parser::parse_term_expression::h3c5dad08609f81a3
  17:     0x55ed065d2ee4 - gitql_parser::parser::parse_bitwise_shift_expression::h084e934b056d7165
  18:     0x55ed065d2af8 - gitql_parser::parser::parse_comparison_expression::h52cdfa25f23a0df9
  19:     0x55ed065d2737 - gitql_parser::parser::parse_equality_expression::h325fb18bf5aca1cc
  20:     0x55ed065d2221 - gitql_parser::parser::parse_bitwise_and_expression::h0d22b09c27d110b7
  21:     0x55ed065d1de4 - gitql_parser::parser::parse_logical_xor_expression::h1bab6a5dc05c381c
  22:     0x55ed065d19a7 - gitql_parser::parser::parse_bitwise_or_expression::hc4ca15e0529b51ae
  23:     0x55ed065d156a - gitql_parser::parser::parse_logical_and_expression::h44e9032b009b764c
  24:     0x55ed065d112d - gitql_parser::parser::parse_logical_or_expression::hd9cce9b49bf696a8
  25:     0x55ed065d05f5 - gitql_parser::parser::parse_expression::hdfc429d422bd7e69
  26:     0x55ed065ccb31 - gitql_parser::parser::parse_gql::h8d4724bf1ebb26f4
  27:     0x55ed067ea905 - <T as nu_plugin::plugin::command::PluginCommand>::run::ha7c183173fbb2526
  28:     0x55ed0679161d - std::panic::catch_unwind::hec87457109eef2fd
  29:     0x55ed067b1518 - std::sys::backtrace::__rust_begin_short_backtrace::h2b40c9548d099ec2
  30:     0x55ed067ca756 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hd3147c9aafb01528
  31:     0x55ed068f5eab - std::sys::pal::unix::thread::Thread::new::thread_start::hc87b62e624def408
  32:     0x7fb07b0983b2 - start_thread
  33:     0x7fb07b11d5fc - __clone3
  34:                0x0 - <unknown>
Error:   × Failed to receive response to plugin call from `query_git`
   ╭─[entry #14:1:35]
 1 │ with-env {RUST_BACKTRACE : full} {query git "select name, count(1) from commits group by 1"}
   ·                                   ────┬────
   ·                                       ╰── while waiting for this operation to complete
   ╰────
  help: try restarting the plugin with `plugin use 'query_git'`

I am using Nushell 0.99.1

 version
╭────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ version            │ 0.99.1                                                                                               │
│ major              │ 0                                                                                                    │
│ minor              │ 99                                                                                                   │
│ patch              │ 1                                                                                                    │
│ branch             │                                                                                                      │
│ commit_hash        │                                                                                                      │
│ build_os           │ linux-x86_64                                                                                         │
│ build_target       │ x86_64-unknown-linux-gnu                                                                             │
│ rust_version       │ rustc 1.81.0 (eeb90cda1 2024-09-04) (built from a source tarball)                                    │
│ cargo_version      │ cargo 1.81.0 (2dbb1af80 2024-08-20)                                                                  │
│ build_time         │ 2024-10-20 22:34:00 +00:00                                                                           │
│ build_rust_channel │ release                                                                                              │
│ allocator          │ mimalloc                                                                                             │
│ features           │ default, sqlite, trash                                                                               │
│ installed_plugins  │ emoji 0.7.0, file 0.9.0, gstat 0.99.1, polars 0.99.1, port_scan 1.2.5, query 0.99.1, query_git 0.8.0 │
╰────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────╯

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions