rules_xcodeproj
rules_xcodeproj copied to clipboard
Bug: If the project is generated while passing configuration-affecting flags, generated files will fail
Describe the bug
If you generate a project while passing configuration-affecting flags that result in a different configuration than not passing those flags, e.g.:
bazel run --ios_multi_cpus=x86_64 //:xcodeproj
then the Bazel Generated Files target will generate files for the wrong configuration(s). Then the subsequent Copy Files script will fail to find the files.
Expected behavior
You should be able to define configuration for the project.
Versions
- rules_xcodeproj: 0.1.0
Additional Context
A current workaround is setting values in .bazelrc that will be applied without configs, to both the project generation and the internal generate files bazel call.
This would be nice to have, one obvious issue I've run into is having to build multi platform projects. i.e. using Bazel to build iOS apps and a macOS CLI.
I've solved this using build_setting which means I can do something like bazel build --config=macos //MyTarget via the command line but I'm not entirely sure how this translates to an Xcode project using BwB.
Some way of either having the rules transition on configuration flags or having the rule allow for defining a set of flags would be great.
Sadly transitions can't apply --config. But yes, that's the goal of the 0.8 Milestone.