Commit Graph

5 Commits

Author SHA1 Message Date
Richard Wei
0f25f023e8 [Macros] Improve diagnostics for missing macro implementation (#65814)
We should no longer say "macro implementation must be provided via '-load-plugin-library'" as there are multiple ways to pick up a macro dependency. Here's an improved version:

> warning: external macro implementation type 'MissingModule.MissingType' could not be found for macro 'missingMacro1'; the type must be public and provided by a macro target in a Swift package, or via '-plugin-path' or '-load-plugin-library'
2023-05-10 12:05:55 -07:00
Ben Barham
e5a28caa9a [Test] Fix swift_swift_parser feature and use in tests
The macro tests were all using "REQUIRES: OS=macosx" as a proxy for
"have the Swift Swift parser". There was an existing feature for this,
but it was just checking whether the path was passed through. Fix that
to use the same variable as in CMake.

Also remove all extraneous `-I` and `-L` to the host libs in the target
invocations.
2023-04-03 09:25:03 -07:00
Doug Gregor
68b367b266 Disable macros-related tests harder 2023-03-29 16:32:32 -07:00
Doug Gregor
30f17940f9 Require the Swift swift parser for a few tests affected by macros 2023-03-29 16:32:32 -07:00
Doug Gregor
5d5a668e8a [Macros] Don't require a declaration of #externalMacro.
To enable the declaration and use of macros from a newer Swift
compiler, when the standard library is from an older Swift compiler
that doesn't provide a declaration of `externalMacro`, short-circuit
the type-checking of `#externalMacro(module: "A", type: "B")` when it
is used to declare a new macro.
2023-03-10 22:41:20 -08:00