-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Package using external Macros package fails to link Swift-Syntax when unit testing #6940
Comments
… directly to SwiftSyntax (and friends just in case).
Am wondering if this may be to do with mismatched Swift-Syntax version somehow? This project is using Swift-Syntax 509.0.0… 🤷 |
We've run into the same problem with this package. When the To summarize:
|
Likely caused by #6875 |
We should transfer this over to the SwiftPM repo, cc @shahmishal Feels right we really have to do this
Trying to patch the holes in the current logic doesn't seem to work out particularly well... |
Actually if you're seeing this in 5.9.0, it is more likely to be caused by #6726 |
#6714 also made changes in this area... |
In #6726, I discovered that an issue I was fixing for macros and plugins could also apply to executables. That fix was incorrect and would drop legitimate linkage of transitive dependencies when testing executables. The logic here is pretty gnarly, so the most reasonable cause of action seems to be to revert that part of the change. resolves #6940
OK, lots of confusing information I pasted here last week, let's clarify a bit:
|
In #6726, I discovered that an issue I was fixing for macros and plugins could also apply to executables. That fix was incorrect and would drop legitimate linkage of transitive dependencies when testing executables. The logic here is pretty gnarly, so the most reasonable cause of action seems to be to revert that part of the change. resolves #6940
In #6726, I discovered that an issue I was fixing for macros and plugins could also apply to executables. That fix was incorrect and would drop legitimate linkage of transitive dependencies when testing executables. The logic here is pretty gnarly, so the most reasonable cause of action seems to be to revert that part of the change. resolves #6940 (cherry picked from commit 7c1cbeb)
In #6726, I discovered that an issue I was fixing for macros and plugins could also apply to executables. That fix was incorrect and would drop legitimate linkage of transitive dependencies when testing executables. The logic here is pretty gnarly, so the most reasonable cause of action seems to be to revert that part of the change. resolves #6940 (cherry picked from commit 7c1cbeb)
* Update various versions, especially Swift to 5.10 * Use better badges in README * Fix strict concurrency issues * Bump CI version * Correctly work around 5.10's Sendable warnings. * remove workaround for swiftlang/swift-package-manager#6940 * update strict concurrency setting per https://www.swift.org/documentation/concurrency/ --------- Co-authored-by: Gwynne Raskind <[email protected]>
I have a (somewhat experimental) Swift Package ApproximateEquality that exposes a Swift Macro. Everything seems to work fine and the macro works as intended. The macro unit tests all run fine. Yay
I have another project that consumes this package and uses the Macro. It also has a unit test target. This project builds and runs just fine and the unit tests work when run in Xcode. However running the project unit test from the command line via
swift test
causes a link time failure.To reproduce this issue I also added an example project to ApproximateEquality that contains a unit test and this too has the same link time error.
Running on macOS 14 (23A339), using Xcode 15 (15A240d) and swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)
To reproduce:
The log out put looks like (you can also see this failure in the project's GitHub actions: https://github.com/schwa/ApproximateEquality/actions/runs/6215234886/job/16867913735)
The workaround seem to be to make the Example unit test also link to Swift-Syntax which seems unnecessary.
The text was updated successfully, but these errors were encountered: