bob icon indicating copy to clipboard operation
bob copied to clipboard

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

Open Ciel-MC opened this issue 2 years ago • 12 comments

This might be a little weird, but I saw that inlay_hint got changed into inlay_hint.enable, so I wanted to update my config to fit it, but I found that the latest nightly does not have that commit included yet, and I don't see there being any way to get the latest git(latest seems to be the same as stable), so I had to grab the latest commit at the time myself and install that, so I thought it'd be nice to have a version tag git which will simply grab the newest commit and build with that.

Ciel-MC avatar Nov 13 '23 04:11 Ciel-MC

Don't think I am following what you are trying to do, bob deals with 2 types of neovim files, binaries (nightly, stable and older versions) and source code so you can choose a specific commit paste it with bob install <commit hash> and it will build it for you.

MordechaiHadad avatar Nov 13 '23 14:11 MordechaiHadad

Yeah, and I was hoping there can be a "version name"(like stable or nightly) for the latest commit, like even faster than nightly, because now if I manually set the latest commit to my version, it doesn't update with bob update because it is pinned.

Ciel-MC avatar Nov 13 '23 14:11 Ciel-MC

So you want an alias for the last commit when running bob install?

MordechaiHadad avatar Nov 13 '23 14:11 MordechaiHadad

So you want an alias for the last commit when running bob install?

I guess you can say an alias? But also when you do bob update, it installs the latest commit(like latest and nightly)

Ciel-MC avatar Nov 14 '23 07:11 Ciel-MC

What would you call this alias?

MordechaiHadad avatar Nov 14 '23 10:11 MordechaiHadad

I figured git would be a good name, similar to how AUR repos call it

Ciel-MC avatar Nov 14 '23 10:11 Ciel-MC

Imo there is no need for this feature. Just wait for maximum 24 hours and then do bob install nightly. If you really want a feature just use the commit hash to install that specific commit. KISS

max397574 avatar Nov 14 '23 10:11 max397574

I had this debate with myself as well, but the thing for me is that it's often not just this one time I want to do it(so I install the latest manually, uninstall tomorrow and update nightly), I would prefer if I could stay on the latest commit easily as you can with stable and nightly, at least personally, found it to be barely make past the -100 pts, plus it's not a particularly difficult feature either, and maybe it will come in helpful in the future.

Sorry, long sentences from me are very coherent, my point is, I think this is not complicated enough and is quite helpful when you need/want it, even if it's not often.

P.S. KISS is usually for designing systems, features typically use the -100pt rule

Ciel-MC avatar Nov 14 '23 11:11 Ciel-MC

even if "the official" KISS rule doesn't apply here I'm always against adding features that bring no big advantage to the user but cause more complicated code (here new logic needs to be added to get the latest commit) and also would make the whole application more complicated (e.g. bigger help etc).

and if you waited for weeks for a pr to be merged you can easily wait a few more hours imo.

max397574 avatar Nov 14 '23 12:11 max397574

🤔

MordechaiHadad avatar Nov 15 '23 10:11 MordechaiHadad

I will work on this, but it won't be a priority because it is slightly more complicated than expected

MordechaiHadad avatar Nov 15 '23 14:11 MordechaiHadad

Something like this works if you have a get-github-token command or equivalent.

AUTH="Authorization: token $(get-github-token)"
SHA="$(curl -s -H "$AUTH" -H "Accept: application/vnd.github.VERSION.sha" https://api.github.com/repos/neovim/neovim/commits/master)"
bob install "$SHA"

Using a script like this could be a middle ground if nightly's are to slow and bob doesn't have a latest commit alias

NonlinearFruit avatar Jan 19 '24 04:01 NonlinearFruit

@Ciel-MC Pretty late (I worked on this when you opened the issue but the solution originally was too complex) but the request is fulfilled.

MordechaiHadad avatar Apr 11 '24 11:04 MordechaiHadad