surface-ui / surface

A server-side rendering component library for Phoenix
https://surface-ui.org
MIT License
2.08k stars 150 forks source link

Installation failed with ash 3.X and igniter 0.3.X #750

Closed ramyma closed 1 month ago

ramyma commented 2 months ago

Describe the bug

I'm trying to add surface to an ash project, when I run mix deps.get or mix igniter.install surface, I get the following error:

Resolving Hex dependencies...
Resolution completed in 0.467s
Because surface >= 0.10.0 and < 0.11.1 depends on sourceror ~> 0.11 and surface >= 0.11.1 and < 0.11.2 depends on sourceror ~> 0.12.0, surface >= 0.10.0 and < 0.11.2 requires sourceror ~> 0.11.
And because surface >= 0.11.2 depends on sourceror ~> 1.0.0, surface >= 0.10.0 requires sourceror ~> 0.11 or ~> 1.0.0.
And because igniter >= 0.2.4 depends on sourceror ~> 1.4, igniter >= 0.2.4 is incompatible with surface >= 0.10.0.
And because your app depends on igniter ~> 0.3, surface >= 0.10.0 is forbidden.
So, because your app depends on surface ~> 0.11, version solving failed.
** (Mix) Hex dependency resolution failed

How to reproduce it

  1. Install ash 3.X through igniter 0.3.X

The behavior you expected

Installation should go through with updated dependencies.

Your Environment

Surface: v0.11.X LiveView: v1.0.0-rc.X Elixir: v1.17.2

mudspot commented 1 month ago

@ramyma Just install surface_form from this fork https://github.com/EnaiaInc/surface_form

In your mix.exs, just have {:surface_form, github: "EnaiaInc/surface_form", ref: "489e0cad5b5b910d82bb7705968e74b4671ab911"} without any reference to surface

The surface_form will auto install the latest surface version (0.11.5) as a dependency.

mudspot commented 1 month ago

To add on, I have is my mix.exs ... {:phoenix_live_view, "~> 1.0.0-rc.6", override: true}, {:ash_postgres, "~> 2.1"}, {:surface_form, github: "EnaiaInc/surface_form", ref: "489e0cad5b5b910d82bb7705968e74b4671ab911"}, ...

The ash_postgres auto install lastest ash, which the surface_form auto install latest ash for me.

tiagoefmoraes commented 1 month ago

@ramyma this was fixed in https://github.com/surface-ui/surface/commit/8492e5ec463523fdd4dc9436612fe44b389d2f07 As a quick fix you can add to your mix.exs deps {:sourceror, "~> 1.4", override: true}