Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[BridgeJS] Optionals cause build error with Embedded Swift #689

Copy link
Copy link
@sliemeobn

Description

@sliemeobn
Issue body actions

Optionals seem broken when built for Embedded (with recent 6.3 Embedded SDK)

eg:

@JSSetter public func setTextContent(_ value: String?) throws(JSException)
// or
@JSSetter public func setOnfinish(_ callback: JSObject?) throws(JSException)

build fine for "full Swift" but fail to compile for Embedded

/Users/simon/dev/elementary-swift/elementary-ui/Sources/BrowserInterop/Generated/BridgeJS.swift:411:29: error: cannot use conformance of 'Optional<Wrapped>' to '_BridgedAsOptional' here; the conformance is declared as SPI in 'JavaScriptKit'
 409 |         throw error
 410 |     }
 411 |     return Optional<String>.bridgeJSLiftReturnFromSideChannel()
     |                             `- error: cannot use conformance of 'Optional<Wrapped>' to '_BridgedAsOptional' here; the conformance is declared as SPI in 'JavaScriptKit'
 412 | }
 413 | 

/Users/simon/dev/elementary-swift/elementary-ui/Sources/BrowserInterop/Generated/BridgeJS.swift:642:29: error: cannot use conformance of 'Optional<Wrapped>' to '_BridgedAsOptional' here; the conformance is declared as SPI in 'JavaScriptKit'
 640 |         throw error
 641 |     }
 642 |     return Optional<String>.bridgeJSLiftReturnFromSideChannel()
     |                             `- error: cannot use conformance of 'Optional<Wrapped>' to '_BridgedAsOptional' here; the conformance is declared as SPI in 'JavaScriptKit'
 643 | }
 644 | 

/Users/simon/dev/elementary-swift/elementary-ui/Sources/BrowserInterop/Generated/BridgeJS.swift:1047:52: error: cannot use conformance of 'Optional<Wrapped>' to '_BridgedAsOptional' here; the conformance is declared as SPI in 'JavaScriptKit'
1045 | func _$JSAnimation_onfinish_set(_ self: JSObject, _ newValue: JSObject?) throws(JSException) {
1046 |     let selfValue = self.bridgeJSLowerParameter()
1047 |     let (newValueIsSome, newValueValue) = newValue.bridgeJSLowerParameter()
     |                                                    `- error: cannot use conformance of 'Optional<Wrapped>' to '_BridgedAsOptional' here; the conformance is declared as SPI in 'JavaScriptKit'
1048 |     bjs_JSAnimation_onfinish_set(selfValue, newValueIsSome, newValueValue)
1049 |     if let error = _swift_js_take_exception() {

/Users/simon/dev/elementary-swift/elementary-ui/Sources/BrowserInterop/Generated/BridgeJS.swift:1557:29: error: cannot use conformance of 'Optional<Wrapped>' to '_BridgedAsOptional' here; the conformance is declared as SPI in 'JavaScriptKit'
1555 |         throw error
1556 |     }
1557 |     return Optional<String>.bridgeJSLiftReturnFromSideChannel()
     |                             `- error: cannot use conformance of 'Optional<Wrapped>' to '_BridgedAsOptional' here; the conformance is declared as SPI in 'JavaScriptKit'
1558 | }
1559 |
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.