Comments (9)
Just to make sure I'm understanding your issue:
- You've been compiling code that isn't extension-safe into an extension, and that's failing now because we're more strict about forcing that flag to be set?
- So, are you asking for a way to explicitly disable
-fapplication-extension
on extensions to get that code to compile, even though it opens you up to API safety issues?
And the PR you linked is definitely the one that causes it? I wouldn't expect that one to affect it.
from rules_apple.
- Yes, there are Third-Party SDKs (Facebook in this case) that are used in our extension but we do not call any unsafe extension APIs. Dependencies linked to our extension are causing the issues and we may not be in a position to make them compliant.
- A way to disable this (at least for dependencies) would allow us to upgrade for other fixes (resource processing logic for example) while we work through seeing if we can get rid of these dependencies or resolve the issue another way. This is a regression IMO and should be called out through warnings for some time before failing builds.
The PR I linked is the first one that starts to show the error for me. I wonder if it's because _create_linked_binary_target
is reading the value for extension_safe
from it's arguments rather than kwargs
.
- extension_safe = kwargs.get("extension_safe"),
--
+ extension_safe = extension_safe,
from rules_apple.
Ok, having extension_safe
default to True
for extension targets but letting the user override it if they know what they're doing seems like a reasonable thing to do (since this is possible in Xcode by just modifying the build setting there).
I'll take a stab at it soon. The code you cited wasn't intended to change the behavior, but it's possible there was a subtle change there.
from rules_apple.
@allevato - Thanks!
from rules_apple.
@allevato - I was actually able to remove the dependency to unblock the issue. I still think you should have a way to disable this but just wanted to give you a heads up.
from rules_apple.
I realized this morning that there's actually nothing to be done here.
The extension_safe
attribute on apple_binary
was rolled back to be a no-op in bazelbuild/bazel@8effaa7, but the baseline for the 0.5.2 release was cut before that commit. It was rolled back because we found that it often caused the same dependency to be compiled twice if it was used in, say, an application and an extension (once with -fapplication-extension
and once without), which was detrimental to the build times for a number of our teams.
Even though you've already unblocked yourself, if you build Bazel from HEAD, the problem should go away. Since we're moving fast with the Apple Skylark rules and they often require changes to Bazel's core, we're kind of avoiding keeping features in sync with official releases right now.
In the future if we
from rules_apple.
If we....? : 🍿
from rules_apple.
Oops 😄
In the future if we fix the handling of the flag at the binary level, then we can revisit the "escape hatch" and have an attribute on the bundling rules that does the "escape hatch" behavior described above.
from rules_apple.
@allevato - Would it be possible to use GH releases to have notes for when rules_apple
depends on something that isn't in the latest official version? We're trying to minimize the amount of bazel version updates for our engineering team and CI infra but we also want to stay up-to-date with rules_apple
fixes / updates.
from rules_apple.
Related Issues (20)
- `ios_build_test` and `ios_application ` cannot be directly used with default platform from apple_support HOT 4
- iOS app tutorial steps produce an app that crashes on launch HOT 1
- xctoolrunner failed: error executing in Downstream CI with Bazel@HEAD HOT 2
- How to build for multiple architectures HOT 10
- Support XCFramework Signatures HOT 5
- Failed xctoolrunner error executing AssetCatalogCompile command with Bazel@HEAD HOT 2
- Terminating app due to uncaught exception 'IBPlatformToolFailureException', reason: 'The tool closed the connection (AssetCatalogSimulatorAgent) HOT 1
- Bazel 7: Linking actions missing`-framework` flags for framework imports HOT 2
- iOSApp.ipa: code object is not signed at all HOT 1
- framework import by apple_static_framework_import crashed after update bazel from 5.4.1 to 6.5.0 HOT 3
- Duplicate symbols from apple_static_xcframework
- [Bazel 7] ios_application linking issue - "Could not find or use auto-linked framework" HOT 3
- [Bazel CI] Rule fails to build with error: 'struct' value has no field or method 'to_json' HOT 2
- `target_compatible_with` appears to be broken in Bazel 7.x
- `security` tool fails when codesigning with 3.5.0 HOT 2
- Support extension blocks in DocC rule
- Question: data attribute for macos_command_line_application or alternative
- Unable to nest app bundles within a macos_application
- How should I build a Network Extension about Xcode HOT 4
- Generated XCFramework fails on Xcode 15.3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_apple.