Skip to content

LiveView 0.18 not supported #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
moogle19 opened this issue Sep 27, 2022 · 6 comments
Closed

LiveView 0.18 not supported #31

moogle19 opened this issue Sep 27, 2022 · 6 comments

Comments

@moogle19
Copy link

LiveView 0.18 moved the sigil_H/2 macro from Phoenix.LiveView.Helpers to Phoenix.Component.
This is used in the __using__ macro of Desktop.Menu.

@adamwight
Copy link
Contributor

Found the same thing, trying to use the development head of desktop in the example app.

== Compilation error in file lib/todo_app/menu_bar.ex ==
** (CompileError) lib/todo_app/menu_bar.ex:7: cannot import Phoenix.LiveView.Helpers.sigil_H/2 because it is undefined or private
    (elixir 1.13.4) src/elixir_import.erl:91: :elixir_import.calculate/6
    (elixir 1.13.4) src/elixir_import.erl:22: :elixir_import.import/4
    (desktop 1.4.1) expanding macro: Desktop.Menu.__using__/1
    lib/todo_app/menu_bar.ex:7: TodoApp.MenuBar (module)
    (elixir 1.13.4) expanding macro: Kernel.use/1
    lib/todo_app/menu_bar.ex:7: TodoApp.MenuBar (module)

@adamwight
Copy link
Contributor

adamwight commented Sep 28, 2022

It might help to set up two CI jobs, one for the oldest stable versions, and another for the latest. I use a configuration like this for an unrelated elixir library.

Proof of concept in #32

@bkono
Copy link

bkono commented Mar 30, 2023

FWIW, getting compatible with LiveView 0.18.x (and phx 1.7) is a fairly light lift (if you're not worrying about backwards compatibility). This was all I needed to be able to start using it in a fresh phx.new 1.7 app. The desktop-example didn't need much more either, though there's a number of warning cleanups and additional changes worth making beyond the minimum.

@dominicletz Is this project still active? If so, do you have any suggestions on how to make these changes backwards compatible? Would be happy to PR something if I can do it without breaking existing codebases.

@dominicletz
Copy link
Collaborator

dominicletz commented Apr 3, 2023

Definitely active and in use, the backwards compatible move is a good question...

@dominicletz
Copy link
Collaborator

This has been fixed 1.4.4 -- Please have a look if that version works for you. It's using a conditional compile check for backwards compilation.

@bkono
Copy link

bkono commented Apr 4, 2023

Perfect, latest updates worked for me. Thanks for getting that updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants