bazelbuild / bazelbuild/rules_apple
Is it possible to skip the whole codesign stage?
- Dominant language
- Starlark
- Stars
- 593
- Forks
- 334
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 9
Description
It seems that in this stage, rules would unzip the bundle, codesign it and re-zip it. These unzipping and zipping steps consume too much time if the app is large (e.g. my bundle is about 3GB). As I would always launch the app via lldb, which can bypass the codesign problem, I'd like to just skip this stage to speedup building.
For instance, it takes me 8s to link the final binary, 15s to bundle, and 60s to codesign (the whole stage). Also, I have an extra unzip genrule (unzip the bundle) which takes about 10s.
I've also tried `tree_artifact_outputs` option, but this results the codesign stage to cost 150s (which only saves the last unzip stage, which costs 10s).
https://github.com/bazelbuild/rules_apple/blob/7e4c6b256467c9130e2d3263a6fc49bcd61487be/tools/bundletool/process_and_sign.sh.template#L33-L34
https://github.com/bazelbuild/rules_apple/blob/7e4c6b256467c9130e2d3263a6fc49bcd61487be/tools/bundletool/process_and_sign.sh.template#L74-L83
Contributor guide
Research direction
Start with tools/bundletool/process_and_sign.sh.template, especially the referenced sections around lines 33-34 and 74-83, to understand how bundle processing and codesigning are invoked. Trace the associated rule options and actions to determine where a skip is configured. Done means a supported path can omit the codesign stage and its unzip/rezip work while preserving normal signing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100