Skip to content

Deprecate and remove unused Apple-related flags and Starlark logic.#28107

Closed
dabanki wants to merge 2 commits intobazelbuild:masterfrom
dabanki:remove_apple
Closed

Deprecate and remove unused Apple-related flags and Starlark logic.#28107
dabanki wants to merge 2 commits intobazelbuild:masterfrom
dabanki:remove_apple

Conversation

@dabanki
Copy link
Copy Markdown
Contributor

@dabanki dabanki commented Dec 26, 2025

These flags have been identified as obsolete. We are removing their references from Bazel as precursor work towards Starlarkifying Apple related flags, eventually removing the fragment all together.

See bazelbuild/rules_apple#2845.

@dabanki dabanki requested a review from gregestren December 26, 2025 15:28
@dabanki dabanki marked this pull request as ready for review December 28, 2025 16:41
@dabanki dabanki requested a review from lberki as a code owner December 28, 2025 16:41
@github-actions github-actions Bot added the awaiting-review PR is awaiting review from an assigned reviewer label Dec 28, 2025
@dabanki
Copy link
Copy Markdown
Contributor Author

dabanki commented Dec 28, 2025

cc @keith, @brentleyjones

@iancha1992 iancha1992 added the team-Rules-ObjC Issues for Objective-C maintainers label Dec 30, 2025
@gregestren
Copy link
Copy Markdown
Contributor

LGTM but appreciate a check by @keith and @brentleyjones .

public List<String> macosCpus;

@Option(
name = "catalyst_cpus",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not sure this one is fully dead but i don't think it was ever fully wired up either so it's probably fine

public boolean incompatibleUseToolchainResolution;

@Option(
name = "apple_platforms",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this flag is definitely still being used by rules_apple, maybe not the one in google though

Copy link
Copy Markdown
Contributor Author

@dabanki dabanki Jan 6, 2026

Choose a reason for hiding this comment

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

Yeah, this was confirmed by internal owner (Nicholas Levin) that this is not used. Do you know the use case externally? Would it be possible to just leverage --platforms instead (this is what we are doing internally)? This poses complications because a List Label flag cannot natively be migrated to Starlark.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could a string_list flag along with https://bazel.build/rules/lib/builtins/Label#Label work?

Or similarly a custom-defined flag that does the same conversion?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yea im sure we could, google just migrated a lot of stuff internally over the past little while in ways that require a lot of work externally in the rules. our rules aren't even close to building with 9.x right now because of that fallout

Copy link
Copy Markdown
Contributor

@gregestren gregestren Jan 6, 2026

Choose a reason for hiding this comment

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

FWIW rules_python had a similar story: the rules didn't work at all on Bazel 9 at first, at the same time we were migrating off the native flags. We and the rules_python authors collaborated to get everything in good shape.

I can't speak for the core logic changes, of course. But I hope at least the flag story doesn't further disrupt you. If there's a perpetual logic disconnect because of those flag differences, that's a good thing for us to be aware of and know how to not make things harder.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sounds good, I added the apple_platforms flag back and I'll add it to the group of flags that need migrating.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks, we can submit the PR to remove once we've updated

@gregestren gregestren added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Jan 8, 2026
@github-actions github-actions Bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Rules-ObjC Issues for Objective-C maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants