-
Notifications
You must be signed in to change notification settings - Fork 60
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
Flexible exec #42
Flexible exec #42
Conversation
@tony I have some questions.
|
One more thing. Yesterday I merged in some new methods. Those would need to be converted as well. But, first the questions. |
|
Spelling / corrections above - a tad sleep deprived atm. |
@tony thanks for sharing your thoughts. I understand correcting things due to writing while needing sleep. Have you seen the talk by Rob Pike on Simplicity is Complicated. It's about Go and shares a philosophy that's baked into Go. Making things simple and hiding the complexity is hard but it's a goal to strive for. This same philosophy is in the vcs package provided by the Go team. This change greatly complicates things for end users. It starts to showcase the complexity rather than making it simple to work across VCS. I'm fully aware that hiding the differences in VCS makes accessing their unique features difficult or impossible. There are times custom code is needed to make that happen for unique situations. That said, I'm open to solving problems and making things better. From your comments I see a bit about how you want to build your application but I'm not entirely sure why you want to do it that way? Why are you trying to go as close to unbuffered as possible? How are you using the difference between Stderr and Stdout? In the code snippet you shared you are combining them. What I'm trying to do is look for an alternative that hides complexity while meeting needs. For example, there is a logging mechanism. Currently it captures the output once complete. I wonder about piping the output to the log as an option. Or something similar. |
I keep coming back to this one and have decided not to enable flexible exec. If someone wants to fork this package to do so or create their own I'm comfortable with that. Sorry it's taken me to long to decide on this one. |
Fixes #39
base.Get
,base.Init
,base.Update
intoGetCmd
,InitCmd
,UpdateCmd
to return standard library's*exec.Cmd
. This gives downstream users the flexibility to access repo commands as they choose.base.Get
,base.Init
andbase.Update
are method is preserved.base.runCmd
andbase.RunCmdFromDir
accept standard library*exec.Cmd
as arguments.base.run
andbase.RunFromDir
behave the same to preserve compatibility downstream.EnsureParentDir()
. This reduces the complexity inside ofInit
andGet
methods.