Skip to content
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

Bug: CLI API for indexbuild doesn't pick up flags #3087

Open
yongjincho92 opened this issue Sep 4, 2024 · 0 comments
Open

Bug: CLI API for indexbuild doesn't pick up flags #3087

yongjincho92 opened this issue Sep 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@yongjincho92
Copy link
Contributor

Description

When using CLI API to build with indexbuild config, the flags for indexbuild defined in .bazelrc with build:rules_xcodeproj_indexbuild are not applied as expected.

Reproduction steps

  1. Apply the following diff
diff --git a/examples/integration/.bazelrc b/examples/integration/.bazelrc
index 45aa71ea..29a8135b 100644
--- a/examples/integration/.bazelrc
+++ b/examples/integration/.bazelrc
@@ -11,6 +11,7 @@ build:rules_xcodeproj --@rules_xcodeproj//xcodeproj:extra_indexbuild_flags='--no
 build:rules_xcodeproj --@rules_xcodeproj//xcodeproj:extra_swiftuipreviews_flags='--noverbose_failures'
 
 build:rules_xcodeproj_integration --define=foo=bar
+build:rules_xcodeproj_indexbuild --define=foo=foo
 
 # Required for sharing cache between Intel and Apple silicon
 build:rules_xcodeproj --@build_bazel_rules_swift//swift:universal_tools
  1. cd examples/integration; bazelisk run //:xcodeproj-incremental-bazel-sim_arm64
  2. bazelisk run //:xcodeproj-incremental-bazel-sim_arm64 -- --config=indexbuild --generator_output_groups=all_targets "build --announce_rc"
  3. Inspect the log

Expected behavior

--define=foo=foo is in the log and applied to build

Actual behavior
INFO: Found applicable config definition build:rules_xcodeproj_integration in file /Users/ycho/Dev/rules_xcodeproj/examples/integration/.bazelrc: --define=foo=bar

rules_xcodeproj version

44b6f04

Xcode version

15.0

Bazel version

7.1.1

rules_apple version

No response

rules_swift version

No response

Additional information

No response

@yongjincho92 yongjincho92 added the bug Something isn't working label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant