Skip to content

Describe toolchain provider and macro contracts - #940

Draft
tamird wants to merge 2 commits into
bazelbuild:mainfrom
tamird:type-contracts
Draft

tamird wants to merge 2 commits into
bazelbuild:mainfrom
tamird:type-contracts

Conversation

@tamird

@tamird tamird commented Oct 16, 2026 •

Copy link
Copy Markdown

Describe the inputs and results of C++ toolchain helpers, variable descriptors, provider collectors and tool macros. Ordinary signatures live in source comments readable by Bazel 7. Companion interfaces express generic functions, provider fields and dictionaries with required keys. A dependent ruleset can use the exported manifest alongside the implementations.

The Unix and Windows toolchain generators now use a string-only helper to escape percent signs in known strings. The compatibility helper still converts other values to strings and preserves None; its return type includes None.

The advisory workflow gates the selected implementations and reports findings for the remaining tracked Starlark files. It uses the contracts in bazel-skylib#641. Two source fixes remain separate: #960 replaces a private, untyped Bazel Features lookup, and #967 handles omitted Objective-C sources and artifacts. The corresponding lines are marked until those changes land.

Prepared with Codex for @tamird.

@tamird
tamird marked this pull request as draft October 16, 2026 15:20
@tamird tamird changed the title Type toolchain configuration providers Describe toolchain provider and macro contracts Oct 18, 2026
@tamird
tamird force-pushed the type-contracts branch 6 times, most recently from d3af802 to 309b721 Compare October 23, 2026 16:50
Give toolchain configuration, provider collectors and rule helpers typed
inputs and results. Keep simple signatures in their implementations;
represent provider fields and generic functions in companion interfaces.
Export the interfaces for dependent repositories. Run sty on the
implementations and report findings across the remaining Starlark files.
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.

1 participant