swift-package-manager: Build tool plugins don't work on Windows
Description
This PR on a minimal project demonstrates. You can see that builds succeed everywhere but Windows.
This is after I’ve worked around the SPM Path
bugs. It complains that it can’t find the executable used by the build tool. Various attempts to fix it by adding .exe
to the path are in the preceding commits on the same branch; none of them worked.
Expected behavior
Project works on Windows just like on Mac and Linux.
Actual behavior
No response
Steps to reproduce
No response
Swift Package Manager version/commit hash
Swift Package Manager - Swift 5.8.1
Swift & OS version (output of swift --version ; uname -a
)
swift-driver version: 1.75.2 Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) Target: arm64-apple-macosx13.0 Darwin DaveA-MBP14.localdomain 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 arm64
About this issue
- Original URL
- State: open
- Created 10 months ago
- Comments: 40 (31 by maintainers)
As shown above I’m seeing the duplicate
main
symbol when linking a test runner that indirectly depends on a macro. I comprehend that macros != plugins but they share the trait that they compile to separate executables not intended to be linked into the test runner. I’ll aim to create a reproducible test repo as soon as possible.