Skip to content
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

Can't build Adjust SDK dependency #987

Closed
jflan-dd opened this issue Mar 27, 2024 · 7 comments · Fixed by #1085
Closed

Can't build Adjust SDK dependency #987

jflan-dd opened this issue Mar 27, 2024 · 7 comments · Fixed by #1085
Labels
bug Something isn't working

Comments

@jflan-dd
Copy link
Contributor

When I try to add dependency on https://github.com/adjust/ios_sdk I get this build failure.

/private/var/tmp/_bazel_johnflanagan/b8bc7972ecfebadd8d249c6ec0018f24/execroot/_main/external/rules_swift_package_manager~0.29.1~swift_deps~swiftpkg_ios_sdk/AdjustSdkStatic/module.modulemap:1:18: error: redefinition of module 'AdjustSdk'
framework module AdjustSdk {
                 ^
/private/var/tmp/_bazel_johnflanagan/b8bc7972ecfebadd8d249c6ec0018f24/execroot/_main/external/rules_swift_package_manager~0.29.1~swift_deps~swiftpkg_ios_sdk/ModuleMap/module.modulemap:1:18: note: previously defined here
framework module AdjustSdk {
                 ^
/private/var/tmp/_bazel_johnflanagan/b8bc7972ecfebadd8d249c6ec0018f24/execroot/_main/external/rules_swift_package_manager~0.29.1~swift_deps~swiftpkg_ios_sdk/AdjustSdkStatic/module.modulemap:1:18: error: redefinition of module 'AdjustSdk'
framework module AdjustSdk {
                 ^
/private/var/tmp/_bazel_johnflanagan/b8bc7972ecfebadd8d249c6ec0018f24/execroot/_main/external/rules_swift_package_manager~0.29.1~swift_deps~swiftpkg_ios_sdk/ModuleMap/module.modulemap:1:18: note: previously defined here
framework module AdjustSdk {

I'm not sure how to resolve those errors. The dependency works with vanilla SPM.

Thanks!

@cgrindel cgrindel added the bug Something isn't working label Mar 28, 2024
@cgrindel
Copy link
Owner

rules_swift_package_manager creates modulemaps in certain situations. I suspect that we need to update the logic to check for a modulemap before we create one.

@jflan-dd
Copy link
Contributor Author

@cgrindel creating a patch file to delete the ModuleMap folder at the root of https://github.com/adjust/ios_sdk resolves the issue for me. I don't see that folder directly referenced in the Package.swift file or the generated BUILD.bazel file, so I'm not sure why it's being included.

@brentleyjones
Copy link
Collaborator

I assume this is covered under the FAQ related to sandboxing?

@jflan-dd
Copy link
Contributor Author

@brentleyjones The only mention of sandboxing I see in the FAQ is related to rules_xcodeproj, but I'm running into this issue with plain bazel build

@brentleyjones
Copy link
Collaborator

Does following the steps (without the rules_xcodeproj part) fix it? I think the modulemap should only be accidentally picked up when sandboxing is disabled.

@brentleyjones
Copy link
Collaborator

@jflan-dd Can you check that #1085 fixes this for you?

@jflan-dd
Copy link
Contributor Author

@brentleyjones The issues appears to be resolved with that fix. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants