bazelbuild / rules_swift

Bazel rules to build Swift on Apple and Linux platforms
Apache License 2.0
309 stars 133 forks source link

XCode SDK's aren't visible in Sandboxed mode #1204

Closed ed-irl closed 3 months ago

ed-irl commented 3 months ago

Hello, I'm interested in using sandboxed mode to achieve something like strict deps, as mentioned in #344 .

With sandboxed mode enabled, however, SDK's provided by XCode (eg. SwiftUI) are unresolvable. I am not sure how I would go about adding bazel targets for these SDK dependencies.

Is there a convenient way to resolve them in sandboxed mode?

Thank you!

keith commented 3 months ago

Can you provide a repro case? I don't fully understand what you mean

brentleyjones commented 3 months ago

The SDKs not being available is probably that the macros don't work, since they are sandboxed themselves by default: https://github.com/bazelbuild/rules_swift/issues/1202

We need to add the new no-sandbox flag to the swift compiles when it's available (which is Swift 5.10+).

adincebic commented 3 months ago

@ed-irl this is fixed.