Publishing a pre-release library that depends on another pre-release library

I’ll be publishing quite a few updates to the ex_cldr libraries in a couple of weeks to coincide with the release of CLDR 43.

I’d like to publish release candidates first like {:ex_cldr, "~> 2.37.0-rc.0"} but I’m always tripped up by hex.pm disallowing other libraries to be published that depend on pre-releases/release candidates.

I’ve not been able to find the docs that state the “rules” definitively. But I do wonder if one pre-release library is allowed to depend on another pre-release library. For example {:ex_cldr_numbers, "2.31.0-rc.0"} could depend on {:ex_cldr, "~> 2.37.0-rc.0"}. Possible?

I’m happy to try it out, but if its not permitted I’ll end up with a published release candidate of ex_cldr that is of no use to anyone and I’d like to avoid that.

Anyone have a link to the definite rules? Or at least know if what I want to do is possible?

3 Likes

As it currently works pre-release packages can have pre-release dependencies. The next hex release will no longer do any pre-release checks because it’s no longer necessary with the new solver and improvements in how we display the chosen dependency versions. So you will be able to publish packages with pre-release dependencies regardless of the package version.

4 Likes

Just glancing through the hex source code here, it seems like only private repos can circumvent this but not hex.pm-hosted packages.

1 Like