Publish a hex package with a dependent RC package version

I want to publish my hex package which I want to work with Phoenix 1.3-rc and also Phoenix 1.2.

I have in my deps:

{:phoenix, "~> 1.2.0-rc"}

However, when I try to publish the package I get the following error:

** (Mix) A stable package release cannot have a pre-release dependency.

I think it must be possible as I see that this phoenix-slime has achieved this and published it as version 0.9.0

1 Like

The constraint that stable packages cannot depend on non-stable dependencies is a somewhat new addition to Hex client, phoenix_slime must have been published before the change took place.

You can see the rationale behind the change in [1] (and associated issue). You’d need to publish your package as unstable.


Thanks @wojtekmach. I will publish a stable version of my package for Phoenix 1.2 and an unstable one for Phoenix 1.3-rc