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 {
7171 See https://book.swiftwasm.org/getting-started/setup.html for more information.
7272 """
7373 } ) ,
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+ } ) ,
7495 ]
7596
7697 private func emitHintMessage( _ message: String ) {
You can’t perform that action at this time.
0 commit comments