Importing multiple swift bindings modulemap collision
Describe the bug
When Importing two swift frameworks generated via FFI there is a Build error.
Showing Recent Issues
duplicate output file '/include/module.modulemap' on task: ProcessXCFramework /DerivedData/Build/Products/Debug-iphonesimulator/libbdkffi.a ios simulator
Showing Recent Issues
Multiple commands produce '/Build/Products/Debug-iphonesimulator/include/module.modulemap'
Showing Recent Issues
Command: ProcessXCFramework /Build/Products/Debug-iphonesimulator/libportal.a ios simulator
Showing Recent Issues
Command: ProcessXCFramework /Build/Products/Debug-iphonesimulator/libbdkffi.a ios simulator
To Reproduce
Import bdk-swift and some other swift bindings generated the same way
Expected behavior
Build environment
- BDK tag/commit:
- OS+version:
- Rust/Cargo version:
- Rust/Cargo target:
Additional context
Fails using bdk-swift:
Succeeds using bdk-swift:
The other swift bindings I was importing was using uniffi = { version = "0.26.1", optional = true }
The other swift bindings I was importing was using
uniffi = { version = "0.26.1", optional = true }
I tested bumping the other swift bindings I was importing from 0.26.1 to 0.28.0, to match bdk-swift beta 2+5, and the results were the same...
Fails using bdk-swift:
Succeeds using bdk-swift:
I believe I have a fix for this by using a unique subdirectory to prevent collisions. Tested.
This will show up if someone builds their xcframework the same way bdk-ffi does (see our build-xcframework.sh), they will get errors similar to what is seen above.
Closing this because I think this is solved with the referenced https://github.com/bitcoindevkit/rust-cktap/pull/36
But if anyone ever runs into this again (myself included) we can reopen this issue 👍