Open DougGregor opened 6 months ago
Given a macro declaration like:
@freestanding(expression) macro stringify(_ value: Int) -> (Int, String) = #externalMacro(module: "MyMacros", type: "StringifyMacro")
Introduce a code action "Add macro implementation" that stubs out the implementation of this macro so it's ready to go in your project.
Ideally, this would do a couple of things:
MyMacros
stringify
StringifyMacro.swift
StringifyMacro
ExpressionMacro
Synced to Apple’s issue tracker as rdar://128016679
Hi @ahoppen! Could you assign this to me, please?
Description
Given a macro declaration like:
Introduce a code action "Add macro implementation" that stubs out the implementation of this macro so it's ready to go in your project.
Ideally, this would do a couple of things:
MyMacros
to the package manifest if it isn't thereMyMacros
as a dependency for the current target (that contains thisstringify
macro declaration) if it isn't thereStringifyMacro.swift
to theMyMacros
target with aStringifyMacro
that includes a stubbed-out conformance toExpressionMacro
MyMacros
withStringifyMacro