File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Plugins/PackageToJS/Sources Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,27 @@ struct PackageToJSPlugin: CommandPlugin {
71
71
See https://book.swiftwasm.org/getting-started/setup.html for more information.
72
72
"""
73
73
} ) ,
74
+ (
75
+ // In case the SwiftPM target using BridgeJS didn't specify `.enableExperimentalFeature("Extern")`
76
+ { build, arguments in
77
+ guard
78
+ build. logText. contains ( " @_extern requires '-enable-experimental-feature Extern' " )
79
+ else {
80
+ return nil
81
+ }
82
+ return """
83
+ The SwiftPM target using BridgeJS didn't specify `.enableExperimentalFeature( " Extern " )`.
84
+ Please add it to the target's `swiftSettings` configuration.
85
+
86
+ For example:
87
+ ```swift
88
+ dependencies: [...],
89
+ swiftSettings: [
90
+ .enableExperimentalFeature( " Extern " ),
91
+ ]
92
+ ```
93
+ """
94
+ } ) ,
74
95
]
75
96
76
97
private func emitHintMessage( _ message: String ) {
You can’t perform that action at this time.
0 commit comments