Hi, there is something new with the version of Swi...
# compiler
f
Hi, there is something new with the version of Swift embedded by Xcode 26, used by cinterop. The modulemap needed by cinterop has moved inside another folder (a new include folder instead of the root folder). The required -fmodules flag doesn’t work, it doesn’t found the expected module anymore. I’m looking inside the llvm documentation about fmodules customization, but I don’t know if it’s working (FYI: kotlin 2.2.20 or ealier)
d
cc @svyatoslav.scherbina
s
Hi. What is the problem exactly? Like, do you get an error? What error in that case?
f
Hi, I'm the maintainer of spm4Kmp, I'm using SPM to export Swift Compatîble file to Kotlin with cinterop. The plugin uses the swift SPM command line feature unlike CocoaPods uses the Xcode ones (there are not exactly working the same way). There is a breaking change in the latest version (6.2) of swift embedded by Xcode 26.
The plugin (and cinterop) are looking after the module map file to import the expected content.
before Xcode 26, the file is located at the root of the swift build product, but now it's inside a new folder, the include directory
So, now, cinterop apparently can't find the expected module with the explicit error (can't find the module for ...)
is there a way to specify the path to the modulemap file inside the .def file ?
s
You can try
compilerOpts = -fmodule-map-file=path
. Does it work?
f
I will try ASAP
no this is not working
I’m not sure about this old issue is the reason
s
Please create a new issue.
👍 1