brew to install docker as I am using the vendor's edge channel, which e.g. includes a local Kubernetes feature.gitlab-runner, docker is marked as a recommended dependency, so I installed gitlab-runner with brew install --ignore-dependencies gitlab-runner.brew upgrade, as a workaround I do the following:#!/bin/sh -e
brew uninstall gitlab-runner || true
brew upgrade
brew install --ignore-dependencies gitlab-runner
brew cleanup
brew doctor or brew missing I still get warnings.brew to ignore recommended but not strictly needed dependencies.gitlab-runner even in shell runner mode where I would not need docker at all.So my proposal would be that brew somehow offers something like --ignore-recommended and stores this information somehow. I then expect:
brew upgrade does not override my decision.brew doctor and brew missing do not complain about my decision.For gitlab-runner alone, I could submit a PR to remove docker as dependency, however I could imagine that this is not the only formulae with a problem like this. 240 formulas in homebrew-core have recommended dependencies.
brew install --ignore-dependencies gitlab-runner
This is not a supported workflow. We do not wish you to simply omit dependencies. In this case you can brew install --without-docker but it's likely this option will go away in future (https://github.com/Homebrew/homebrew-core/issues/31510). My suggestion would be to simply ignore the docker that Homebrew installs and continue to use the vendor provided one.
This is unfortunate as at least the vendor package for docker installs symlinks into /usr/local/bin as well.
@MikeMcQuaid, I do not want to ignore-dependencies but as I said ignore-recommends as outlined in my proposal. Why is there a distinction between hard and recommended dependencies otherwise?
@mfriedenhagen Please reread the command I recommended in my reply.
Hello @MikeMcQuaid,
brew install --without-docker gitlab-runner firstly as suggested by you.gitlab-runner was not downloaded as bottled but built freshly from the sources.docker is not a compile dependency, even the executable is not invoked but gitlab-runner may be configured to communicate via REST with a running docker-daemon. (Following this logic, nginx could be a recommended dependency of lynx 馃榿 )brews source I am still confused:depend_on only be given for stuff needed during build time and those which are recommended or optional change the produced binary?[:optional, :build] and :optional?Maybe non build relevant dependencies should be dropped at all?
please accept my apologies should I have sounded rude.
No need to apologise but thanks anyway 鉂わ笍
but built freshly from the sources.
I'm afraid this is currently unavoidable.
Should depend_on only be given for stuff needed during build time and those which are recommended or optional change the produced binary?
No, it'll need to stay as it is now, sorry.
Maybe non build relevant dependencies should be dropped at all?
There's certainly an argument for it being removed in this case and added e.g. to caveats instead. @Homebrew/core thoughts?
If gitlab-runner does not require docker for either brew install gitlab-runner or brew test gitlab-runner to succeed, then I'm in favour of dropping that dependency.
After having perused the requirements and install documentation for gitlab-runner, I see no reason to have depends_on "docker" => :recommended. This is enabling an optional feature, and the installation procedure does not change whether or not docker is installed, AFAICT. If we're taking away optional deps in the future, then I think a caveat would be fine here.
FWIW, the recommended macOS gitlab-runner installation technique is to just grab the latest go binary via curl. I strongly suspect, but have not personally tested, that a gitlab-runner installation will be able to use docker whether or not it was present on the system during the build.
My vote is to drop this from a recommended dep and possibly add a caveat.
I can look into testing my hypothesis RE being able to use docker in a bit. A caveat may not even be warranted here.
IIRC several formulae have a docker dep that isn't needed at build time, opened https://github.com/Homebrew/homebrew-core/pull/31582
Most helpful comment
IIRC several formulae have a docker dep that isn't needed at build time, opened https://github.com/Homebrew/homebrew-core/pull/31582