简体   繁体   English

Go github 版本中的“+不兼容”后缀是什么意思?

[英]what does “+incompatible” suffix mean in Go github versions?

I am considering upgrading go-github from v17.0.0+incompatible to v28我正在考虑将 go-github 从v17.0.0+incompatible升级到v28

I notice some versions that go-github released has a +incompatible suffix, especially for the v1 category.我注意到go-github 发布的一些版本有一个+incompatible后缀,特别是对于v1类别。 What does that entail?这意味着什么? I am guessing version with +incompatible are incompatible with the newer/older version?我猜带有+incompatible的版本与新/旧版本不兼容?

In general, when updating a third party dependency, how can I know if upgrading to the newer version is safe?一般来说,在更新第三方依赖项时,我如何知道升级到较新版本是否安全? Do I just have to read through the change logs?我只需要阅读更改日志吗?

Go in general does not want you to use the same import path for multiple incompatible versions of a project. Go 通常不希望您对项目的多个不兼容版本使用相同的导入路径。 This is so that one dependency can use one major version of a module and another dependency can use another.这样一来,一个依赖项可以使用模块的一个主要版本,而另一个依赖项可以使用另一个。

This syntax indicates that the repository is not using a suffix for their module paths for a non-v0, non-v1 version, and bypasses the logic in the module code that does semantic import versioning.此语法指示存储库未使用非 v0、非 v1 版本的模块路径后缀,并绕过模块代码中执行语义导入版本控制的逻辑。 The documentation about this functionality is available on the Go website . Go 网站上提供了有关此功能的文档。

Since going from one major version to another is a breaking change in semantic versioning, you'll need to determine out of band whether or not they're compatible.由于从一个主要版本到另一个主要版本是语义版本控制的重大变化,因此您需要在带外确定它们是否兼容。 The +incompatible suffix doesn't implicitly denote this, but going from v17 to v28 does. +incompatible后缀并没有隐含地表示这一点,但是从 v17 到 v28 可以。 So changelogs might be a good idea, or you could just update and run your tests if you're confident in your testsuite.因此,更改日志可能是一个好主意,或者如果您对您的测试套件有信心,您可以更新并运行您的测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM