Open winsmith opened 4 months ago
Hi @winsmith. It's not the problem with macro but Xcode. On CIs Xcode is validating macro fingerprint but we didn't find a way to add such a fingerprint. So what we did is turn off checking of macro fingerprints like (as a initial step for a pipeline):
defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
Thanks a lot but -- I'm not building with the xcodebuild command on a Mac, but with swift build
/ swift test
on linux (this is a Vapor app). Any idea how I can pass the skipPackagePluginValidation
or something similar ? Googling has not brought up anything helpful so far
Oh, I'm sorry. I was too quick with my reasoning. We have never tested swift macros on Linux build. What is fishy for me is that in your output there is an error about Rosetta. Why would your Linux build require Rosseta? Maybe that's the issue, not swift macro itself.
@winsmith Do you still have problems with building our macro on CI or we can close the issue?
Hello, I'm getting a similar error from Github actions but locally works well, in my case I'm using Fastlane
`[19:51:32]: ▸ Linking XCTestParametrizedMacro
[19:51:36]: ▸ ❌ /Users/automation/actions-runner2/_work/vri-ios/vri-ios/build/SourcePackages/checkouts/XCTestParametrizedMacro/Sources/XCTestParametrizedMacroClient/main.swift:21:10: external macro implementation type 'XCTestParametrizedMacroMacros.ParametrizeMacro' could not be found for macro 'Parametrize(input:output:)' [19:51:36]: ▸ func testPow2(input n: Int, output result: Int) {
[19:51:36]: ▸ ^
[19:51:36]: ▸ ❌ /Users/automation/actions-runner2/_work/vri-ios/vri-ios/build/SourcePackages/checkouts/XCTestParametrizedMacro/Sources/XCTestParametrizedMacroClient/main.swift:26:10: external macro implementation type 'XCTestParametrizedMacroMacros.ParametrizeMacro' could not be found for macro 'Parametrize(input:output:)'
[19:51:36]: ▸ func testWordLength(input word: String, output length: Int) {
[19:51:36]: ▸ ^
[19:51:36]: Running Tests: ▸ Touching XCTestParametrizedMacro.framework (in target 'XCTestParametrizedMacro' from project 'XCTestParametrizedMacro')
[19:51:36]: ▸ BUILD FAILED
[19:51:36]: ▸ The following build commands failed:
[19:51:36]: ▸ SwiftEmitModule normal arm64 Emitting\ module\ for\ XCTestParametrizedMacroClient (in target 'XCTestParametrizedMacroClient' from project 'XCTestParametrizedMacro')`
I'm trying to compile and test a Swift Project that includes XCTestParametrizedMacro. While it compiles and runs correctly on my Mac, it fails to compile inside various CI environments I'm trying this out on.
I'm always getting an error message compiling the Test target that ends in "compiler plugin not loaded".
Any ideas how to make this work?
Here's the full part of the log for building the tests just in case. This is run on an M1 Mac mini.