MordechaiHadad / bob

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

Cannot install nightly #188

Closed skoch13 closed 5 months ago

skoch13 commented 5 months ago

First off thank you for this project! bob used to install and upgrade nightly tag without any issues, but today the command results in the following error:

bob install nightly
Mar 25 10:37:11.515 ERROR Error: Please provide an existing neovim version

I tried reinstalling bob, but no go.

MordechaiHadad commented 5 months ago

I tried on both windows and linux just now, also updated my bob version via cargo install to latest and I can't reproduce the issue.

jellydn commented 5 months ago

I've got the same issue on Mac OSX.

image

The workaround is using commit hash.

❯ bob install 02d00cf3eed6681c6dde40585551c8243d7c003f
skoch13 commented 5 months ago

@MordechaiHadad sorry for not mentioning it from the start, but I use MacOS, brew installation.

@jellydn providing commit hash results in bob building nvim, not installing the provided tarballs

MordechaiHadad commented 5 months ago

Hmm I see that neovim recently added arm macos distribution, not sure how it relates to this issue though. but I will add the arm support.

skoch13 commented 5 months ago

that might seem related, as I'm on arm mac

MordechaiHadad commented 5 months ago

So i pushed this PR not sure if it will actually fix it out of the box, but would be epic if you could help test this PR by downloading the arm artifact and trying it, I don't own a mac machine so I can't really test it myself.

gibfahn commented 5 months ago

~Doesn't seem to resolve the issue unfortunately (https://github.com/MordechaiHadad/bob/pull/189#issuecomment-2018032228)~

PR works for me once I fixed the typo

gibfahn commented 5 months ago

Confirmed that it only affects nightly nvim builds

❯ bob install nightly
bob Mar 25 13:41:21.843 ERROR Error: Please provide an existing neovim version

❯ bob install stable
Mar 25 13:41:23.604  INFO Fetching latest version
Mar 25 13:41:24.054  INFO v0.9.5 is already installed
MordechaiHadad commented 5 months ago

Confirmed that it only affects nightly nvim builds

❯ bob install nightly
bob Mar 25 13:41:21.843 ERROR Error: Please provide an existing neovim version

❯ bob install stable
Mar 25 13:41:23.604  INFO Fetching latest version
Mar 25 13:41:24.054  INFO v0.9.5 is already installed

The PR only fixes the binaries downloaded then?

skoch13 commented 5 months ago

It looks like that is the only thing that needed to be changed at this moment

MordechaiHadad commented 5 months ago

It looks like that is the only thing that needed to be changed at this moment

wait really? thats pretty weird.

skoch13 commented 5 months ago

Well, I suppose the errors returned by Bob on these occasions could be improved, but that's the only thing

MordechaiHadad commented 5 months ago

fixed with #189

MordechaiHadad commented 5 months ago

If this issue persists comment and I will reopen

skoch13 commented 5 months ago

I also opened PR for brew formula update https://github.com/Homebrew/homebrew-core/pull/167119

skoch13 commented 5 months ago

hm, tests fail on installing exact version https://github.com/Homebrew/homebrew-core/pull/167119/files#diff-327989d259cb52e9492be6246676781536f65b1e2361021edca25f7e07c6c3f1

MordechaiHadad commented 5 months ago

hm, tests fail on installing exact version Homebrew/homebrew-core#167119 (files)

I would help if I knew anything about homebrew formulaes

omar25h commented 5 months ago

Isn't this expected to fail? Previous releases assets still have the name nvim-macos while the new changes expect that the zip file name additionally contains the architecture. It is failing for me and I'm on macOS (x86_64)

skoch13 commented 5 months ago

As far as I understand here is the test that fails: https://github.com/Homebrew/homebrew-core/blob/e7f172d8b1ed3329ae267df91ba1c8f67202bab9/Formula/b/bob.rb#L37

skoch13 commented 5 months ago

I guess the issue might be that with the last update bob tries to download v0.9.0 for non-existent architecture

MordechaiHadad commented 5 months ago

Isn't this expected to fail? Previous releases assets still have the name nvim-macos while the new changes expect that the zip file name additionally contains the architecture. It is failing for me and I'm on macOS (x86_64)

ye true didnt take it into consideration

MordechaiHadad commented 5 months ago

I guess the issue might be that with the last update bob tries to download v0.9.0 for non-existent architecture

It is, these new macos files only exist for nightly now.

gibfahn commented 5 months ago

Looks like you missed the other one: https://github.com/MordechaiHadad/bob/blob/8b86468602221c97d5e594d9ebbfbc31310e1e69/src/helpers/mod.rs#L23

(https://github.com/MordechaiHadad/bob/pull/189#discussion_r1537660436 was included but not https://github.com/MordechaiHadad/bob/pull/189#discussion_r1537631086)

nicklimmm commented 5 months ago

It seems that the change is causing a panic. I am trying to install nightly after running erase.

thread 'main' panicked at <erased>/bob-nvim-2.8.2/src/main.rs:85:14:
Failed to spawn child process: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Additionally, it gave an error when trying to install stable.

❯ bob install stable
Mar 26 02:43:58.842  INFO Fetching latest version
Mar 26 02:44:00.220 ERROR Error: Please provide an existing neovim version
jellydn commented 5 months ago

FYI, I've got same issue with bob-nvim 2.8.2 on Max OSX.

❯ bob use stable
Mar 26 07:23:41.979  INFO Fetching latest version
Mar 26 07:23:43.886 ERROR Error: Please provide an existing neovim version
❯ bob use nightly
Downloaded version nightly to /Users/huynhdung/.local/share/bob/nightly.tar.gz
  [00:00:00] [██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████] 8.77MiB/8.77MiB (12.39MiB/s, 0s)
Finished expanding to /Users/huynhdung/.local/share/bob/nightly
  [00:00:00] [█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████] 1692/1692
Mar 26 07:23:49.813  INFO You can now use nightly!
❯ nvim
thread 'main' panicked at /Users/huynhdung/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bob-nvim-2.8.2/src/main.rs:85:14:
Failed to spawn child process: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
nicklimmm commented 5 months ago

Looks like you missed the other one:

https://github.com/MordechaiHadad/bob/blob/8b86468602221c97d5e594d9ebbfbc31310e1e69/src/helpers/mod.rs#L23

(#189 (comment) was included but not #189 (comment))

This change will only work on nightly releases since stable releases doesn't have separate assets for x86 and arm.

I suppose we have to pass a flag to the function to handle such cases.

omar25h commented 5 months ago

FYI, I've got same issue with bob-nvim 2.8.2 on Max OSX.

❯ bob use stable
Mar 26 07:23:41.979  INFO Fetching latest version
Mar 26 07:23:43.886 ERROR Error: Please provide an existing neovim version
❯ bob use nightly
Downloaded version nightly to /Users/huynhdung/.local/share/bob/nightly.tar.gz
  [00:00:00] [██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████] 8.77MiB/8.77MiB (12.39MiB/s, 0s)
Finished expanding to /Users/huynhdung/.local/share/bob/nightly
  [00:00:00] [█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████] 1692/1692
Mar 26 07:23:49.813  INFO You can now use nightly!
❯ nvim
thread 'main' panicked at /Users/huynhdung/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bob-nvim-2.8.2/src/main.rs:85:14:
Failed to spawn child process: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

a quick workaround would be to cp -r ~/.local/share/bob/nightly/nvim-macos-x86_84 ~/.local/shrare/bob/nvim-macos (or nvim-macos-arm64, depending on your current system).

MordechaiHadad commented 5 months ago

Latest PR should fix this I hope, test it and let me know wanna push this hotfix asap.

jellydn commented 5 months ago

All good now @MordechaiHadad Thanks :)