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

Add latest commit alias #195

Merged
merged 4 commits into from
Apr 16, 2024
Merged

Add latest commit alias #195

merged 4 commits into from
Apr 16, 2024

Conversation

MordechaiHadad
Copy link
Owner

@MordechaiHadad MordechaiHadad commented Apr 11, 2024

This PR will add head and git as alias for fetching the latest commit for neovim.

fixes #163

@mikesmithgh
Copy link

mikesmithgh commented Apr 15, 2024

Hi @MordechaiHadad, I saw this on reddit and tested it out.

Using head, HEAD, or git all install the latest version of nvim with the commit 57adf8c.

When I attempt to use nvim in the nvim-bin directory, I receive an error.

~/.local/share/bob/nvim-bin 
mike@local $ ./nvim --version
thread 'main' panicked at 'Failed to spawn child process: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /Users/mike/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bob-nvim-2.5.0/src/main.rs:84:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It works fine if I use nvim in the nvim-macos-arm64/bin directory.

 ~/.local/share/bob/57adf8c/nvim-macos-arm64/bin 
mike@local $ ./nvim --version
NVIM v0.10.0-dev-57adf8c
Build type: RelWithDebInfo
LuaJIT 2.1.1710088188
Run "nvim -V1 -v" for more info

One thing to note is that I build nvim nightly myself and I also have multiple versions of nvim installed with bob. Before running the cargo install --git https://github.com/MordechaiHadad/bob --branch feat/git-alias command, I ran cargo uninstall bob-nvim. I was pointing to nvim v0.7.0 before testing this.

bob list
┌───────────┬─────────────┐
│  Version  │  Status     │
├───────────┼─────────────┤
│  v0.7.0   │  Installed  │
│  v0.9.1   │  Installed  │
│  v0.9.0   │  Installed  │
│  nightly  │  Installed  │
│  v0.8.3   │  Installed  │
│  v0.9.5   │  Installed  │
│  v0.9.2   │  Installed  │
│  v0.9.4   │  Installed  │
│  v0.8.0   │  Installed  │
│  57adf8c  │  Used       │
└───────────┴─────────────┘ 
  • OS: MacOS 14.4.1 (23E224)

Hope this helps. Let me know if you need any other info!

@MordechaiHadad
Copy link
Owner Author

MordechaiHadad commented Apr 15, 2024

Hi! Thank you for commenting. Could you show me the content of the 57adf8c folder?

Oh nvm you mentioned the content is nvim-arm-64, which is interesting it works for some but not for you.

I am planning on pushing another PR with approximate binary locator instead of hard coded (slightly slower but faster than a ms)

Could you copy your bob binary and copy it to bob/nvim-bin and rename it to nvim

Just for testing really.

@mikesmithgh
Copy link

mikesmithgh commented Apr 15, 2024

I copied it over to bob/nvim-bin and it worked fine. 👍

After that, I switched back to v.0.7.0 and rm -rf 57adf8c the latest directory.

After running, bob use git, I get the same error. So, I can reproduce on my side if you need me to test anything out.

@MordechaiHadad
Copy link
Owner Author

I copied it over to bob/nvim-bin and it worked fine. 👍

After that, I switched back to v.0.7.0 and rm -rf 57adf8c the latest directory.

After running, bob use git, I get the same error. So, I can reproduce on my side if you need me to test anything out.

Hmmm confusing...

At first it worked after u recreated the nvim proxy, and then when you rebuild 57adf8c it failed basically?

@mikesmithgh
Copy link

I copied it over to bob/nvim-bin and it worked fine. 👍
After that, I switched back to v.0.7.0 and rm -rf 57adf8c the latest directory.
After running, bob use git, I get the same error. So, I can reproduce on my side if you need me to test anything out.

Hmmm confusing...

At first it worked after u recreated the nvim proxy, and then when you rebuild 57adf8c it failed basically?

Sorry, I forgot to mention that I copied back the original nvim binary. I named it nvim.bak and copied it back to reproduce the issue. I retested without copying back the original and it worked. I added a video to hopefully help clarify. I just trimmed some of the time spent install latest.

bob-issue.mp4

@MordechaiHadad
Copy link
Owner Author

Ah so u returned back to the original binary, makes sense.
So it does work for you since the old binary code doesn't support arm.

@MordechaiHadad
Copy link
Owner Author

Newest PR gonna fix all of the nvim proxy related issues now.

@MordechaiHadad
Copy link
Owner Author

@mikesmithgh can you do one last test (dont copy the old outdated neovim proxy) and see if works?

@mikesmithgh
Copy link

@mikesmithgh can you do one last test (dont copy the old outdated neovim proxy) and see if works?

Hey @MordechaiHadad, I completely removed bob and removed nvim in nvim-bin, reinstalled with cargo install bob-nvim and changed the version with bob use v0.7.0 to get back in the initial state to reproduce the issue.

Then ran:

cargo install --git https://github.com/MordechaiHadad/bob --branch feat/git-alias
bob use git
./nvim --version
NVIM v0.10.0-dev-2fc2343
Build type: RelWithDebInfo
LuaJIT 2.1.1710088188
Run "nvim -V1 -v" for more info

It looks like it is working now 👍.

I'm curious how it picked up changes since this branch doesn't appear to have any additional changes?

@MordechaiHadad
Copy link
Owner Author

I'm curious how it picked up changes since this branch doesn't appear to have any additional changes?

The proxy was outdated so it recreated it for you now, which is why it works now.

I guess its time to merge this.

@MordechaiHadad MordechaiHadad merged commit 5466e81 into master Apr 16, 2024
38 of 39 checks passed
@mikesmithgh
Copy link

🎉 awesome!

@MordechaiHadad MordechaiHadad deleted the feat/git-alias branch April 16, 2024 12:45
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

Successfully merging this pull request may close these issues.

[Feature request] A new git version string that builds from the literal latest commit
2 participants