-
-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separately named modules for Sentry with and without UIKit #4086
Comments
We're looking into it, no ETA though. |
Hi @mike-at-home , thanks for reporting. We built this special compilation mode specifically for FileProvider extensions which cannot link UIKit. So I guess that if you are delivering such an extension, that your total build process is building regular Sentry (with UIKit) for your app, and then Sentry-without-UIKit for your extension, and because they wind up with the same name, the collision breaks things. When we set up this new config, I tried creating a test FileProvider extension, but never was able to get it to work. Would you by any chance be able to provide a test project that tests such an integration? In any case, I think that if we just change the module name setting from this: |
Something along those lines should resolve the issue. If the resulting zips can be extracted side by side (ie don't have conflicting Sentry.framework folders) then I think we're good. Yes, I'm working on Dropbox's codebase which has a file provider. Currently, since we're building both Sentry targets from source, the modules were able to be named separately. But now I'm trying to replace that with the released binaries, so the same flexibility isn't there. I've never made a file provider project. It's my understanding that it simply cannot link or access UI things. I think you can approximate the same effect by making a command line Mac project. (FWIW, in an ideal world, it'd be great to have a core Sentry module and then have the UIKit one depend on that, if possible, but this works well enough right now) |
Absolutely agreed there. See #3219 |
Hi @mike-at-home, I spoke with @aaronsky and we looked at a couple things, including a test project going: https://github.com/armcknight/sentry-cocoa-bazel But before that is even useful, I need to fix the module issue you all are having. He showed me a commit you made on your fork: mike-at-home@fad4f5d I've made the changes I described here in #4140, which wound up breaking things and I've tried to make a few fixes, including renaming Debug_without_UIKIt to DebugWithoutUIKit (and likewise for its release counterpart) due to underscores not being valid in some of the other build settings I'm using that naming scheme in, but can't fully get the build to work again for those configs. Currently hitting this kind of error:
Looking at your commit, it looks like you might've already solved this module issue, because you moved on to importing the generated -Swift.h header file. When I look in my build products, there are only a couple things missing: SentryWithoutUIKit-Swift.h, the Sentry.framework/Modules/Sentry.swiftmodule directory (which should be named SentryWithoutUIKit.swiftmodule, I guess), and the binary itself. Did you make any other changes to the build to get that working? |
Left you a patch on the PR to try. Works in the Sentry xcodeproj in my own testing, though may be onerous for y'all to have to maintain two umbrella headers (maybe good motivation to break out the UIKit bits from Sentry-Core? 🙏🏼) |
this has been fixed via #4140 - the fix is included in release 8.30.1 |
I heard from another customer that this doesn't quite fix the issue in all cases:
They are using a niche build system that we don't officially support, but I just wanted to add that as context. I'm not sure what other build systems are affected, since I did not observe that problem in my test project at https://github.com/armcknight/sentry-cocoa-bazel, which uses Bazel to manage the target builds, and Carthage to bring in Sentry as a dependency. |
@armcknight the issue we were running into was under the Xcode Build System (building with Buck or Bazel each work fine). Under Xcode for an app that links Sentry and has an extension that links -WithoutUIKit, both frameworks are being copied into the same intermediate directory, which causes the |
Problem Statement
I'm having some difficulty migrating our build to use both of the binary released sentry-cocoa frameworks (Sentry and Sentry-WithoutUIKitOrAppKit)
The framework without UIKit has the same module name as the one with. I'm not entirely sure if it's possible to get it working with our build system, but I've spent enough time to say that diagnosing why it's not working is difficult enough without the duplicate names.
Would it be possible to get a "no-UIKit" release with a distinct module name or separate out the UIKit in a different way?
Thanks!
Solution Brainstorm
No response
Are you willing to submit a PR?
No response
┆Issue is synchronized with this Jira Improvement by Unito
The text was updated successfully, but these errors were encountered: