tfwright / live_admin

Low-config admin UI for Phoenix apps, built on LiveView
MIT License
251 stars 22 forks source link

Complitation warnings #36

Closed Rio517 closed 1 year ago

Rio517 commented 1 year ago

Is your feature request related to a problem? Please describe. When compiling on phoenix_live_view 0.18.18 and latest phoenix, I get the following warnings:

warning: attribute "as" in component Phoenix.Component.form/1 must be an :atom, got: "session"
  lib/live_admin/components/session/content.ex:17: (file)

warning: undefined attribute "phx_submit" for component Phoenix.Component.form/1
  lib/live_admin/components/session/content.ex:17: (file)

warning: attribute "as" in component Phoenix.Component.form/1 must be an :atom, got: "params"
  lib/live_admin/components/resource/form.ex:59: (file)

warning: undefined attribute "phx_change" for component Phoenix.Component.form/1
  lib/live_admin/components/resource/form.ex:60: (file)

warning: undefined attribute "phx_submit" for component Phoenix.Component.form/1
  lib/live_admin/components/resource/form.ex:61: (file)

warning: undefined attribute "phx_target" for component Phoenix.Component.form/1
  lib/live_admin/components/resource/form.ex:62: (file)
tfwright commented 1 year ago

Thanks for reporting this. Can you list the exact versions of Phoenix and LiveAdmin you are using?

Rio517 commented 1 year ago

Sorry. Info below. Also, for clarity I cleared my _build and recompiled, and was able to reliably reproduce.

erlang 25.3 elixir 1.14.4 Liveadmin: "0.8.0", "phoenix": "1.7.2" "phoenix_ecto": "4.4.1" "phoenix_html": "3.3.1" "phoenix_live_dashboard": "0.7.2" "phoenix_live_reload": "1.4.1" "phoenix_live_view": "0.18.18" "phoenix_pubsub": "2.1.2" "phoenix_swoosh": "1.2.0" "phoenix_template": "1.0.1" "phoenix_view": "2.0.2" "plug": "1.14.2" "plug_cowboy": "2.6.1"

tfwright commented 1 year ago

Hm right now the project is locked to LV 0.18.18 and phx 1.7.3 and I can't seem to reproduce those warnings, although they make sense based on what I am seeing in the docs. I am wondering if the warnings are new to elixir 1.14, which I am not running currently in docker due to an issue building on M1s. If you have some time, can you could try downgrading elixir just to confirm that is the issue? Thanks 🙏

Rio517 commented 1 year ago

Hey, I just checked. Downgrading to:

erlang 25.3
elixir 1.13.4-otp-25

Does indeed resolve the compilation warnings.

tfwright commented 1 year ago

OK, I will see if I can try to configure CI to catch those, otherwise I will probably hold off on fixing those until I can get 1.14 working in my dev env.

Thanks again for checking into that!

Rio517 commented 1 year ago

FYI, It might be a long time before the build issues are resolved... https://elixirforum.com/t/cross-compiling-a-release-with-apple-m1-and-docker/55615/3 Seems like the QEMU community is saying that it is not possible.