Bazel on Homebrew

430 views
Skip to first unread message

Jakob Buchgraber

unread,
Aug 22, 2018, 8:12:02 AM8/22/18
to bazel-discuss
Hi all,

I am happy to announce that the we the Bazel team have just launched our very own homebrew TAP
at https://github.com/bazelbuild/homebrew-tap. You can now install the latest Bazel via the Homebrew
package manager (https://brew.sh/) by running the following commands on your Mac with Homebrew
installed.

$ brew tap bazelbuild/tap
$ brew tap-pin bazelbuild/tap
$ brew install bazel

For further information please see this thread https://groups.google.com/forum/#!topic/bazel-discuss/zQf6p2_KBfQ

Best,
Jakob

Jakob Buchgraber

Software Engineer


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

    

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.


jga...@gmail.com

unread,
Aug 22, 2018, 9:42:17 AM8/22/18
to bazel-discuss
On Wednesday, August 22, 2018 at 8:12:02 AM UTC-4, Jakob Buchgraber wrote:
> Hi all,
>
>
> I am happy to announce that the we the Bazel team have just launched our very own homebrew TAP
> at https://github.com/bazelbuild/homebrew-tap. You can now install the latest Bazel via the Homebrew
>
> package manager (https://brew.sh/) by running the following commands on your Mac with Homebrew
> installed.
>
> $ brew tap bazelbuild/tap
> $ brew tap-pin bazelbuild/tap
> $ brew install bazel
>
>
> For further information please see this thread https://groups.google.com/forum/#!topic/bazel-discuss/zQf6p2_KBfQ
>
>
> Best,
> Jakob
>
>
>
>
>
>
>
>
> Jakob Buchgraber
> Software Engineer
>
>
> Google Germany GmbH
> Erika-Mann-Straße 33
> 80636 München
>
> Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
>
> Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.
>     
> This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.

I tried to upgrade from 0.15.2 via homebrew-core to 0.16.1 from the tap, I don't think 'upgrade' works to 0.16.1 if you already have the core formula installed.

jgavris in ~/code/software/host on develop
λ brew install bazel
Warning: bazel is provided by core, but is now shadowed by bazelbuild/tap/bazel.
To refer to the core formula, use Homebrew/core/bazel instead.
==> Installing bazel from bazelbuild/tap
Error: bazel 0.15.2 is already installed
To upgrade to 0.16.1, run `brew upgrade bazel`
jgavris in ~/code/software/host on develop
λ brew upgrade bazel
Updating Homebrew...
Error: bazel 0.15.2 already installed

I believe you'll have to `brew uninstall bazel` to be able to upgrade.

λ brew uninstall bazel
Uninstalling /usr/local/Cellar/bazel/0.15.2... (12 files, 109MB)
jgavris in ~/code/software/host on develop
λ brew install bazel
Warning: bazel is provided by core, but is now shadowed by bazelbuild/tap/bazel.
To refer to the core formula, use Homebrew/core/bazel instead.
==> Installing bazel from bazelbuild/tap
==> Downloading https://releases.bazel.build/0.16.1/release/bazel-0.16.1-installer-darwin-x86_64.sh
######################################################################## 100.0%
==> chmod 0555 ./bazel-0.16.1-installer-darwin-x86_64.sh
==> ./bazel-0.16.1-installer-darwin-x86_64.sh --prefix=/private/tmp/bazel-20180822-29381-91wa93
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
🍺 /usr/local/Cellar/bazel/0.16.1: 7 files, 159MB, built in 10 seconds

Jakob Buchgraber

unread,
Aug 22, 2018, 10:02:33 AM8/22/18
to jga...@gmail.com, bazel-discuss
Thanks for pointing that out Jason!

Jakob Buchgraber

Software Engineer


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

    

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.


--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/739d2124-8cbd-401c-98cc-c5a77c29a73d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jakob Buchgraber

unread,
Aug 22, 2018, 10:03:25 AM8/22/18
to bazel-discuss
As pointed out by Jason, if you have the homebrew core package installed you will need to uninstall
this first by running brew uninstall bazel. Sorry for the inconvenience.

Best,
Jakob

Jakob Buchgraber

Software Engineer


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

    

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.



rma...@pinterest.com

unread,
Aug 22, 2018, 3:22:27 PM8/22/18
to bazel-discuss
You shouldn't need to uninstall. You can utilize the tap_migrations.json flie to allow home-brew to redirect to the new tap location. We did this recently at Pinterest when our package was accepted into homebrew/core.

https://github.com/pinterest/homebrew-tap/blob/master/tap_migrations.json

More docs here:
https://docs.brew.sh/Migrating-A-Formula-To-A-Tap
On Wednesday, August 22, 2018 at 7:03:25 AM UTC-7, Jakob Buchgraber wrote:
> As pointed out by Jason, if you have the homebrew core package installed you will need to uninstall
> this first by running brew uninstall bazel. Sorry for the inconvenience.
>
>
> Best,
> Jakob
>
>
>
>
>
>
>
>
>
> Jakob Buchgraber
> Software Engineer
>
>

Jakob Buchgraber

unread,
Aug 23, 2018, 4:56:11 AM8/23/18
to Rahul Malik, bazel-discuss
On Wed, Aug 22, 2018 at 9:22 PM rmalik via bazel-discuss <bazel-...@googlegroups.com> wrote:
You shouldn't need to uninstall. You can utilize the tap_migrations.json flie to allow home-brew to redirect to the new tap location. We did this recently at Pinterest when our package was accepted into homebrew/core.

https://github.com/pinterest/homebrew-tap/blob/master/tap_migrations.json

For us it's the other way around though. We are moving from homebrew core to our own tap.
Does that also work?
 
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.

Jakob Buchgraber

unread,
Aug 23, 2018, 7:03:32 AM8/23/18
to bazel-discuss
I have also published this information as a blog post https://blog.bazel.build/2018/08/22/bazel-homebrew.html

Jakob Buchgraber

Software Engineer


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

    

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.



On Wed, Aug 22, 2018 at 2:11 PM Jakob Buchgraber <buc...@google.com> wrote:

Rahul Malik

unread,
Aug 23, 2018, 10:28:03 AM8/23/18
to Jakob Buchgraber, bazel-discuss
This should work the other way around too. You should be able to see bazel to the existing list here:

jason

unread,
Aug 23, 2018, 10:30:23 AM8/23/18
to rma...@pinterest.com, buc...@google.com, bazel-...@googlegroups.com
Very cool...I did not know about this migration feature. Will make my life a lot easier updating 40 build agents. 

You received this message because you are subscribed to a topic in the Google Groups "bazel-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bazel-discuss/3Ht26sWhMuA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAFdJJa9tits64600RunQ03iEAgmRgciODpfLCc5PvMLQ%2BD1-cg%40mail.gmail.com.

Rahul Malik

unread,
Aug 23, 2018, 10:34:27 AM8/23/18
to jason, bazel-...@googlegroups.com, buc...@google.com
Yeah it’s pretty useful but not well known unless you’ve run a custom tap before. 

To address this for Bazel we’ll just need a PR merged on homebrew core for tap_migrations.json and brew will respect it while upgrading bazel.

jason

unread,
Aug 23, 2018, 10:35:33 AM8/23/18
to rma...@pinterest.com, bazel-...@googlegroups.com, buc...@google.com
I also imagine it's not very common to go from core to tap. I would expect the opposite is the typical migration.

Rahul Malik

unread,
Aug 23, 2018, 10:57:34 AM8/23/18
to jason, bazel-...@googlegroups.com, buc...@google.com
Yeah it’s definitely unconventional since normally you want to be in homebrew core so there is no extra installation steps.

Jakob Buchgraber

unread,
Aug 23, 2018, 12:01:21 PM8/23/18
to Rahul Malik, bazel-discuss

Jakob Buchgraber

Software Engineer


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

    

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.


Steeve Morin

unread,
Aug 27, 2018, 7:34:23 AM8/27/18
to bazel-discuss
Note that this can be done with a oneliner:

brew install bazelbuild/tap/bazel
Reply all
Reply to author
Forward
0 new messages