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
Formalize semantic versioning policy #6244
Comments
Related: #6240 |
Copying over the JSCS policy and adding my own comments in italics. For reference, currently
|
Trying to kickstart this again. I think we basically want to adopt what JSCS has. Here's my proposal:
@eslint/eslint-team thoughts? |
Agree with principle adopt JSCS. It looks clear. A few tactical observations or suggestions: Patch
Minor
Major
|
@pedrottimark I see so moving the bullet points based on familiarity/frequency in changes? Do we want an explicit point for adding/fixing autofix to a rule or that does under "a rule"? |
Yes, a guideline is organize information to make it clear and quick to interpret both ways:
Change from non-fixable to fixable seems important to make explicit. You who are more experienced than me can say about changes to amount of fixes. Is there any analogy to reporting more or fewer errors? |
👍 on adopting HSCS rules here. |
What's an HSCS rules? Sorry, not familiar with it. |
I'm pretty sure he meant JSCS and just typed it wrong :) |
@pedrottimark I think making a rule fixable is a minor release. Same with making it non-fixable. Fixes are not guaranteed to be applied, so there's no real harm in adding or removing fixes. |
Adding a fix should be minor. The principle for major is "will this change make CI tools fail where they were passing before". For adding fixers, the answer is no. |
I'm ok with everything except with:
Semver states bugfixes not changing the API should be patch releases. If a rule catches an error we were supposed to be catching that's a good thing. That's the difference between a bug and an enhancement. |
@alberto Semver can't be strictly followed in this case, because we can't universally call "randomly" breaking builds a feature. There are many users of linters who expect |
I wouldn't call it random. If we release a patch release which detects an error that should have been detected before, I think their build will be failing for a good reason. |
@alberto i had the same initial reaction and had to do a lot of soul searching to get comfortable with it. I do think there's something to @mikesherov's point that there is an expectation that patch releases won't cause a passing build to fail. That, to me, is why requiring a minor release when warnings increase makes sense. |
What happens if we can't determine if the number of errors will increase/decrease? For example, rule was flagging something that shouldn't have been flagging, but at the same time not flagging actual errors? |
@ilyavolodin that would be a minor release. It's not really the number of warnings, it's the number of things being flagged. Whenever something wasn't flagged and now will be flagged, that's a minor release. |
It doesn't seem to contradict semver fyi -
So in this context, we can define them as "features" or even backwards incompatible bug fixes which do not change public API, that is debatable of course. This point is interesting actually, many people in the JSCS team were weird out by this when it was introduced, now it is hard to imagine otherwise, since this tactic worked out pretty well |
Just an FYI, currently our release script determines what type of release this is going to be based on the commit messages. If we split up |
@ilyavolodin I think what we're saying here is that "Fix:" is only used when we're causing a rule to not flag something it was previously flagging. For everything else, we'd use "Update:". |
I'm going to throw together a PR. It seems like we're agreeing on most of the details, so I think we can work out any further issues on the PR. |
So this is an interesting test of the rule fix/update argument: #6324 The rule was not flagging something that it clearly should have, so we labeled this as a bug. "Fixing" the bug means it will now work properly, though the result is that it's flagging something it was meant to flag before but wasn't. Is that a patch change or a minor change? |
Yeah, it seems weird. But it's a minor in that case. Mike Sherov
|
I don't think that case is special. If we want to avoid breaking anyones build, we can tell ourselves that is an enhancement and call it a day. If we want people to get this fixed ASAP, we should label it as a bug and let their CI tell them there is a problem with their build. This is not a critical bug, but what if we find something missing from one of our "Possible errors" rules? Wouldn't you want your build to fail if there was something wrong with your code there? If someone doesn't want to get failures because fixed bugs, the should pin eslint version or make it not fail their CI, IMO. |
Finding more lint errors would be an enhancement here. Telling them to pin is harder because |
I think I'm with @mikesherov and @nzakas with this one. If you broke my already working and passing build with a patch update because it now catches a lint error that should have been caught before I'd curse you for making me drop everything else and try to fix the "stupid" thing. I know it is not stupid but I'm pretty sure that's how I will feel when this happens to me :) |
Okay, it seems like we have a good consensus to move forward with this. Just to be clear: from now on, any changes to a rule that will result in something being flagged that wasn't being flagged before will have an "Update:" commit message instead of "Fix:". I'd suggest we still flag such instances as "bug" on the issue to indicate there was a logic error rather than saying we're doing a formal enhancement. Everyone good with that? |
@nzakas That would require the developer guide to be updated to indicate that "bug" label !== "Fix:" prefix. Could we maybe do "bug"/"enhancement" labels (as a pair) to make those cases clearer? |
Yeah, that sounds like a good compromise. |
I've updated the pull request to include changes to maintainer/developer guides |
Continuing from #6176 (comment), JSCS had a very clear semantic versioning policy on its README (https://github.com/jscs-dev/node-jscs/blob/master/OVERVIEW.md#user-content-versioning--semver) that made it obvious when something should be a breaking change or not. We should come up with a similar statement.
The text was updated successfully, but these errors were encountered: