-
Notifications
You must be signed in to change notification settings - Fork 30
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
Support tools not using go get #140
Comments
Sorry for lag, fair questions! If it's special build flags or even tags - this is already supported: https://github.com/bwplotka/bingo#advanced-techniques - however we could make it more easy to use (some extra flag "--params" to bingo get). For git clone + custom script building this is more tricky. There is little guarantee that custom script does not require external dependencies or special architecture (rarely authors self-contain those deps). Not sure there is a solution to that, other than working with those CLI authors to make their CLI tools more accessible and self-contained Go code. Ideas welcome and if there are some popular patterns and use cases - I would be keen to learn (: |
Now it's me lagging behind. I see what you mean. In the example that I referenced, the makefile is going is grabbing the git tag and converting that to the appropriate format to pass thru ldflags so that the version number can be embedded in the resulting binary. It would be relatively straightforward to duplicate that logic elsewhere, but the keyword is duplicate. This would need to be kept in sync with the makefile. It's unlikely that this will change, but unlikely does not mean impossible. What I'm trying to say is that while I think individual cases have solutions, the general case doesn't. Think for example of a program that requires So while I fully agree with the intuition that something that requires make to build will also require other dependencies, I think that's a problem that should be solved outside of bingo: as long as you can specify a "build script" that bingo could use, and some requirements are met, that script ought to make sure that those dependencies are available. Does that make sense? |
Bingo's main power is to strongly maintain the tools dependencies in the isolation, in a go.mod. I think having something custom like script/makefile generally means you need more dependencies, and thus different mechanism to guarantee them. Some hybrid approach might work (best effort deps) for some cases, but it would make I would keep it simple here and say this is out of scope for bingo for now, but happy to be convinced otherwise, and you're welcome to experiment! (: |
This is mentioned in the README, but I don't see an example of how to deal with tools that do not build with
go get
.One concrete example is k3d (github.com/rancher/k3d).
In order to build it "correctly", you need to do something like:
This particular case is simple because it's just embedding a couple of version numbers using
-ldflags
.Other cases are more involved, e.g. they need to pass particular values to
-tags
, and some authors solve that usingmake
.Is this something bingo can deal with, or are additional changes requires?
I would not mind working on something to address this, but I would like to hear opinions.
The text was updated successfully, but these errors were encountered: