Commit fe45faa
authored
fix(toolchains): Add Xcode repo env vars to local_runtime_repo for better cache invalidation (#3203)
On macOS, if one writes a `local_runtime_repo` with `interpreter_path =
"/usr/bin/python3"`, the path to python3 inside the selected
_Xcode.app/Contents/Developer_ directory gets cached. If a developer
changes that directory with `xcode-select --switch` that cached file
with the old directory remains.
Making the local_runtime_repo rule sensitive to DEVELOPER_DIR and
XCODE_VERSION (two conventionally adopted env vars among the Bazel +
Apple ecosystem) will ensure that if Xcode changes, so will the resolved
python3 path.
Fixes #31231 parent 563c585 commit fe45faa
2 files changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
0 commit comments