bazel-ios / rules_ios

Bazel rules for building iOS applications and frameworks
Apache License 2.0
278 stars 85 forks source link

Fix apple_library rule not working in sandbox when do `SwiftCompile` in mixed sources #894

Closed gyfelton closed 2 months ago

gyfelton commented 2 months ago

To repro, run bazel clean; bazel build //tests/ios/frameworks/mixed-source/only-source:SwiftLibrary -s --sandbox_debug --strategy=SwiftCompile=sandboxed and got <unknown>:0: error: underlying Objective-C module 'SwiftLibrary' not found error

usingbazel aquery //tests/ios/frameworks/mixed-source/only-source:SwiftLibrary_swift to look at input list, realized bazel-out/darwin_arm64-dbg/bin/tests/ios/frameworks/mixed-source/only-source/SwiftLibrary-modulemap/SwiftLibrary.modulemap entry is not there even though that's sth generated by the module_map generator

So adding this fixed the issue because sandbox can now pick up this file

Next step: setup CI job here that run everything in sandbox mode, try to fix anything that is broken in another PR