这种 Canary::Stability 咆哮是合理的担忧吗?

Is this Canary::Stability rant a legitimate concern?

我今天安装了新的 CPAN 模块,结果 JSON::XS 模块显示了它自己的 warning/rant 关于在 5.22 以上的 Perls 中使用它。似乎作者受够了据称在那之后引入 Perl 的向后不兼容的更改,并决定制作一个模块专门警告人们潜在的不兼容,警告 Perl 超过 5.22,并促进 Perl 的一个单独分支致力于稳定性.

作为一个不起眼的普通用户,我不知道我应该有多惊慌。例如:是只有这个 user/module 在抱怨,还是比那个更大? 5.22 之后的 Perl 向后兼容性是否存在已知的严重问题?

我想这是一个有点主观的问题,但作者通过这样做使它成为每个人的问题(或者:使稳定性分支成为每个人的解决方案,取决于你站在哪一边)。由于我需要为我正在进行的大型移植项目选择 Perl 版本,这对我来说是一个非常重要的问题。

这是警告:

Canary::Stability COMPATIBILITY AND SUPPORT CHECK

Hi!

I do my best to provide predictable and reliable software.

However, in recent releases, P5P (who maintain perl) have been introducing regressions that are sometimes subtle and at other times catastrophic, often for personal preferences with little or no concern for existing code, most notably CPAN.

For this reason, it has become very hard for me to maintain the level of reliability and support I have committed myself to in the past, at least with some perl versions: I simply can't keep up working around new bugs or gratituous incompatibilities, and in turn you might suffer from unanticipated problems.

Therefore I have introduced a support and compatibility check, the results of which follow below, together with a FAQ and some recommendations.

This check is just to let you know that there might be a risk, so you can make judgement calls on how to proceed - it will not keep the module from installing or working.

The stability canary says: (nothing, it was driven away by harsh weather)

It seems you are running perl version 5.026000, likely the "official" or "standard" version. While there is nothing wrong with doing that, standard perl versions 5.022 and up are not supported by JSON::XS. While this might be fatal, it might also be all right - if you run into problems, you might want to downgrade your perl or switch to the stability branch.

If everything works fine, you can ignore this message.

Stability canary mini-FAQ:

Do I need to do anything? With luck, no. While some distributions are known to fail already, most should probably work. This message is here to alert you that your perl is not supported by JSON::XS, and if things go wrong, you either need to downgrade, or sidegrade to the stability variant of your perl version, or simply live with the consequences.

What is this canary thing? It's purpose is to check support status of JSON::XS with respect to your perl version.

What is this "stability branch"? It's a branch or fork of the official perl, by schmorp, to improve stability and compatibility with existing modules.

How can I skip this prompt on automated installs? Set PERL_CANARY_STABILITY_NOPROMPT=1 in your environment. More info is in the Canary::Stability manpage.

Long version of this FAQ: http://stableperl.schmorp.de/faq.html Stability Branch homepage: http://stableperl.schmorp.de/

p5p,维护 Perl 的非正式团队,非常重视向后兼容性[1]他们有关于此的正式政策在 perlpolicy.

让我们把 Canary::Stability 放到上下文中。

有问题的作者有许多使用未记录的 Perl 内部结构的模块,这些内部结构可能会发生变化。使用这些内部结构对于实现模块的功能是必要的,但必须意识到这些可能会被破坏。

是的,p5p 以破坏作者模块的方式更改了一些内部结构,但 p5p 会检查 CPAN 上的哪些模块,它们的更改会影响哪些模块,并且 p5p 会在发布新版本的 Perl 之前为受影响的模块提供修复。 [2]

有问题的作者非常难对付,他宁愿花时间表明立场,也不愿维护他的模块或与 p5p 合作以暴露他需要访问的内部结构。

例如,与他打交道的困难导致人们将 JSON::XS 分叉到 Cpanel::JSON::XS。问题之一是他宁愿反对线程也不愿 JSON::XS 线程安全。

例如,CPAN 提供了一种指定错误报告应提交到何处的方法。作者宁愿您直接给他发电子邮件,而不是使用默认的方式报告错误(CPAN 提供的错误跟踪器)。使用电子邮件而不是 public 错误跟踪器缺乏可见性本身就是一个问题,但他拒绝在他的分发中指明他希望如何联系他,从而使问题更加复杂。如果您胆敢通过 CPAN 错误跟踪器(他实际上表示您应该使用它)提交错误,他会通过电子邮件向您发送比您发布的内容更长的准备好的咆哮。


  1. 有过小插曲,但他们从错误中吸取了教训。例如,实验性功能就是这样形成的。

  2. 有"smokers" 持续运行 CPAN 上每个模块的测试套件针对"blead",Perl 的开发分支。 运行 之间的测试结果差异是手动检查的,以查看它们是否是由 Perl 的更改引起的。如果是,则打开 "Blead Breaks CPAN" (BBC) 票证。也许这是引入的错误。也许该模块正在做一些错误的事情。也许这是一个向后不兼容的更改,需要恢复(并且可能会引入弃用)。或者它可能是对内部结构的向后不兼容的更改,需要向前推进,在这种情况下,它们将帮助损坏的模块。

    DarkPAN 中的模块(即不在 CPAN 中)显然没有像 CPAN 中的模块那样从这些吸烟者那里获得相同水平的支持。但是如果您特别担心,您可以根据开发分支或开发版本自由测试您的模块。