Skip to content

Use short_path for cache dir#163

Merged
srueg merged 1 commit into
apple:mainfrom
srueg:bazel-8
May 21, 2026
Merged

Use short_path for cache dir#163
srueg merged 1 commit into
apple:mainfrom
srueg:bazel-8

Conversation

@srueg

@srueg srueg commented May 20, 2026

Copy link
Copy Markdown
Contributor

Bazel 8 flipped --legacy_external_runfiles to false by default, so files from external repositories no longer appear under external/... in a test's runfiles tree.

Use caches[0].root.short_path instead, which yields a runfiles-relative path that is correct under both legacy and Bazel 8 layouts.

Also replace the deprecated ctx.genfiles_dir alias with ctx.bin_dir in _pkl_eval_impl; both have produced the same value since genfiles was merged into bindir in Bazel 6.

This also updates all .bazelversion files to use 8.7.0 by default. We still run integration tests with both, Bazel v7 and v8.

Bazel 8 flipped `--legacy_external_runfiles` to false by default, so
files from external repositories no longer appear under `external/...`
in a test's runfiles tree.

Use `caches[0].root.short_path` instead, which yields a
runfiles-relative path that is correct under both legacy and
Bazel 8 layouts.

Also replace the deprecated `ctx.genfiles_dir` alias with
`ctx.bin_dir` in `_pkl_eval_impl`; both have produced the same
value since `genfiles` was merged into `bindir` in Bazel 6.
@srueg srueg merged commit aa5cbf4 into apple:main May 21, 2026
7 checks passed
@srueg srueg deleted the bazel-8 branch May 21, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants