bazel: default java.io.tmp location is too long
I have an issue with files created at temp directory having too long pathname. Please kindly see this SO question.
I managed to solve that by explicitly adding to my test target
"jvm_flags" = ["-Djava.io.tmpdir=/tmp"],
But that hurts the hermetical principle of testing.
I suggest we offer much shorter yet unique tmp location for tests
(somehting like /tmp/bazel-<unique-7-chars>
)
WDYT?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 33 (23 by maintainers)
Commits related to this issue
- Fix GPG temp path too long issue for FOSS build Detailed discussion can be found on github (https://github.com/bazelbuild/bazel/issues/3215). On newer Debian systems as well as on macOS, the temporar... — committed to google/nomulus by jianglai 7 years ago
- tmpdir,local-exec: implement --local_tmp_root Add new flag called `--local_tmp_root`, which (if specified) tells Bazel what temp directory should locally executed actions use. Fixes https://github.c... — committed to bazelbuild/bazel by laszlocsomor 6 years ago
- Automated rollback of commit 04757dba0174d22c0a695a7ed5fe511fd13df008. *** Reason for rollback *** There's already a --test_tmpdir flag, and Java tests don't pick up this new one. More info: https:/... — committed to bazelbuild/bazel by laszlocsomor 6 years ago
FYI, I decided to roll back the
--local_tmp_root
flag, see: https://github.com/bazelbuild/bazel/issues/4621#issuecomment-366217321For the record, there’s already a
--test_tmpdir
flag, which allows going down to a 42-character-long temp root, see https://github.com/bazelbuild/bazel/issues/4621#issuecomment-366217799I’ll discuss with the team how to go forward.