Skip to content

Conversation

pennig
Copy link
Contributor

@pennig pennig commented Aug 22, 2025

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 #3123

Copy link
Collaborator

@rickeylev rickeylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rickeylev rickeylev added this pull request to the merge queue Aug 22, 2025
Merged via the queue into bazel-contrib:main with commit fe45faa Aug 22, 2025
2 checks passed
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.

local_runtime_repo writes absolute path of Xcode on macOS
2 participants