i tried following the instructions at
to add a macro to my project. it didn’t work.
error: type 'Target' has no member 'macro'
.macro(name: "InlineASCIIMacro",
~^~~~~
error: type 'Any' has no member 'product'
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
~^~~~~~~
error: type 'Any' has no member 'product'
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
the reason? the Package.swift
was missing the
import CompilerPluginSupport
which is not mentioned anywhere on that TSPL page. it should really mention that?