Mix dependency version mismatch

Hello,

I have a Phoenix v1.6.10 application which has a few other dependencies e.g. Ecto, Jason, cowboy, floki etc. Nothing too fancy.

I wanted to try out Pardall Markdown (GitHub - alfredbaudisch/pardall_markdown: Reactive publishing framework, filesystem-based with support for Markdown, nested hierarchies, and instant content rebuilding. Written in Elixir.) as a CMS for articles and documentation on my site. When I add the dependency config to mix.exs and try to mix deps.get there’s an error that floki version required by pardall_markdown (~> 0.31.0) is incompatible with the one in my project mix.lock (~> 0.33.1).
I can downgrade the floki version for my project, I guess. Or I can fork Pardall and bump the dep in my forked version. Neither seems ideal, because the changelog for floki doesn’t look drastic between 0.31 and 0.33. I don’t think it will cause any issues.
I’d like to know if there’s an easier way to bump the version required for Pardall? What’s the best practice here? I can submit a PR to officially bump the floki version on Pardall once I’ve checked it works with 0.33. Should I just clone it and run a local version for now to test it out?

You can pass override: true to the definition for floki in your deps - this tells Mix “don’t worry, I know what I’m doing”

1 Like