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

Support binaries with Homebrew #80

Open
darkn3rd opened this issue Sep 6, 2021 · 6 comments
Open

Support binaries with Homebrew #80

darkn3rd opened this issue Sep 6, 2021 · 6 comments

Comments

@darkn3rd
Copy link

darkn3rd commented Sep 6, 2021

I did a brew install k2tf, and I had to download go and compile the binary. This takes a VERY long time. I expected to just install the compiled binary. It's been 15 minutes, and it is still not completed.

$ brew install k2tf
==> Downloading https://ghcr.io/v2/homebrew/core/go/manifests/1.17
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/go/blobs/sha256:89479b19d41e72c3cd615f92a2c1f408662b7a07a30253feac846bed7e553d3c
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:89479b19d41e72c3cd615f92a2c1f408662b7a07a30253feac846bed7e553d3c?se=2021-09
######################################################################## 100.0%
==> Downloading https://github.com/sl1pm4t/k2tf/archive/v0.5.0.tar.gz
==> Downloading from https://codeload.github.com/sl1pm4t/k2tf/tar.gz/v0.5.0
##O#- #
==> Installing k2tf from sl1pm4t/k2tf
==> Installing dependencies for sl1pm4t/k2tf/k2tf: go
==> Installing sl1pm4t/k2tf/k2tf dependency: go
==> Pouring go--1.17.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/go/1.17: 10,809 files, 565.6MB
==> Installing sl1pm4t/k2tf/k2tf
==> go build
@kahara
Copy link

kahara commented Sep 6, 2021

Did this finish, and did you get to the bottom of what was causing the slowness?

Is the process also very slow if you "manually" compile from source?

Tested and on Linux things proceeded snappily enough, however Go version below is 1.15.6:

$ time make build
go build -v
go: downloading github.com/rs/zerolog v1.19.0
go: downloading github.com/sirupsen/logrus v1.4.2
go: downloading github.com/hashicorp/terraform-plugin-sdk v1.7.0
...
github.com/hashicorp/terraform-provider-kubernetes/kubernetes
github.com/sl1pm4t/k2tf/pkg/tfkschema
github.com/sl1pm4t/k2tf

real	0m19,306s
user	1m33,964s
sys	0m8,798s

@sollie
Copy link

sollie commented Sep 7, 2021

Just installed on my laptop.

go version go1.17 darwin/amd64

🍺 /usr/local/Cellar/k2tf/0.5.0: 5 files, 48MB, built in 1 minute 4 seconds

@kahara
Copy link

kahara commented Sep 7, 2021

@darkn3rd is this an M1 machine?

@chenrui333
Copy link
Contributor

🍺 /usr/local/Cellar/k2tf/0.5.0: 5 files, 48MB, built in 57 seconds

Mine is also pretty fast, I am using MBP Pro 2017. (I think it might be because I have already loaded the dependencies in my go_cache)

@darkn3rd
Copy link
Author

darkn3rd commented Oct 4, 2021

I have a MacBook Air (Retina, 13-inch, 2018), and compiling is slow, especially if the explicit go lang dependency is not met, but seriously as much as would like to endorse the "works on my laptop", it is sort of missing point.

If there is binary releases available in git releases, why not use Homebrew package manager to install, I don't know, a "package", Currently, Homebrew in this scope is used for build tool automation. Go already has this built in with go get.

This is the first project (in the category of using homebrew and go lang with git binary releases available) that I have come across that requires downloading go build environment to compile the binary through a package manager.

@chenrui333
Copy link
Contributor

@darkn3rd I have just merged the k2tf homebrew-core PR , do you want to give another try?

$ brew untap sl1pm4t/k2tf
$ brew update
$ brew reinstall k2tf
==> Downloading https://ghcr.io/v2/homebrew/core/k2tf/manifests/0.5.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/k2tf/blobs/sha256:50ada2c6baf47bc0bf56d7c63075cdc0af7c45efea79589c0bce09d548446247
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:50ada2c6baf47bc0bf56d7c63075cdc0af7c45efea79589c0bce09d548446247?se=2021-10-04T2
######################################################################## 100.0%
==> Reinstalling k2tf
==> Pouring k2tf--0.5.0.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/k2tf/0.5.0: 50 files, 38.6MB

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

4 participants