MobileNativeFoundation / MobileNativeFoundation/rules_xcodeproj
Unable to override flags from templated `xcodeproj.bazelrc`
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 626
- Forks
- 124
- PR merge metrics
- No merged PRs in 30d
Description
Not sure if this is intended, don't think it is because otherwise there doesn't seem to be a way to override this without modifying the template directly.
For example, if we want to set common:rules_xcodeproj --remote_download_outputs=all it doesn't seem like the way the .bazelrc files/flags are loaded allows for this to override the templated common:rules_xcodeproj --remote_download_outputs=toplevel
The issue seems to be in the way the template loads and sets the private _rules_xcodeproj_build config:
...
common:_rules_xcodeproj_build --config=rules_xcodeproj
### Project specific configs
%project_configs%
# Import `xcodeproj.bazelrc` if it exists
try-import %workspace%/xcodeproj.bazelrc
Anything set in xcodeproj.bazelrc or .bazelrc would make it into rules_xcodeproj config but not _rules_xcodeproj_build
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in xcodeproj/internal/templates/xcodeproj.bazelrc around lines 128-139 and trace how _rules_xcodeproj_build, rules_xcodeproj, project configs, and the imported workspace xcodeproj.bazelrc are loaded. Reproduce the ordering with common:rules_xcodeproj and --remote_download_outputs settings. Done means a project-level configuration can override the templated value without editing the template.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100