標題: 「NPM 的 colors modules 打亂一堆人…」
類別: other
連結: https://research.swtch.com/npm-colors
NPM 上一個著名的 Module Color 以及 Faker 的作者這幾天生氣氣的修改這兩個 module,於 Color 內塞入了無限循環並且印出各種亂碼
然後所有使用這兩個 module 的工具一旦更新就會發現自己的 Terminal 輸出整個爆炸,完全看不懂了。
這篇文章是 Golang 的作者 Russ Cox 分享關於這件事情的一些看法,簡單來說每個開放原始碼的授權都有提到並沒有保固這種事情,所以任何現代化的模組管理者
設計時都必須要考量到這種版本更新的可能性,並且盡可能地去減少。
文章中以 aws-cdk 作為範例, aws-cdk 最初描述時是使用 ^1.4.0 的方式來參考各種 ^1.4.0 版本的 color,結果 color 的作者就直接爆氣來一個炸彈,aws-cdk 直接更新然後建置,最後
產生出一個令人崩潰的版本。
作者認為任何一個系統要更新的時候應該都需要緩慢與穩健的去逐步更新,並且這些更新都要經過一段時間的觀察與測試來降低各種可能放到生產系統出包的可能性。
以下節錄自文章中的重點
「High-fidelity builds solve both the testing problem and the gradual rollout problem. A new version of colors wouldn’t get picked up by an aws-cdk install until the aws-cdk authors had gotten a chance to test it and push a new version configuration in a new version of aws-cdk. At that point, all new aws-cdk installs would get the new colors, but all the other tools would still be unaffected, until they too tested and officially adopted the new version of colors.」
個人資訊
我目前於 Hiskio 平台上面有開設 Kubernetes 相關課程,歡迎有興趣的人參考並分享,裡面有我從底層到實戰中對於 Kubernetes 的各種想法
詳細可以參閱
線上課程詳細資訊: https://course.hwchiu.com/
另外,歡迎按讚加入我個人的粉絲專頁,裡面會定期分享各式各樣的文章,有的是翻譯文章,也有部分是原創文章,主要會聚焦於 CNCF 領域
https://www.facebook.com/technologynoteniu
如果有使用 Telegram 的也可以訂閱下列頻道來,裡面我會定期推播通知各類文章
https://t.me/technologynote
你的捐款將給予我文章成長的動力