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

Building from source takes longer than it should #155

Closed
lostl1ght opened this issue Sep 15, 2023 · 2 comments · Fixed by #156
Closed

Building from source takes longer than it should #155

lostl1ght opened this issue Sep 15, 2023 · 2 comments · Fixed by #156
Labels
enhancement New feature or request

Comments

@lostl1ght
Copy link
Contributor

Hello!

IMO bob should not clone the entire neovim repo when building from source because it is 230 MiB in size.
Instead it should only clone a commit that is requested by a user.

This can be achieved with the following script:

if [[ -d neovim-git ]]; then
    cd neovim-git
else
    mkdir neovim-git
    cd neovim-git
    [[ -d .git ]] || git init
fi
if git remote get-url origin >/dev/null 2>/dev/null; then
    git remote set-url origin https://github.com/neovim/neovim.git
else
    git remote add origin https://github.com/neovim/neovim.git
fi
git fetch --depth 1 origin "$HASH"
git checkout FETCH_HEAD

As far as I understand this should match the current behaviour when a user tries to build multiple versions from source and bob does that in the same neovim-git folder.

Cloning neovim this way downloads only 12 MiB of files.

Are you interested in such fuctionality? If so I can try to implement that.

@MordechaiHadad
Copy link
Owner

I was looking with another user for cloning by hash instead of the entire repo recently and only found being able to get the source code of a specific commit via github's API, but this seems a lot better.

If you are willing to make a PR be my guest, but make sure it's cross platform so the only sub process you will run is git.

This is a very good solution btw

@MordechaiHadad MordechaiHadad added the enhancement New feature or request label Sep 15, 2023
@MordechaiHadad
Copy link
Owner

@tamton-aquib seems like someone is willing to make your wish come true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants