-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Allow per-xcodeproj
Bazel configuration
#641
Comments
Because bazel configs can't be applied via a transition, doing this would require the same config to be applied when calling Right now the recommended solution is to apply the config in a bazel wrapper, to ensure that it's applied when generating the project and when Xcode calls into the wrapper (set via the Figuring out a wholistic solution to this is the goal of a future milestone. We will most likely create a script to invoke |
Is there an example for a wrapper script? It looks like |
|
Okay, I got further with a When I run
|
Figured out that that's caused by the |
Now the issue I have is that when I open the Xcode project, something generates a directory named I assume something is invoking the wrapper with some unexpected initial argument, but it's difficult to figure out what or how I should write the wrapper instead. |
I don't reproduce that error. There was a build error, but uses the latest on Btw, Also, if you do get |
I eventually got the minimized test case working with:
I still haven't got it working in the real-world project though. I do get the "Bazel didn't generate the correct files" error. ( |
The |
It still happens if I change the wrapper to |
The type of change you are applying then can't be done this way. Something about it is causing the configuration for targets to be different when Xcode is invoking the wrapper versus when you invoke the wrapper on the command line. |
So this is mostly done. The I'm not closing this yet though, as I feel this issue can represent the desire to have per- |
xcodeproj
Bazel configuration
In some cases it is useful to specify the configuration only for building from Xcode.
It would be useful to have something like this:
And if this argument is specified, it will be passed to all calls to bazel.
For example for the build call in
BazelDependencies
:bazel build --config=rules_xcodeproj ...
Note: Now we can achieve the same behavior by setting a custom bazel_path to the wrapper script, which will add the config as a parameter. But this is not really convenient.
The text was updated successfully, but these errors were encountered: