-
Couldn't load subscription status.
- Fork 61
Add rules for patch, minor and major version increments #196
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
Add rules for patch, minor and major version increments #196
Conversation
As per issue eiffel-community#189, added version stepping rules in versioning.md.
|
I think some more clarity is needed here. As a ground rule I think the semver definitions are fine, with the addition that you should have the event consumer in mind when determining how to step the version.
With the above definitions it is still not very clear when to step what portion of the version identifier. Even though adding more examples will never be enough I guess we could sort out some misunderstandings. Added examples:
For 'minor':
For 'major':
|
Exactly, that's the point of the PR :) SemVer in principle, but in practice it's far from clear how to actually apply it. For instance, what is a backwards compatible bug fix in this context? Increased clarity is never a bad thing. I like your more precise examples, but I don't see how we achieve that by removing the current statements. As for meaning - if the meaning of a property is changed that should not be considered a backwards compatible change. (On a side note, changing a property's meaning without changing syntax is a bad idea, but nevertheless.) |
| * Mere documentation updates with no impact on event schemas require no stepping of the version at all. Indeed, the version is best understood as a _schema_ versions. Or, conversely, documentation SHALL NOT be updated in such a way as to change the semantics of event types or their properties without also making a change to the schema. To exemplify, changing the meaning of a property without changing its name or format is not allowed, as this introduces hidden compatibility issues. | ||
| * __patch:__ The patch version is incremented for changes that do not affect event structure, do not carry semantic significance and do not introduce additional legal values. To exemplify, narrowing a string pattern in a schema (e.g. from `[a-zA-Z_]` to `[a-zA-Z]`) would require the patch version to be stepped. | ||
| * __minor:__ The minor version is incremented for changes to event structure or other changes that carry semantic significance but are backwards compatible from a consumer's point of view. To exemplify, adding a property to an event type without changing the syntax of existing properties would require the minor version to be stepped. Note that existing _producers_ may not be able to produce the new event type version, but a _consumer_ SHALL be able to derive the same information as from the previous version. Note that this means that consumers SHOULD be prepared to handle (and disregard) unrecognized properties in higher minor versions than they are familiar with. | ||
| * __major:__ The major version is incremented for changes that are not backwards compatible from the consumer's point of view. To exemplify, removing or renaming an existing property would require the minor version to be stepped. Similarly, broadening a string pattern to allow additional legal values (e.g. from `[a-zA-Z]` to `[a-zA-Z_]`) requires the major version to be stepped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing or renaming an existing property would require the minor version to be stepped
should be 'major', right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Fixed.
|
|
||
| * If 2.0.0 and 3.0.0 exist, only the 3.0.0 event may serve as the baseline for a new major version (thereby stepping to 4.0.0). | ||
| * If 2.0.0 and 2.1.0 exist, only the 2.1.0 event may serve as the baseline for a new minor version (thereby stepping to 2.2.0). | ||
| * If 2.0.0 and 2.0.1 exist, the 2.0.0 event may serve as a baseline for new versions. Instead the 2.0.1 event shall be used as baseline for changes to the event type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the 2.0.0 event may serve
I think you mean 'the 2.0.0 event may not serve'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Fixed.
Applicable Issues
#189, #200.
Description of the Change
Added rules for patch, minor and major version increments in versioning.md, as well as handling of historical versions and editions.
Alternate Designs
There are several ways to interpret SemVer rules for the protocol - that's the point of stating them explicitly. If you believe there is a more conducive interpretation, please comment the PR :)
Benefits
Hopefully no more discussion regarding versioning every time we update an event type.
Possible Drawbacks
Can't see any drawbacks from having rules per se. This particular set of rules might have unforeseen consequences - please point them out if you can spot any.
Sign-off
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Signed-off-by: Daniel Ståhl [email protected]