liveview-native / liveview-client-swiftui

MIT License
375 stars 37 forks source link

[Bug]: parse error #1467

Open mayel opened 2 days ago

mayel commented 2 days ago

What happened?

With this SwiftUI code rendered in browser:

<!-- <Bonfire.UI.Common.LayoutView.SwiftUI.root> lib/layout/root.swiftui.neex:2 (bonfire_ui_common) --><!-- @caller lib/layout/root.swiftui.neex:1 (bonfire_ui_common) --><!-- <LiveViewNative.Component.csrf_token> lib/live_view_native/component.ex:244 (live_view_native) --><csrf-token value="DgoIAQo5KgBSGVEQGQV0cno-AyNfGjcfmFenUiXX1mbtmHDCCPla87YX"></csrf-token><!-- </LiveViewNative.Component.csrf_token> -->
<Style url="/assets/app.swiftui.styles"></Style>
<NavigationStack>
<div id="phx-F_x7L7SvBMTG_pBh" data-phx-main data-phx-session="SFMyNTY.g2gDaAJhBXQAAAAIdwJpZG0AAAAUcGh4LUZfeDdMN1N2Qk1UR19wQmh3B3Nlc3Npb250AAAAAHcEdmlld3cbRWxpeGlyLkJvbmZpcmUuV2ViLkhvbWVMaXZldwpwYXJlbnRfcGlkdwNuaWx3BnJvdXRlcncZRWxpeGlyLkJvbmZpcmUuV2ViLlJvdXRlcncJcm9vdF92aWV3dxtFbGl4aXIuQm9uZmlyZS5XZWIuSG9tZUxpdmV3CHJvb3RfcGlkdwNuaWx3DGxpdmVfc2Vzc2lvbmgCdwdkZWZhdWx0bggAAJMa-pd5_BduBgD26y1skgFiAAFRgA.diI8SXHTgoi2HkfA2ZVhkXeVMzy0fNPghMpYqg-S2R4" data-phx-static="SFMyNTY.g2gDaAJhBXQAAAADdwJpZG0AAAAUcGh4LUZfeDdMN1N2Qk1UR19wQmh3CmFzc2lnbl9uZXdsAAAAAXcLX19jb250ZXh0X19qdwVmbGFzaHQAAAAAbgYA9ustbJIBYgABUYA.yW2TlpDckOWxGDDLBXrB6urfNb74JQhco5A0_wFXt_w"><!-- <Bonfire.UI.Common.LayoutView.SwiftUI.app> lib/layout/app.swiftui.neex:2 (bonfire_ui_common) --><!-- @caller lib/layout/app.swiftui.neex:1 (bonfire_ui_common) --><!-- <Bonfire.UI.Common.CoreComponents.SwiftUI.flash_group> lib/components/core_components.swiftui.ex:411 (bonfire_ui_common) --><Group id="flash-group">
  <!-- @caller lib/components/core_components.swiftui.ex:413 (bonfire_ui_common) --><!-- <Bonfire.UI.Common.CoreComponents.SwiftUI.flash> lib/components/core_components.swiftui.ex:381 (bonfire_ui_common) -->
<!-- </Bonfire.UI.Common.CoreComponents.SwiftUI.flash> -->
  <!-- @caller lib/components/core_components.swiftui.ex:414 (bonfire_ui_common) --><!-- <Bonfire.UI.Common.CoreComponents.SwiftUI.flash> lib/components/core_components.swiftui.ex:381 (bonfire_ui_common) -->
<!-- </Bonfire.UI.Common.CoreComponents.SwiftUI.flash> -->
</Group><!-- </Bonfire.UI.Common.CoreComponents.SwiftUI.flash_group> -->
<!-- <Bonfire.Web.HomeLive.SwiftUI.render> lib/web/views/home_live.swiftui.neex:5 (bonfire) --><VStack>

      <Image name="bonfire-icon"></Image>

  <Text>
    Hello Bonfire native beta 2!
  </Text>

</VStack><!-- </Bonfire.Web.HomeLive.SwiftUI.render> --><!-- </Bonfire.UI.Common.LayoutView.SwiftUI.app> --></div>
</NavigationStack><!-- </Bonfire.UI.Common.LayoutView.SwiftUI.root> -->

I get this error in XCode: The operation couldn’t be completed. (Parsing.ParsingError error 0.)

Library Version

0.3.1

Xcode Version

16

Swift Version

swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)

On which device or simulator are you running into the problem?

MacOS

Target Device Operating System Version

15.0.1

Relevant log output

No response

mayel commented 2 days ago

solved it by fixing rendering of the stylesheet, some indication that the error was linked to the stylesheet rather than the view may be handy for the next person?