Blacklisting your own faulty hackage release

2020-07-02 05:41发布

问题:

I've accidentally uploaded a faulty distribution and tried to reupload it right away, but cabal replied with:

This version of the package has already been uploaded.

As a matter of policy we do not allow package tarballs to be changed after a
release (so we can guarantee stable md5sums etc). The usual recommendation is
to upload a new version, and if necessary blacklist the existing one. In
extraordinary circumstances, contact the administrators.

Okay, I've incremented the version and uploaded the correct distro, but now I am interested in blacklisting the faulty release, as suggested. However there is no notion about how to do that anywhere whatsoever. How to do that? And what do they actually imply by the term "blacklisting"?

回答1:

Go to your package page on Hackage. Scroll down to Maintainers' corner and click on edit package information. Then you'll have an option to click on Preferred versions.

This page allows you to specify version ranges or deprecate individual package versions.

Deprecated versions won't be completely gone, but cabal-install will try to respect the preferences when trying to resolve dependencies.