Repository navigation
Conversation
An attempt to (greatly) increase the legibility of the currently inscrutible error message developers receive when the configured Xcode is not available locally or remotely. ```text Bazel couldn’t match the selected Xcode to this project’s supported versions: 27.0 (build 27A266a) Supported versions: 26.5 (build 17F42) 27.2 (build 27B5019j) Detected locally: 26.5 (build 17F42) 27.0 (build 27A266a) 27.2 (build 27B5019j) Install a supported Xcode version and select it with xcode-select. ``` ### Validation - `bazel test //test:xcode_config_test` on Bazel 8.7.0, 9.0.0, 9.0.1, and 9.2.0: all 51 tests pass on each release, including unsupported, unknown, ambiguous, duplicate, and empty inventories, plus custom and empty hints. - Verified the failure against a consuming project's configuration and checked the fallback when discovery fails. A few examples: <img width="1028" height="298" alt="CleanShot 2026-09-17 at 13 32 56@2x" src="https://github.com/user-attachments/assets/17020745-7c5a-46e6-9d65-dcab9ae90770" /> <img width="1026" height="536" alt="CleanShot 2026-09-17 at 13 33 21@2x" src="https://github.com/user-attachments/assets/065e5eb8-246f-4009-b698-efd88c376aef" />
tamird
force-pushed
the
type-contracts
branch
from
October 18, 2026 20:47
fa498b6 to
f590301
Compare
tamird
force-pushed
the
type-contracts
branch
from
October 21, 2026 02:13
351badd to
96136bd
Compare
…on wrapper (bazelbuild#667) Since outputs is required by actions.run, accessing it via kwargs["outputs"] better reflects the API contract and allows static analysis to recognize that the value is always present.
The documented `after` argument accepted string references but failed when passed a `Label`, because companion-target construction called string methods. Construct the companion with `same_package_label` so the original repository and package identity survive calls from other repositories. --------- Co-authored-by: Adin Cebic <cebic.ad@gmail.com>
tamird
force-pushed
the
type-contracts
branch
3 times, most recently
from
October 22, 2026 16:41
0c4c40e to
9c0cd72
Compare
…ld#679) With no `--visionos_cpus`, the test transition selected `visionos_x86_64`. [bazelbuild#293](bazelbuild#293) removed that platform, so Bazel failed to analyze `//test/test_data:visionos_binary`. Use `sim_arm64` for the default split. The binary test checks that the resulting Mach-O binary targets the visionOS simulator. Codex for Tamir.
Bazel 7.4, the minimum supported release, exports the visionOS platform type. Use that member directly in the dynamic toolchain helpers, as the C++ toolchain configuration already does.
…zelbuild#672) `XcodeVersionConfig.xcode_version()` can return a developer directory rather than a dotted version. Comparing that string to `minimum_xcode_version` aborts analysis with `unsupported comparison: string <=> DottedVersion`. Treat the directory as a recent Xcode, consistent with bazelbuild#666. A configuration with no version still fails the condition; numeric versions retain their existing comparison.
`xcode_execution_info` reads the Xcode configuration through the Apple fragment. With `--incompatible_remove_ctx_apple_fragment`, its late-bound attribute becomes `None` and provider lookup fails. Use `apple_support.action_required_attrs()` to resolve the configuration through `//xcode:version_config`, which selects the native or Starlark-backed configuration. Remove the rule's unused Apple fragment declaration.
The Windows installer entries were swapped: x64 hosts were falling back to the 32-bit installer after a checksum failure on the mirror, and 32-bit hosts would have received an x64 binary. The unversioned upstream `7zr.exe` has also already been replaced by 7-zip.org, so that fallback was dead.
This was working under rules from rules_apple, but this is more correct and there was already a helper for it. Closes bazelbuild#676
Fix incremental archive creation when the archiver wrapper is invoked with `ar q`. The wrapper currently translates each invocation to `libtool -static -o`, which replaces the archive with only the current batch of object files. Include the existing archive as an input when appending, preserving objects from previous batches. This fixes a regression introduced by bazelbuild#601. In particular, cc-rs constructs archives in multiple `cq` / `cqD` invocations, and the lost objects cause undefined-symbol linker failures in native Rust dependencies such as ring. The wrapper rename also means rules_rust no longer bypasses it using its legacy `libtool` filename check. No rules_rust change is needed to address this append regression.
…ld#677) Both Apple toolchain repositories embed environment flags and include directories in generated BUILD files. Quotes could make the package fail to load, and backslashes could change the value. Xcode directories also passed through a Crosstool helper that doubled literal percent signs, producing a different absolute path. Quote both kinds of values as Starlark string literals and retain the original Xcode directory. The serializer leaves other control characters unchanged because Bazel 7 accepts them literally but rejects some escape sequences emitted by `repr`.
tamird
force-pushed
the
type-contracts
branch
4 times, most recently
from
October 29, 2026 18:30
f4345a8 to
976acc6
Compare
…azelbuild#682) In corner cases, Xcode versions may include non-numeric suffixes. These need to be passed along as part of the SDK platform name, but must not end up in the clang target triple, where they cannot be parsed. Use only the numeric part of the minimum OS version for the triple, and carry any suffix of the SDK version over to the SDK platform name.
Use source comments for ordinary functions and the DMG repository rule. Describe platform providers and forwarded action keywords in companion interfaces so callers and implementations use the same types.
Check repository and toolchain implementations and report findings for the remaining tracked Starlark files. Validate the shell declarations against Skylib 1.9.0. Apply the pending rules_cc parameter comments only in the advisory workspace so native builds use the released C++ toolchain.
Describe the repository context and universal tool inputs in the source. Let sty discover the other adjacent interfaces and select tracked files through the shared action.
tamird
force-pushed
the
type-contracts
branch
from
November 3, 2026 15:07
2ad52e1 to
f373bbd
Compare
Place the Xcode context and locator types beside their consumers. Declare the 7-Zip download fields and function parameters in the implementation. Remove the three companion files and check these modules directly.
Identify the native types each exceptional comment needs. Document the language boundary beside its use.
Follow the repository’s release-tag convention for external actions. Use the same checkout and checker revisions as the previous workflow.
Set one severity for the eleven strict diagnostics. Let the pinned checker define the group so an upgrade can extend it without edits to the project configuration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run the existing pull-request workflows for the Starlark contracts proposed upstream 1. This fork PR provides CI results while upstream workflows await approval.
Prepared by OpenAI's Codex on behalf of @tamird.