Now when I run the tests in Xcode all green. Running swift test from commandline give weird error
Building for debugging...
duplicate symbol '_async_MainTu' in:
X/.build/arm64-apple-macosx/debug/<#plugin#>.build/Coder.swift.o
C/.build/arm64-apple-macosx/debug/configurator.build/Configurator.swift.o
ld: 1 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[1766/1767] Linking packageTests
error: fatalError
There were some fixes recently regarding plugin dependency trees being linked into the final binary which could be the cause of this issue. I'd suggest using swift 5.9 and updating the tools version in your packages to match.
Thank you should have clarified. I tested it with swift version 5.9 but in package.swift it is 5.7. I changed it to 5.9 as you suggested.
This did change the output so I can confirm that the initial problem with actually running the plugin is fixed. However there seams to be still a problem as the generated code of X and C does not link.
Resulting in error output like this
_symbolic _____ 19PluginX14V in Pluglin.swift.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Unfortunately I cannot share the code as it is proprietary but as the project builds in xcode just fine it seams there is a problem still in swift 5.9?
As for me I'm in removing the plugin from one of the targets and generated the code before building for that target. This resolves the issue but is inconvenient.
So I hope this super awesome feature of plugins still gets some love and will happily test again if there is a fix.