Skip to content

Add always_include_developer_search_paths to mixed_language_library #1539

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

Conversation

jschear
Copy link
Contributor

@jschear jschear commented Jun 12, 2025

This allows Swift code in the library to depend on XCTest.

If this was passed in kwargs, it gets passed along to the internal objc_library targets:

~/Development/rules_swift master $ bazel build //examples/apple/mixed_language:MixedAnswer
ERROR: /Users/jschear/Development/rules_swift/examples/apple/mixed_language/BUILD:5:23: //examples/apple/mixed_language:MixedAnswer_headers: no such attribute 'always_include_developer_search_paths' in 'objc_library' rule
ERROR: /Users/jschear/Development/rules_swift/examples/apple/mixed_language/BUILD:5:23: //examples/apple/mixed_language:MixedAnswer_clang: no such attribute 'always_include_developer_search_paths' in 'objc_library' rule

We could alternatively .pop it off of kwargs before passing to objc_library, but tracking which attributes belong to swift_library vs. obj_library and which are shared can get a bit complex.

@keith keith enabled auto-merge (squash) June 12, 2025 16:11
@keith keith merged commit 580e10c into bazelbuild:master Jun 12, 2025
13 checks passed
@jschear jschear deleted the js/mixed_language_always_include_developer_search_paths branch June 12, 2025 16:55
jschear added a commit to jschear/rules_swift that referenced this pull request Jun 12, 2025
…y` (bazelbuild#1539)

This allows Swift code in the library to depend on XCTest.

If this was passed in `kwargs`, it gets passed along to the internal
`objc_library` targets:
```
~/Development/rules_swift master $ bazel build //examples/apple/mixed_language:MixedAnswer
ERROR: /Users/jschear/Development/rules_swift/examples/apple/mixed_language/BUILD:5:23: //examples/apple/mixed_language:MixedAnswer_headers: no such attribute 'always_include_developer_search_paths' in 'objc_library' rule
ERROR: /Users/jschear/Development/rules_swift/examples/apple/mixed_language/BUILD:5:23: //examples/apple/mixed_language:MixedAnswer_clang: no such attribute 'always_include_developer_search_paths' in 'objc_library' rule
```
We _could_ alternatively `.pop` it off of `kwargs` before passing to
`objc_library`, but tracking which attributes belong to `swift_library`
vs. `obj_library` and which are shared can get a bit complex.
luispadron pushed a commit that referenced this pull request Jun 12, 2025
…d_language_librar… (#1541)

…y` (#1539)

This allows Swift code in the library to depend on XCTest.

If this was passed in `kwargs`, it gets passed along to the internal
`objc_library` targets:
```
~/Development/rules_swift master $ bazel build //examples/apple/mixed_language:MixedAnswer
ERROR: /Users/jschear/Development/rules_swift/examples/apple/mixed_language/BUILD:5:23: //examples/apple/mixed_language:MixedAnswer_headers: no such attribute 'always_include_developer_search_paths' in 'objc_library' rule
ERROR: /Users/jschear/Development/rules_swift/examples/apple/mixed_language/BUILD:5:23: //examples/apple/mixed_language:MixedAnswer_clang: no such attribute 'always_include_developer_search_paths' in 'objc_library' rule
```
We _could_ alternatively `.pop` it off of `kwargs` before passing to
`objc_library`, but tracking which attributes belong to `swift_library`
vs. `obj_library` and which are shared can get a bit complex.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants