Skip to content
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

Closed
andrewrk opened this issue Jul 5, 2017 · 3 comments
Closed

enforce semver major version when publishing package #404

andrewrk opened this issue Jul 5, 2017 · 3 comments
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Jul 5, 2017

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.

@andrewrk andrewrk added the enhancement Solving this issue will likely involve adding new logic or components to the codebase. label Jul 5, 2017
@andrewrk andrewrk added this to the 1.0.0 milestone Jul 5, 2017
@tiehuis tiehuis mentioned this issue Jun 8, 2018
@thejoshwolfe
Copy link
Contributor

When we publish a zig package we have access to the previous version.

Is this still true with the distributed package manager proposal?

@andrewrk
Copy link
Member Author

andrewrk commented Jun 8, 2018

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.

@andrewrk andrewrk added proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. and removed enhancement Solving this issue will likely involve adding new logic or components to the codebase. labels Nov 21, 2018
@andrewrk andrewrk modified the milestones: 1.0.0, 0.7.0 Apr 15, 2020
@andrewrk
Copy link
Member Author

andrewrk commented Oct 9, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Projects
None yet
Development

No branches or pull requests

2 participants