Closed davidsantiago closed 7 years ago
@c-parsons friendly ping, is this still a problem?
Indeed, it is. Let me explain: I believe the .framework file is propagated via a provider (ObjcProvider, to be exact) to rules that depend on ios_framework, but you're right that it is not currently specified as an implicit output.
In other words, a ios_application target that depends on an ios_framework target should "do the right thing", but if you "bazel build" your ios_framework target, the framework file is not output correctly.
I'll try to address this soon.
ios_framework, and framework generation in bazel is currently fairly broken. We're aware of the issues and plan on addressing them at high priority. We'll likely introduce new native rule(s) to address frameworks appropriately, including for framework distribution.
Update here -- we are internally testing and verifying an ios_framework rule written in skylark, and are working to open source this. We anticipate this should be available in a couple of weeks.
Hello Chris, is this still expected to be done in 0.5? Is this a release blocker? We're still at least 2 weeks away from the release but we should be getting ready.
This is actually complete as of a week ago (sorry for not updating the issue) We have new rules written in skylark to handle framework generation. Please try the framework rules here: https://github.com/bazelbuild/rules_apple
If there are issues with these rules, please file a separate issue.
Thanks Chris :)
I've put up a repo to illustrate the issue here: https://github.com/davidsantiago/go_iosframework_problems
The ios_framework rule does not appear to actually generate a framework as output. The output of trying to generate the ios_framework rule's target, @swift-protobuf//:ProtocolBuffers, is at the bottom of this comment. As you can see, there is no build failure anywhere, but no .framework is output.
I have some difficulty understanding the fullness of the interface that the rules implement on the Java side. However, I do notice this comment in the IosFrameworkRule.java file: https://github.com/bazelbuild/bazel/blob/15099239d94f5fb94504e33f670adf71dacff48a/src/main/java/com/google/devtools/build/lib/rules/objc/IosFrameworkRule.java#L38 It appears to acknowledge that it is not generating the framework. There does appear to be some code that tries to set the expected output here: https://github.com/bazelbuild/bazel/blob/15099239d94f5fb94504e33f670adf71dacff48a/src/main/java/com/google/devtools/build/lib/rules/objc/IosFramework.java#L145
I am not sure what needs to be done to make this rule generate the framework.
Full command output: