We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fbc9e5c + 6c459f2 commit 4a58104Copy full SHA for 4a58104
Sources/SwiftCompilerPlugin/CompilerPlugin.swift
@@ -96,7 +96,12 @@ extension CompilerPlugin {
96
}
97
98
99
- let pluginPath = CommandLine.arguments.first ?? "<unknown>"
+ let pluginPath: String
100
+ if CommandLine.argc > 0, let cPluginPath = CommandLine.unsafeArgv[0] {
101
+ pluginPath = String(cString: cPluginPath)
102
+ } else {
103
+ pluginPath = "<unknown>"
104
+ }
105
throw CompilerPluginError(
106
message:
107
"macro implementation type '\(moduleName).\(typeName)' could not be found in executable plugin '\(pluginPath)'"
0 commit comments