mhanberg / temple_phoenix

Integrates Temple and Phoenix
MIT License
7 stars 1 forks source link

Compatability issues with latest phoenix version #2

Closed dantheobserver closed 1 year ago

dantheobserver commented 1 year ago

I recently tried to import this dependency using the following deps

  defp deps do
    [
      {:phoenix, "~> 1.7.0"},
      {:phoenix_ecto, "~> 4.4"},
      {:ecto_sql, "~> 3.6"},
      {:postgrex, ">= 0.0.0"},
      {:phoenix_html, "~> 3.3"},
      {:phoenix_live_reload, "~> 1.2", only: :dev},
      {:phoenix_live_view, "~> 0.18.16"},
      {:heroicons, "~> 0.5"},
      {:floki, ">= 0.30.0"},
      {:phoenix_live_dashboard, "~> 0.7.2"},
      {:esbuild, "~> 0.5", runtime: Mix.env() == :dev},
      {:tailwind, "~> 0.1.9", runtime: Mix.env() == :dev},
      {:swoosh, "~> 1.3"},
      {:finch, "~> 0.13"},
      {:telemetry_metrics, "~> 0.6"},
      {:telemetry_poller, "~> 1.0"},
      {:gettext, "~> 0.21.0"},
      {:jason, "~> 1.2"},
      {:plug_cowboy, "~> 2.5"},
      {:bcrypt_elixir, "~> 3.0"},
      {:faker, "~> 0.17.0"},
      {:number, "~> 1.0"},
      {:timex, "~> 3.7"},
      {:dart_sass, "~> 0.5.1", runtime: Mix.env() == :dev},
      {:temple_phoenix, "~> 0.1"}
    ]
  end

and received this error

Resolving Hex dependencies...
#Incompatibility<#Term<your app>, cause: {:conflict, #Incompatibility<#Term<temple_phoenix>, cause: {:conflict, #Incompatibility<#Term<phoenix_live_view >= 0.18.3>, #Term<temple_phoenix>, cause: {:conflict, #Incompatibility<#Term<phoenix_live_view >= 0.18.3>, #Term<not phoenix_view ~> 2.0 (optional)>, cause: :dependency>, #Incompatibility<#Term<temple_phoenix>, #Term<not phoenix_view ~> 1.0 (optional)>, cause: :dependency>}>, #Incompatibility<#Term<your app>, #Term<not phoenix_live_view ~> 0.18.16>, cause: :dependency>}>, #Incompatibility<#Term<your app>, #Term<not temple_phoenix ~> 0.1>, cause: :dependency>}>
Resolution completed in 0.227s
Because phoenix_live_view >= 0.18.3 depends on phoenix_view ~> 2.0 and every version of temple_phoenix depends on phoenix_view ~> 1.0, phoenix_live_view >= 0.18.3 is incompatible with temple_phoenix.
And because your app depends on phoenix_live_view ~> 0.18.16, no version of temple_phoenix is allowed.
So, because your app depends on temple_phoenix ~> 0.1, version solving failed.
mhanberg commented 1 year ago

Thanks for the bug report!

I haven't tried temple with phx 1.7 yet, I'll take a look.

dantheobserver commented 1 year ago

Thanks for looking. I was able to set a value in my deps to force the proper phoenix_view dependency for all, but didn't successfully get it to render.

mhanberg commented 1 year ago

I believe this package may no longer necessary when using a new Phoenix 1.7 application, as it no longer uses Phoenix.View for templates, so you don't even need to include temple_phoenix, just temple in your mix.exs