swiftlang/swift-syntax

How to import macros using methods other than SPM

Closed this issue · 4 comments

Description

I'm trying to import macro functionality using CocoaPods, but Xcode is giving an error:

External macro implementation type 'XXX' could not be found for macro 'XXX'; the type must be public and provided by a macro target in a Swift package, or via '-plugin-path' or '-load-plugin-library'. 

I haven't found any articles about '-plugin-path' or '-load-plugin-library
How can I resolve this?

I see that you also posted this question on the Swift forums. Does the solution suggested there work? https://forums.swift.org/t/how-to-import-macros-using-methods-other-than-spm/66645/2

Tracked in Apple’s issue tracker as rdar://113567662

I see that you also posted this question on the Swift forums. Does the solution suggested there work? https://forums.swift.org/t/how-to-import-macros-using-methods-other-than-spm/66645/2

It seems ineffective; macro expansion has already been achieved, but compilation still results in errors.
image

Since this is most certainly a configuration problem with CocoaPods and not a swift-syntax bug, let’s continue discussing it in the forums.