bazelbuild / bazelbuild/bazel

Starlarkify Xcode rules

Open
#16,798 3 comments 2 reactions 0 assignees View on GitHub
not stale P3 platform: apple type: feature request
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 16h
Merged PRs (30d)
72

Description

Rewrite Xcode rules to Starlark:

- `xcode_config`
- `xcode_config_alias`  
- `xcode_version`
- `available_xcodes`

Those are mostly simple rules that should be straight forward to Starlarkify.

`apple_cc_toolchain` is extended from `cc_toolchain` which contains a skyframe restart and is not Starlarkfiable at the moment.

The effort needs to be coordinated with Google:
- [ ] Implement first Starlark version of the rules in builtins (`src/main/starlark/builtins_bzl`), because this will automatically run unit tests on them; first version should match native version as close as possible
- [ ] Make redirects from `rules_apple` repository for each rules, pointing to native rules (similar to `rules_java` or `rules_cc`)
- [ ] Google should use the redirects internally
- [ ] Copy the rules to `rules_apple` repository

First step can be done independently of the rest 3 steps.

Contributor guide

Open the contributing guide

Research direction

Start in src/main/starlark/builtins_bzl and review the existing native implementations of xcode_config, xcode_config_alias, xcode_version, and available_xcodes. Use the built-in unit tests to compare the Starlark versions with the native behavior. The broader work also requires redirects from rules_apple and coordination with Google before copying the rules there.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.