Closed alexcardell closed 10 months ago
Thanks for the report! I've just pushed a new version of the CLI to provide clearer panic stack traces so this is easier to debug.
I did mange to repro though, and it's specifically something to do with calling in to Neovim. Could you help me out a do the following, please?
env | grep NVIM
.Thanks!
Cool project by the way!
CLI v0.2.4, standalone binary
nvim --version
NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "
/nix/store/r6wg9w7mzbd6vmmyhms0yb6y8sypfy8k-neovim-unwrapped-0.9.1/share/nvim
"
Run :checkhealth for more info
Nvim terminal output trace
Oh no! Oatmeal has failed with the following app version and err
or.
Version: 0.2.4
Commit: v0.2.4
Error: EOF while parsing a value at line 1 column 0
0: anyhow::backtrace::capture::Backtrace::capture
1: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
2: <oatmeal::infrastructure::editors::neovim::Neovim as oatmeal::domain::models::editor::Editor>::get_context::{{closure}}
3: oatmeal::application::ui::start::{{closure}}
4: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
5: oatmeal::main::{{closure}}
6: tokio::runtime::park::CachedParkThread::block_on
7: oatmeal::main
8: std::sys_common::backtrace::__rust_begin_short_backtrace
9: std::rt::lang_start::{{closure}}
10: std::rt::lang_start_internal
11: _main
NVIM_SYSTEM_RPLUGIN_MANIFEST=/nix/store/kxlyc7xjdaakpyvdiys7yvxvbmrgklg3-neovim-0.9.1/rplugin.vim
NVIM=/var/folders/tq/1w9ztkw909j0xq9tsgpjgh7h0000gn/T/nvim.alexcard/2EPY2d/nvim.3431.0
NVIM_LOG_FILE=/Users/alexcard/.local/state/nvim/log
ls -al /var/folders/tq/1w9ztkw909j0xq9tsgpjgh7h0000gn/T/nvim.alexcard/2EPY2d/nvim.3431.0
srwxr-xr-x 1 alexcard staff 0 11 Nov 14:18 /var/folders/tq/1w9ztkw909j0xq9tsgpjgh7h0000gn/T/nvim.alexcard/2EPY2d/nvim.3431.0
My neovim install is through nix with home-manager, which sometimes does cause permission issues, I was thinking maybe the NVIM socket permissions?
@dustinblackman looks like it was a 0.9.1 neovim issue, noticed I was slightly behind and updated, now it's working fine
I tried different versions of neovim and getting following error
$ oatmeal --editor neovim --backend ollama --model codellama:latest
Oh no! Oatmeal has failed with the following app version and error.
Version: 0.2.4
Commit: VERGEN_IDEMPOTENT_OUTPUT
Error: No such file or directory (os error 2)
To report a bug, please rerun your command with the following to print stack traces:
RUST_BACKTRACE=1 oatmeal --editor neovim --backend ollama --model codellama:latest
It runs fine without editor option.
@codemeleon That one feels odd. Would you mind running the recommended backtrace command please? I'll take a look!
@dustinblackman
$ RUST_BACKTRACE=1 oatmeal --editor neovim --backend ollama --model codellama:latest
Oh no! Oatmeal has failed with the following app version and error.
Version: 0.2.4
Commit: VERGEN_IDEMPOTENT_OUTPUT
Error: environment variable not found
0: oatmeal::infrastructure::editors::neovim::run_lua_command::{{closure}}
1: <oatmeal::infrastructure::editors::neovim::Neovim as oatmeal::domain::models::editor::Editor>::get_context::{{closure}}
2: oatmeal::application::ui::start::{{closure}}
3: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
4: oatmeal::main::{{closure}}
5: oatmeal::main
6: std::sys_common::backtrace::__rust_begin_short_backtrace
7: std::rt::lang_start::{{closure}}
8: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:284:13
std::panicking::try::do_call
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
std::panicking::try
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
std::panic::catch_unwind
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
std::rt::lang_start_internal::{{closure}}
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/rt.rs:148:48
std::panicking::try::do_call
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40
std::panicking::try
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19
std::panic::catch_unwind
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14
std::rt::lang_start_internal
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/rt.rs:148:20
9: main
10: <unknown>
11: __libc_start_main
12: <unknown>
Ah you're not running within a neovim terminal, correct? I should add better error handling there.
At first, I tried inside neovim using given command :Oatmeal
and got the errors I posted initially
I’ve pushed a few patches since the last comments that I believe solve the issues here. I’ll close for now, and reopen if you’re still experiencing issues. Thanks all for reporting!
Apologies. The problem still persists.
The latest version of oatmeal has logging to help debug. Could you run while setting environment variable RUST_LOG=oatmeal please? That should help find the issue :) You can find the log file by running 'oatmeal debug log-path'
The main repo also has docs to use debug builds to help drill down further. https://github.com/dustinblackman/oatmeal#report-an-issue
Note I've set the minimum version of Neovim to 0.9.2 since you've reported the issue. What version are you running?
I'm going to keep this issue closed. Please feel free to open a new one so we can start fresh!
Configuration:
Steps to reproduce:
:Oatmeal
Neovim Terminal output (with
RUST_BACKTRACE=full
):System: Darwin arm64 Using the standalone binary
oatmeal --backed ollama --model codellama:latest
works perfectly fineI've been digging through the code, but not a Rustacean. Themes loading uses BufReader which would throw this but I'm not setting any theme. Does serde throw this as well?