-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enforce semver major version when publishing package #404
Comments
Is this still true with the distributed package manager proposal? |
No, this issue needs to be reworked given the current package manager proposal. However, it is still relevant - we can provide tools to compare API compatibility, and figure out in what ways we can enforce them. At the very least, the tool could assist the upgrade process - for example when deciding to upgrade you could query the system to see what API changes - that you actually depend on - happened between your current version and the latest. |
I don't think it will be possible to realistically enforce semver major version bumps, especially when what exactly is considered a breaking change can be an elusive concept that is communicated only in the documentation. For example, is the size of a struct part of the major version? Maybe, maybe not. It's the library author's job to communicate this information. I do think we can add tools related to this which can help library authors understand what possibly breaking changes they have introduced, but that should be a separate, more detailed and focused, proposal. |
When we publish a zig package we have access to the previous version. We know all the published declarations of the package of both versions. Therefore we know if the API changed in a backwards incompatible way. If it did change in a backwards incompatible way, we should emit an error if the major version is not bumped.
The text was updated successfully, but these errors were encountered: