-
Notifications
You must be signed in to change notification settings - Fork 124
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
Should we drop our runtime dependency on git? #99
Comments
I'd prefer to drop the runtime dependency on git. While I think that depending on git is reasonable for dotfile managers built with the Bourne Shell or bash (rcm, dotum, ellipsis, etc), I think that we should remove any runtime dependencies that we can. Are we shelling out for anything else, or is git the only offender? Regardless, I strongly support #97 being merged – I think that there are tons of use-cases that have nothing to do with git. Thanks for starting this issue @nicolasmccurdy! |
I completely agree with @nicolasmccurdy and @christianbundy and would like to see us drop the runtime dependency on git. I think the main Homesick class is beginning to get a little bloated and I would really like to see us take a hard look at how we can make sure the code adheres to single responsibility principles (as well as other SOLID principles). I think anything that can remove dependencies can be helpful with that process. What would be the best way to proceed with this? Is it worth starting a poll for any contributors to vote on this issue? |
@christianbundy We're still shelling out to non-git commands in
@JCook21 Agreed. I'm more interested in removing unnecessary git wrapping code (to make things simpler and more maintainable) than removing the need for git to be installed. That being said, I still think it would be neat if homesick could be used without git.
@JCook21 I started this issue with the main intention of seeing how many people would agree/disagree to this. Unfortunately GitHub isn't the best place for votes, so we could always start a poll elsewhere. That being said, if we're going to tell people about the poll here anyway it would probably be easiest to just keep this issue and not use any external polls. |
I don't think we can fully drop it until all the commands we use. That said, we probably can lessen our dependency. I've been casually following these related threads, and my current thinking is like:
I would start with just shelling out to git. But then, could write a different implementation using rugged or grit or whatever. And then have a composite that tries a the rugged adapter, and falls back to the system, and raises an error if nothing else. I think this gives us some flexibility to try out other git implementations. It also is a boon for testing, as it gives a place for the main tests to stub out (and not have to rely on command output). |
@technicalpickles I think that sounds like a good approach and is something very much like what I was thinking of too. |
@technicalpickles I would rather simplify homesick's commands by requiring git commands like pull, push, commit, etc. to be used with I also realized something that could be an issue with using an adapter for git and rugged. According to what you said, it seems like you want the adapter to prioritize rugged over shell calls to git. However, this could lead to a situation where the rugged version of a command does not have any command line output, or very simple output, as supposed to the git counterpart. |
By the way, please check out my recent research on what commands would have to change if we removed our git dependency with rugged. In my opinion, all of these commands except Another alternative that I'm starting to like more is to make simple stubs so that |
Agree. I was pretty hesistant to add those in the first place, as their presence would beget other additions. Now that we have them though, we'll need to make sure to tread carefully to avoid breaking people's workflows. Maybe we deprecate those now, and then drop them next major release? |
Sure, sounds good! I started working on replacing some of the git commands with I'm thinking that for now, we could use the aliases for |
Libraries like Rugged open the possibility of using git features implemented in Ruby instead of shelling out to git. But should homesick still depend on having git installed at runtime? The alternative would be to keep depending on git and to show warning/error messages when a command fails because git could not be found.
Related issues
homesick exec git push
instead ofhomesick push
)CC @technicalpickles @christianbundy @JCook21
The text was updated successfully, but these errors were encountered: