-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Add wsk (OpenWhisk CLI binary) #30034
Conversation
This seems to be a CLI-only open-source tool. Please submit it first to Homebrew/core and only if they don’t accept it, submit here (linking back to the pull request where it was refused). This policy is documented in faq/rejected_casks:
|
@miccal all right, thanks for the explanation, will do |
@miccal I've tried but it proved way too complex for what I was willing to invest in this. Plus, I don't see that much of a value to force the (Mac) user to install that big stack (Java, Docker, Gradle) in order to run a Go binary (downloading which is by the way the official and suggested way to install the software), so I ask you again to please consider this as a valid Cask formula. Homebrew-core pull request here: Homebrew/homebrew-core#9879 Thank you! |
Ping @vitorgalvao. |
@shaftoe It's not really open source software if it's too hard for anyone to build it. You won't find any Linux package manager that's just willing to redistribute an upstream binary as-is, either. |
@MikeMcQuaid personally I don't think "easy to build" is a strict requirement to make a software "Open Source", but honestly I'm not really interested in neither building the tool from sources nor convincing package managers to ship that, I just want to have an easy way to drop the binary in my workstation's $PATH and given that I already use Homebrew Cask (between other tools) for this kind of task, I thought a new Cask formula could be a good fit instead of building my own solution, which also could benefits other OpenWhisk users too. I'm also already installing closed source software via Cask so I wasn't expecting this to be a problem. What is your suggestion? |
You'll probably be unsurprised but disappointed to hear: get it building from source into Homebrew or creating your own tap instead. Thanks! |
@MikeMcQuaid creating my own tap seems actually quite an easy and good-enough solution to me! Thank you for your help! |
For the records: https://github.com/shaftoe/homebrew-wsk |
Considering the difficulties of building this from source and the dependencies it has (java), I’d be fine with adding this here. It does need some |
It's not dependend on Java, Gradle or Docker I think. It should be compilable using plain Go just fine. |
@vitorgalvao thanks! I'll remove |
@shaftoe the source for it is plain Go though. OpenWhisk itself uses Scala and ships in Docker containers (thus the Java and Docker dependency). It should be manageable to build the CLI source using just Go though. In theory: Replicating the steps done here should work: https://github.com/openwhisk/openwhisk/blob/master/tools/cli/Dockerfile |
@markusthoemmes yes you're right, but I was just following the official docs on how to compile the source code for the CLI |
@vitorgalvao Up to you but I think you may well be opening a can of worms. It's always going to be harder to make a formula than a cask and I think it's a reasonable requirement that open source projects be buildable without too much effort As a project management aside: this is somewhat an ideological thing that I think results in a better open source software ecosystem. Homebrew has done similarly with things that don't build without patching, don't build with clang, don't build without X11 etc. and this does seem to have had the effect of nudging upstreams in the right direction if they wish to support macOS. In this case, providing better and easier build instructions feels like a good, doable outcome of this gentle pressure. |
@MikeMcQuaid Agreed. We do tend to prefer that attitude as well (avoid workarounds, try to fix upstream first), so I see your point. |
After making all changes to the cask:
brew cask audit --download {{cask_file}}
is error-free.brew cask style --fix {{cask_file}}
reports no offenses.:latest
Additionally, if adding a new cask:
brew cask install {{cask_file}}
worked successfully.brew cask uninstall {{cask_file}}
worked successfully. Caveat: asks for (sudo) password even though it should not be needed