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

Re-running installer for helper binaries gives up #274

Open
begriffs opened this issue Oct 30, 2017 · 4 comments
Open

Re-running installer for helper binaries gives up #274

begriffs opened this issue Oct 30, 2017 · 4 comments

Comments

@begriffs
Copy link
Owner

The logic checks for a ~/.config/haskell-vim-now/hvn-helper-binaries/stack.yml, and if found considers the binaries to be built and skips further work. However if a previous installation was interrupted then this file will exist and the installer will never make the binaries.

https://github.com/begriffs/haskell-vim-now/blob/master/scripts/setup_haskell.hs#L130-L131

@jship
Copy link
Collaborator

jship commented Nov 9, 2017

Good point! What do you think of having some kind of "force helper binary install" flag or something?

By default, users wouldn't have to wait on them if they already have them installed, but if they specify the force flag, they will rebuild regardless of stack.yaml being there.

@begriffs
Copy link
Owner Author

Yeah, a force install flag would work. It could also check for the presence of the generated helper binaries rather than for the stack file.

@harendra-kumar
Copy link
Contributor

  1. A good strategy is to check whether the binaries exist at the install destination path (i.e. ~/.local/bin) and always reinstall those that do not exist and never install the ones that exist. If we overwrite existing binaries it might silently break the user's configuration. With this rule we do not need a separate flag to check whether to reinstall or not. But we can warn users about the binaries that were already found and were not reinstalled.

  2. We should always remove the hvn-helper-binaries directory. Firstly, it is not needed, secondly it consumes a lot of space as well that we must reclaim:

cueball:~$ du -sm hvn-helper-binaries/
262	hvn-helper-binaries/

@begriffs
Copy link
Owner Author

begriffs commented Feb 4, 2018

Maybe the presence of the hvn-helper-binaries directory would speed up binary rebuilds? Otherwise we'd have to rebuild all those deps... But maybe rebuilding binaries happens so rarely that it's worth it to clear out that directory after a successful install. I'd take a pull request if you're interested in doing an rmtree on it.

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

No branches or pull requests

3 participants