tfwright / live_admin

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

fails to compile #39

Closed pyladune closed 1 year ago

pyladune commented 1 year ago

Describe the bug

== Compilation error in file lib/live_admin/view.ex == ** (CompileError) lib/live_admin/view.ex:4: module Phoenix.View is not loaded and could not be found (elixir 1.14.4) expanding macro: Kernel.use/2 lib/live_admin/view.ex:4: LiveAdmin.View (module)

Brand new app generated by mix phx.new and gen.auth phoenix 1.7.5, liveview 0.19.2

tfwright commented 1 year ago

Which version of LiveAdmin are you using?

pyladune commented 1 year ago

with 0.7.2 deps.get works but it fails to compile with 0.8 deps.get fails

Because your app depends on live_admin ~> 0.8.0 which depends on phoenix_live_view ~> 0.18.3, phoenix_live_view ~> 0.18.3 is required.
So, because your app depends on phoenix_live_view ~> 0.19.0, version solving failed.
tfwright commented 1 year ago

Are you able to use 0.7.3? I think this particular issue should be fixed there. See https://elixirforum.com/t/liveadmin-phoenix-admin-ui-built-on-liveview/46421/19?u=tfwright

But I will also look into loosening the dep requirement in .8, since I expect it should work fine with live view .19

pyladune commented 1 year ago

0.7.3 also fails with liveview 0.19 so for now, last possible liveview is 0.18.3

tfwright commented 1 year ago

It didn't look like there should be any breaking changes in 0.19 so I have bumped the version in main. After I've had a chance to do a bit more testing I will backport that upgrade to 0.7.x and 0.8.x. In the meantime you can try locking to 3adc9a6c09483838244f483a9ca3f0b9e421e8e2 but there are various changes still in dev there so I can't guarantee it's stable.

tfwright commented 1 year ago

Resolved in https://github.com/tfwright/live_admin/commit/3adc9a6c09483838244f483a9ca3f0b9e421e8e2