SwiftGenPlugin
SwiftGenPlugin copied to clipboard
Swiftgen Plugin not working on Xcode 14 release
Hi,
After adding the plugin on Build Tool Plug-ins list, I got this error:
/Applications/xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -L /Applications/xcode/Xcode.app/Contents/PlugIns/IDESwiftPackageCore.framework/Versions/A/Frameworks/SwiftPM.framework/SharedSupport/PluginAPI -lPackagePlugin -Xlinker -rpath -Xlinker /Applications/xcode/Xcode.app/Contents/PlugIns/IDESwiftPackageCore.framework/Versions/A/Frameworks/SwiftPM.framework/SharedSupport/PluginAPI -target arm64-apple-macos11.0 -sdk /Applications/xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -g -swift-version 5 -package-description-version 5.6.0 -I /Applications/xcode/Xcode.app/Contents/PlugIns/IDESwiftPackageCore.framework/Versions/A/Frameworks/SwiftPM.framework/SharedSupport/PluginAPI -sdk /Applications/xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -parse-as-library -Xfrontend -serialize-diagnostics-path -Xfrontend /Users/dev/Library/Developer/Xcode/DerivedData/myapp-fqueqazieqrgeqgspvpslhqtdqoi/SourcePackages/plugins/SwiftGenPlugin.dia /Users/dev/Library/Developer/Xcode/DerivedData/myapp-fqueqazieqrgeqgspvpslhqtdqoi/SourcePackages/checkouts/SwiftGenPlugin/Plugins/SwiftGenPlugin/Plugin.swift -o /Users/dev/Library/Developer/Xcode/DerivedData/myapp-fqueqazieqrgeqgspvpslhqtdqoi/SourcePackages/plugins/SwiftGenPlugin
[debug]: Compiling plugin to executable at /Users/dev/Library/Developer/Xcode/DerivedData/myapp-fqueqazieqrgeqgspvpslhqtdqoi/SourcePackages/plugins/SwiftGenPlugin
[debug]: Plugin compilation output directory '/Users/dev/Library/Developer/Xcode/DerivedData/myapp-fqueqazieqrgeqgspvpslhqtdqoi/SourcePackages/plugins'
[debug]: Computed hash of plugin compilation inputs: 8badd7b9c3ad0a032ecf9e75df53d16924759b38d35c7d4ffc4e0c199489af43
working directory:
/Users/dev/DEV/myapp
tool mapping:
swiftgen: /Users/dev/Library/Developer/Xcode/DerivedData/myapp-fqueqazieqrgeqgspvpslhqtdqoi/SourcePackages/artifacts/swiftgenplugin/swiftgen.artifactbundle/swiftgen/bin/swiftgen
tool search paths:
/Applications/xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
/Applications/xcode/Xcode.app/Contents/Developer/usr/bin
/Applications/xcode/Xcode.app/Contents/Developer/usr/bin
/bin
/sbin
/usr/bin
/usr/sbin
Plugin doesn't support Xcode projects (it doesn't use the XcodeProjectPlugin library)
How to fix it?
Thanks François
I believe your issue is addressed here: https://github.com/SwiftGen/SwiftGenPlugin/pull/4
I'm using the plugin locally (to avoid High Xcode CPU usage - https://github.com/SwiftGen/SwiftGenPlugin/issues/2) and didn't experience this issue. However, I have another issue in Xcode 14. Seems like the plugin is looking for the swiftgen.yml
config file in BOTH places (target's folder and root). Anyone else experience this issue?
@pchmelar I think your solution is ok, but It has one issue. Use only one configuration location or filter them.