MordechaiHadad / bob

A version manager for neovim
MIT License
1.41k stars 36 forks source link

Can't start nvim nightly on macos m2 #192

Closed tsukinoko-kun closed 5 months ago

tsukinoko-kun commented 5 months ago

Can't start nvim nightly on macos m2.

I installed bob v2.8.3 using cargo install bob-nvim

nvim stable is working fine. nvim HEAD installed using homebrew is also working fine.

RUST_BACKTRACE=full nvim

thread 'main' panicked at src/main.rs:85:14:
Failed to spawn child process: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
   0:        0x10535bc94 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc44f794219052ac6
   1:        0x105389abc - core::fmt::write::h3be8b1c9593e07b4
   2:        0x105373bf4 - std::io::Write::write_fmt::h95a1e6c5537a96b5
   3:        0x10535baec - std::sys_common::backtrace::print::h7b809dd1f18ea674
   4:        0x105375a4c - std::panicking::default_hook::{{closure}}::he339b0dd23f9052e
   5:        0x1053757cc - std::panicking::default_hook::he9ee42fa25c512f5
   6:        0x105375e70 - std::panicking::rust_panic_with_hook::hd4ada112570991e5
   7:        0x10535c278 - std::panicking::begin_panic_handler::{{closure}}::h3f2b6a80c2b7e617
   8:        0x10535bec8 - std::sys_common::backtrace::__rust_end_short_backtrace::hc0b94e2951df3fae
   9:        0x105375c00 - _rust_begin_unwind
  10:        0x1053b11e0 - core::panicking::panic_fmt::h0ed3af01737be6a9
  11:        0x1053b172c - core::result::unwrap_failed::h4a38e44c38a5b637
  12:        0x104f47a94 - tokio::runtime::park::CachedParkThread::block_on::h6f4532dce0065cd6
  13:        0x104fcaa18 - tokio::runtime::context::runtime::enter_runtime::h17eee0e508544b0e
  14:        0x104fb783c - tokio::runtime::runtime::Runtime::block_on::he50c6a647f5a52e5
  15:        0x105018674 - bob::main::h96cb4ab4db3b024b
  16:        0x10500b408 - std::sys_common::backtrace::__rust_begin_short_backtrace::h4b065f220305fba3
  17:        0x104ffb7b0 - std::rt::lang_start::{{closure}}::hb6d9fcb837d3e0c1
  18:        0x105375aec - std::panicking::try::h3128bce4d588bc41
  19:        0x10535de7c - std::rt::lang_start_internal::h57a49fa80dd8b904
  20:        0x10501877c - _main
alexkatz commented 5 months ago

Same thing, also on an M2:

➜ RUST_BACKTRACE=full nvim
thread 'main' panicked at src/main.rs:84:14:
Failed to spawn child process: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
   0:        0x1047f9d84 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h6d4268b2ed62fb94
   1:        0x10481af9c - core::fmt::write::h5d55d44549819258
   2:        0x1047f6cd0 - std::io::Write::write_fmt::hc515897f91abd6cf
   3:        0x1047f9bc4 - std::sys_common::backtrace::print::h2c300c1ebedfc73c
   4:        0x1047fb224 - std::panicking::default_hook::{{closure}}::h0aa9be5c44269370
   5:        0x1047faf50 - std::panicking::default_hook::h2c0ef097934ee9e6
   6:        0x1047fb76c - std::panicking::rust_panic_with_hook::h84c8637cb6e56008
   7:        0x1047fb678 - std::panicking::begin_panic_handler::{{closure}}::h25482adda06c7b7f
   8:        0x1047fa210 - std::sys_common::backtrace::__rust_end_short_backtrace::h0c6f3beb22324a29
   9:        0x1047fb3dc - _rust_begin_unwind
  10:        0x104838ef8 - core::panicking::panic_fmt::h9072a0246ecafd14
  11:        0x104839220 - core::result::unwrap_failed::hd7600d03a3086be4
  12:        0x10441d5e8 - tokio::runtime::park::CachedParkThread::block_on::ha4967279cc564ded
  13:        0x10447b670 - tokio::runtime::context::runtime::enter_runtime::h90f4df58df0705db
  14:        0x10449f0a8 - tokio::runtime::runtime::Runtime::block_on::ha47ac746364039e8
  15:        0x1044c8eb0 - bob::main::h389e342a2d0ebaf1
  16:        0x1044ab580 - std::sys_common::backtrace::__rust_begin_short_backtrace::h5543f2eda552ef28
  17:        0x1044b3b84 - std::rt::lang_start::{{closure}}::h176fed03796b9a5b
  18:        0x1047efdfc - std::rt::lang_start_internal::hadaf077a6dd0140b
  19:        0x1044c8fb8 - _main
MordechaiHadad commented 5 months ago

I have pushed a new debug print statement to this PR, i don't really have a mac so i cant test it.

But in order to use this simply:

  1. download the m2 artifact from: https://github.com/MordechaiHadad/bob/pull/193
  2. rename it to nvim
  3. run it it should then print the debug statement.
tsukinoko-kun commented 5 months ago

I checked out your branch @MordechaiHadad and built from source. I deleted the wrapper at $XDG_DATA_HOME/bob/nvim-bin/nvim then let it get recreated from the newly built bob.

Now it works.

tsukinoko-kun commented 5 months ago
Apr 02 18:52:32.115  INFO Spawning child process: "/Users/frank/.local/share/bob/nightly/nvim-macos-arm64/bin/nvim"
MordechaiHadad commented 5 months ago

I checked out your branch @MordechaiHadad and built from source. I deleted the wrapper at $XDG_DATA_HOME/bob/nvim-bin/nvim then let it get recreated from the newly built bob.

Now it works.

Wait what, how?

MordechaiHadad commented 5 months ago

ahhh yes

MordechaiHadad commented 5 months ago

How would you suggest that I notify mac users to recreate their nvim proxy?

tsukinoko-kun commented 5 months ago

How would you suggest that I notify mac users to recreate their nvim proxy?

Is there a way to check that programmatically?

Otherwise I have no idea on how to do that. I would hope that this issue contains enough information that mac users can find it.

I can't think of a good way to notify all mac users with that problem. Sorry.

tsukinoko-kun commented 5 months ago

You could catch the error I encountered and then log the deletion of the wrapper as a fix for that problem.

MordechaiHadad commented 5 months ago

Ill add a notice to the readme for now, until i can come back with a way to notify inside bob itself

tsukinoko-kun commented 5 months ago

https://github.com/MordechaiHadad/bob/tree/ec0cb54a3485029d5c48728734b6abe01e682c53?tab=readme-ov-file#-notices