You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Libraries across the ASWF should not have to be modified, or modified very minimally - figure out a way (perhaps through the usage of git submodules) or Swift package plugins, so that our (or the Swift Working Group) changes are very minimal, we want to ensure we are shipping as close to the official libraries as we can.
In the end it is our preference that the code we maintain is just the Swift code and/or Swift extensions of these C and C++ ASWF projects.
It appears the best way to do this is what we would like to call SPM Jiu-Jitsu
The steps are as follows.
Say you have a Swift target named "CXXLibrary"
.target(
name:"CXXLibrary",
dependencies:[])
This library failed to build because it contains a header file called CXXLibraryConfig.h.in, but the source code is attempting to find a file called CXXLibraryConfig.h, a frequent problem when escaping a build system like CMake! Unfortunately SwiftPM is unable to generate files, even SwiftPM build plugins do not support the generation of files that are *.h or *.cpp as they only support the generation of *.swift files. The solution here, is to introduce this file manually in its own isolated swift target, and provide it as a dependency of "CXXLibrary".
Now "CXXLibrary" can remain unmodified - in the case of the SWG this is to ensure we can pull the official source code in the form of submodules without having to make edits across the ASWF projects.
Important
The Jiu-Jitsu part of this equation is the complexity increases substantially when there are source files that need to be edited, say; in the case that a *.mm file uses retain and release calls which ARC explicitly forbids (we will exclude them from the official CXX target) but we will (re)provide the offending source with any necessary modifications needed to compile in their own isolated Swift targets.
Libraries across the ASWF should not have to be modified, or modified very minimally - figure out a way (perhaps through the usage of git submodules) or Swift package plugins, so that our (or the Swift Working Group) changes are very minimal, we want to ensure we are shipping as close to the official libraries as we can.
In the end it is our preference that the code we maintain is just the Swift code and/or Swift extensions of these C and C++ ASWF projects.
SWG proposal pending.
The text was updated successfully, but these errors were encountered: