diff options
author | David Ostrovsky <david.ostrovsky@gmail.com> | 2020-08-03 09:02:17 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-08-03 09:02:17 +0000 |
commit | 3ab9f1dd93129efda4b8e6aeb3e9387b6e6afe4e (patch) | |
tree | 199e0216a253b11fcf3d1b470da25225c0e95fa8 | |
parent | c2144344a6b37486b341a27a421142e277e6d4c6 (diff) | |
parent | f5f0d61a80de41c118c4f719ae992ba417d6e942 (diff) |
Merge "Document how to mitigate the issue of broken Eclipse project on MacOS" into stable-2.16
-rw-r--r-- | Documentation/dev-eclipse.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Documentation/dev-eclipse.txt b/Documentation/dev-eclipse.txt index daabbf3c57..e1b3e9e094 100644 --- a/Documentation/dev-eclipse.txt +++ b/Documentation/dev-eclipse.txt @@ -42,6 +42,37 @@ that get saved to the `.project` file, for example adding Resource Filters on a folder, they will be overwritten the next time you run `tools/eclipse/project.py`. +=== Eclipse project on MacOS + +By default, bazel uses `/private/var/tmp` as the +link:https://docs.bazel.build/versions/master/output_directories.html[outputRoot on MacOS]. +This means that the eclipse project will reference libraries stored under that directory. +However, MacOS runs periodic cleanup task which deletes the content under `/private/var/tmp` +which wasn't accessed or modified for some days, by default 3 days. This can lead to a broken +Eclipse project as referenced libraries get deleted. + +There are two possibilities to mitigate this issue. + +==== Change the location of the bazel output directory +On Linux, the output directory defaults to `$HOME/.cache/bazel` and the same can be configured +on Mac too. Edit, or create, the `$HOME/.bazelrc` file and add the following line: +---- +startup --output_user_root=/Users/johndoe/.cache/bazel +---- + +==== Increase the treshold for the cleanup of temporary files +The default treshold for the cleanup can be overriden by creating a configuration file under +`/etc/periodic.conf` and setting a larger value for the `daily_clean_tmps_days`. + +An example `/etc/periodic.conf` file: + +---- +# This file overrides the settings from /etc/defaults/periodic.conf +daily_clean_tmps_days="45" # If not accessed for +---- + +For more details about the proposed workaround see link:https://superuser.com/a/187105[this post] + === Eclipse project with custom plugins === To add custom plugins to the eclipse project add them to `tools/bzl/plugins.bzl` |