bazelbuild / bazelbuild/rules_swift
`mixed_language_library` is not usable on Linux because it depends on `objc_library`
- Dominant language
- Starlark
- Stars
- 353
- Forks
- 172
- Avg merge
- 23h 14m
- Merged PRs (30d)
- 8
Description
`mixed_language_library` currently expands to [internal `objc_library` targets](https://github.com/bazelbuild/rules_swift/blob/9d2505f74f4d043fbaf555eac04fa21e28f691e1/mixed_language/mixed_language_library.bzl#L307).
That makes non-Apple builds fail at analysis time due to `objc_library` requiring Apple toolchain behavior, which is expected in `rules_cc`:
https://github.com/bazelbuild/rules_cc/blob/ee57062efc3ab22132e28af782c70b6d73b052f5/cc/private/rules_impl/objc_semantics.bzl#L32
The issue is not with `objc_library` itself.
The issue is that mixed Swift + Clang-language interop is also a practical non-Apple use case, but `mixed_language_library` currently has no non-Apple path.
Would you consider:
1. supporting a non-Apple backend for `mixed_language_library` (for example a `cc_library`-based path for Clang-language sources), or
2. explicitly documenting that `mixed_language_library` is Apple-only?
Contributor guide
Research direction
Read mixed_language/mixed_language_library.bzl around the internal objc_library targets, then compare the linked rules_cc objc semantics and the behavior of mixed_language_library on Linux. Determine whether the issue should result in a non-Apple implementation path or documentation of Apple-only support; done means the chosen scope is implemented or clearly documented and Linux analysis behavior is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100