Files
gerrit/Documentation
Dave Borowitz ac56c313df bazel: Recommend setting --action_env=PATH for local cache
The old configuration makes it impossible to compile Gerrit on Mac with
recent versions of Bazel. The flag --experimental_strict_action_env now
makes Bazel pass PATH=/bin:/usr/bin to subcommands. Building PolyGerrit
requires using node from $PATH. On Macs it is impossible (even for root)
to write to /usr/bin, so node has to live somewhere not in that
hard-coded PATH. I'm not sure when this behavior changed in Bazel; it
seems like it should have broken long ago. But it's marked experimental
so we can't complain too much.

The documentation of this option says:

    If true, Bazel uses an environment with a static value for PATH and does
    not inherit LD_LIBRARY_PATH or TMPDIR. Use --action_env=ENV_VARIABLE if you
    want to inherit specific environment variables from the client, but note
    that doing so can prevent cross-user caching if a shared cache is used.

Passing --action_env=PATH fixes the problem. I think it should be
safe(ish) to pass --action_env=PATH, since the particular setup
described in our docs is not used for cross-user caching. This may not
catch potential cache invalidations due to different versions of tools,
but I don't see how it's any worse than when the binaries in /usr/bin
get updated.

Change-Id: I94543bd4801b83a66ff150baf3fb9e12ded7555f
2018-04-16 12:05:39 +02:00
..
2015-05-06 11:25:51 -07:00
2018-03-17 10:08:39 +09:00
2017-10-31 11:02:37 -04:00
2016-07-07 14:06:31 +02:00
2016-07-07 14:06:31 +02:00
2017-10-18 21:55:15 -04:00
2018-04-12 10:20:10 +09:00
2018-03-12 16:59:25 +01:00
2017-07-14 13:25:19 +09:00
2017-08-08 14:24:34 +02:00
2017-09-30 15:47:14 +02:00
2015-04-30 14:37:09 +00:00
2017-09-30 15:47:14 +02:00