-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Revert "process: add version constants and compare" #19587 #20062
Conversation
This reverts commit 91e0f8d.
Sorry, I could be more tactful than "This is not a good API". I should have said simply that I don't think this meets our standards or our historical consideration for the addition of features. The rest of my points still stand though. |
Agreed that does not belong in core and should be left to userland, where good implementations already exists |
I do not have a strong opinion either way if #20055 is applied (that would fix all broken examples and fixes the non intuitive API). I read the spec very closely and the only difference with #20055 is not checking numbers properly in pre-release tags and accept some non-semver versions for it to compare too (0.x.x). That should not be important for that functionality though, as I expect it to be used only with other valid Node.js versions and in this case we are safe (I guess we do not have more than 9 pre-releases of the same type). And I would also be fine to properly implement the tag validation (it is not really that difficult). I definitely do not like that it adds a function to |
I did not approve the change being discussed, nor did I approve the first PR (which was reverted as well), mainly because I was not sure about the API design (the first one was undoubtedly flawed). I personally don't like having a half-baked SemVer implementation in core, and seeing the discussion in #20053, it seems to even cause confusion (maybe |
its cool that this is getting reverted and all but i'm floored that people seem unable to bring these issues up on the original PR. a total of TEN DAYS pass without anyone having any issues with this, and the PR was open for 22 days! and as a sidenote of "userland" i think its preposterous that i have to install the semver package to make sure my package is in node version X, if the team feels that way please merge semver into core |
also if possible can you just do a partial revert of the function, those other props are kinda useful |
IMO @nodejs/tsc should discuss and determine whether this is something that needs to be in core or not. I don't see any other way at this point. It's a bit tiresome that we've gone back and forth with reverts on this functionality. |
@devsnek I would have requested changes on the first PR if I had seen it before it landed, but I didn't feel strong enough about the second one to block it and I didn't want to cause further frustration after urging to (at least partially) revert the first PR. Maybe we should have some stricter rules for semver-minor PRs as well, I think API additions should be handled especially careful. We got a very stable set of rules for semver-major PRs, but semver-minor PRs can cause similar and sometimes even more trouble. |
I'm fine with a revert on this but I have to share @devsnek's frustration. I've been generally seeing a growing lack of engagement from folks while PRs are open only to find folks raising objections and complaints after the fact. It's rather concerning. |
There's simply a lot going on. I try to keep an eye on new PRs but I still miss one from time to time. It must be much worse for anyone not working on Node.js full-time. |
I've been similarly frustrated too, but after just trying to keep up with ES module related things I can see how stuff can easily be missed. I know Node has its parts split into groups with folks involved in each group (modules, napi, etc). Is there such a group for |
@nodejs/process |
I don't want to hijack this issue for a larger discussion around how to manage project velocity and the frustrations around both stuff landing without seeing it and stuff getting reverted because of that. So I opened a discussion here: https://github.com/orgs/nodejs/teams/collaborators/discussions/10 |
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.
I am sorry to say that I only noticed this PR after it landed and I was not very comfortable with the API when I saw it (especially about the choice of prereleaseTag
since the tag could be pretty flexible), but I did not feel strong enough to revert it myself.
@joyeecheung just to be clear, semver spec calls it pre-release |
@devsnek Yes but we do not strictly obey the semver spec. For instance, the pre-release tag is used to |
@devsnek Hm, wait, V8 versions are not semver, so that's a bad example, sorry. A probably better example: we bump patch versions for security releases, even when they could be breaking. |
If this is going to make it in time for 10.0.0 it needs to be landed today. |
Is there anything preventing this from landing? |
Needs a green CI on OS X, but that's it, I think. Here's a re-run: https://ci.nodejs.org/job/node-test-commit-osx/17975/ |
It's green now. Landing... |
This reverts commit 91e0f8d. PR-URL: nodejs#20062 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
Landed in 287ec1e |
This reverts commit 91e0f8d. PR-URL: #20062 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
@devsnek (and others), if I did not approach this in a sensitive-enough way then I'd like to hear it (feel free to email me privately if you prefer). I probably fired this off quicker than I should have and didn't think through my language enough. Reverting someone's code is not a trivial exercise and there is an understandable emotional burden and I don't want to downplay that. |
This reverts commit 91e0f8d, PR #19587
This is not a good API addition and should not make it in to Node 10. Here's some reasons:
xVersion
properties and this is just more for us to maintainprocess.release
into a complex object with a method, rather than a simple object that contains simple classes (JSONifiable)Aside from being unnecessary feature bloat (my main objection), that last point is critical to consider. Here's how this is already a broken feature, let's take a 10.0.0-rc.2 (not available yet but it will be soon)
Yes we could fix these, but that's not the point, the fact that these even need fixing shows what a mess we're wading in to here. Review semver.org and look particularly at the pre-release rules. This is not a simple specification and it's taken a long time for node-semver to get it just right. We should leave this kind of thing to userland. If we include a proper semver parser and comparator then we'll next be getting calls to expose that from core .. this is how our stdlib bloats and it's not how Node was supposed to work.
/cc @devsnek @BridgeAR @tniessen @cjihrig @jasnell @apapirovski