commit | be25b25a62a0e0fc2139856c2a9e3d8f011438e8 | [log] [tgz] |
---|---|---|
author | Kyle Teske <kjteske@gmail.com> | Fri Aug 07 06:18:08 2020 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Aug 07 06:19:06 2020 -0700 |
tree | 5ccd94c37933f946f2c39355de351e74b1a38fbc | |
parent | 5a8c461b6807760d1a45de7a082464ca34efa72d [diff] |
Fix xcode-locator preferring some Xcode versions outside of /Applications The current xcode-locator prefers Xcode versions in /Applications over other versions, comments indicate this is to prefer local versions over mounted versions. The check for whether Xcode is in /Applications is only checking if the file path contains "/Applications/". This causes issues if Xcode installations can be found on disk that contains "/Applications/" but are not rooted at /Applications, e.g. when using TimeMachine these can be found at /Volumes/MyPassportForMac/Backups.backupdb/.../Macintosh HD/Applications/Xcode.app The Xcode from the backup can replace the Xcode actually at /Applications/Xcode.app. This leads to compile errors later when using that version of Xcode, e.g. "the rule is missing dependency declarations" for files in the wrong Xcode path. Fix by checking if the path starts with "/Applications/" instead of just contains "/Applications/". This will change behavior and potentially break users if the "contains" check was relied on, e.g. if anybody expects "/Users/me/Applications/Xcode.app" to be preferred over "<network mount>/somewhere/Xcode.app". It's not clear that this was ever intended to work like this and need to preserve this behavior. If we wanted to be extra cautious, we could change this to 3 preference tiers: first choose version in /Applications, then choose versions containing "/Applications/" anywhere in the path, and finally choose any other path to Xcode. Closes #11678. RELNOTES[INC]: Bazel now correctly prefers Xcode versions in `/Applications` over any other paths, which resolves an issue with accidentally picking up an Xcode version from a Time Machine backup or network disk. In the improbable case that you relied on the old behavior and Bazel now picks up Xcode from the wrong location, you can fix it by moving that Xcode version to /Applications. PiperOrigin-RevId: 325424375
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
See CONTRIBUTING.md