-
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
meta: considerations for new core modules #15022
Conversation
COLLABORATOR_GUIDE.md
Outdated
Semver-minor commits that introduce new core modules should be treated with | ||
extra care. | ||
|
||
* First, the name of the new core module should not conflict with any existing |
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.
Nit: Remove First,
.
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.
There's also singular/plural disagreement in this sentence. Here's what I'd write:
- The name of the new core module should not conflict with an existing module in the ecosystem unless there is an agreement with the owner of the existing module to transfer ownership.
COLLABORATOR_GUIDE.md
Outdated
* First, the name of the new core module should not conflict with any existing | ||
module in the ecosystem unless an agreement with the owner of those modules | ||
is reached to transfer ownership. | ||
* PRs that introduce new core modules must be landed as semver-minor commits. |
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 think this is unnecessary to state. Any new feature must be landed as semver-minor. If you're trying to say that even landing as Experimental
is semver-minor (which I agree it should be), put that in with the statement about it needing to be Experimental
first.
COLLABORATOR_GUIDE.md
Outdated
is reached to transfer ownership. | ||
* PRs that introduce new core modules must be landed as semver-minor commits. | ||
* New core modules must be landed initially as `Experimental` and must go | ||
through at least one release cycle before being moved out of experimental. |
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 term "release cycle" is probably vague to a lot of people.
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.
So, yeah, putting my comments on the second and third bullet points together, maybe consolidate them into this single bullet point:
- New core modules must be landed with a Stability Index of
Experimental
. (Pull requests proposing new core modules must still be markedsemver-minor
.) New core modules must remainExperimental
until asemver-major
release.
COLLABORATOR_GUIDE.md
Outdated
* New core modules must be landed initially as `Experimental` and must go | ||
through at least one release cycle before being moved out of experimental. | ||
* It is recommended to give PRs introducing new core modules more time for | ||
review than the typical 48/72 hour review used for other commits. |
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.
Suggest a concrete time framer here. I'd go with this:
- Pull requests introducing new core modules should remain open for one week rather than the usual 48-hour/72-hour review period for other pull requests.
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 would suggest longer.... maybe even up to a month?
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.
Maybe phrase it as a minimum? (open for at least one week
)
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 actually agree with @jasnell as this would probably have already prevented some trouble. Landing a new module should normally not be urgent.
One alternative might also be smth like At least one week without anyone requesting any further changes.
?
And I would not make it a recommendation but mandatory with a optional fast path through a decision of the CTC/TSC?
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 think it should be possible for collaborators to pick an appropriate timeframe, even without a fixed rule. One week as a minimum sounds good, but in any case the gist of it will be “if your PR is large/has profound impact, wait until people have had a fair chance to review & assess it”
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.
Please explain why we don't want to go the EPS route. If a new module isn't a major addition I don't know what is.
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.
EPS is an ok for speculative large changes but it's really hasn't been that successful of a process over all. Having a concrete pr available, with real code, real tests, real documentation is far easier to review and look at to determine if this is something we want. For instance, Bradley's ESM pr has been a thousand times for valuable than the endless noisy threads in the EPS repo on it. Same goes for the efforts that led to N-API, URL, Inspector, etc. Yes, some discussion in EPS can be helpful but gating whether or not a semver minor can land based on that seems far too unnecessarily heavyweight of a process and, frankly, discourages innovation significantly. I'd definitely be -1 to requiring EPS and have, on several occasions, even considered proposing removing it.
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.
@addaleax ... "at least one week" sounds good to me but I would point out that the issue that led to me creating this issue in the first place (Jeremiah's concern that I landed the perf_hooks stuff too fast) meets all of the criteria discussed so far in this thread so I'm not sure if it's sufficient to make everyone comfortable. There needs to be a good balance so that a good compromise can be reached.
COLLABORATOR_GUIDE.md
Outdated
Semver-minor commits that introduce new core modules should be treated with | ||
extra care. | ||
|
||
* First, the name of the new core module should not conflict with any existing |
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 assume there should be an email, GitHub comment, or some other paper trail that shows the agreement with the existing module owner?
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.
something along those lines yes.. I'm not sure how prescriptive we need to be with it.
Updated based on feedback.
PTAL |
COLLABORATOR_GUIDE.md
Outdated
|
||
It is recommended to give PRs introducing new core modules at least one week | ||
for review. For new modules that involve significant effort, non-trivial | ||
additions to Node.js or significant new capabilities, an [EPS][] is |
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.
teeny tiny nit: EPS is plural, EP is the singular ;)
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.
heh... sigh. Should I just change it to "Enhancement Proposal"?
COLLABORATOR_GUIDE.md
Outdated
Pull requests proposing new core modules must still be marked semver-minor. | ||
New core modules must remain Experimental until a semver-major release. | ||
|
||
It is recommended to give PRs introducing new core modules at least one week |
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.
Make it more forceful and concise:
Pull requests introducing new core modules must be left open for at least one week for review.
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.
Done.
COLLABORATOR_GUIDE.md
Outdated
Pull requests introducing new core modules must be left open for at least | ||
one week for review. For new modules that involve significant effort, | ||
non-trivial additions to Node.js or significant new capabilities, an | ||
[Enhancement Proposal][] is recommended but not required. |
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.
This sentence is confusing to me. (For example, it implies that new modules typically are trivial additions to Node.js.)
How about this?:
If a new module has a large API surface, requires extensive changes to Node.js core, or adds extraordinary new functionality, open an [Enhancement Proposal][].
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.
LGTM with or without my last suggestion.
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.
LGTM with my two comments adressed.
|
||
The name of the new core module should not conflict with any existing | ||
module in the ecosystem unless a written agreement with the owner of those | ||
modules is reached to transfer ownership. |
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.
We need to add a statement like: "if the new module name is free, a collaborator should park it as soon as possible, linking to the pull request that introduces the new module".
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.
oh right, good point
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 think you still have not added this.
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.
oy... heh... one sec
### Introducing New Modules | ||
|
||
Semver-minor commits that introduce new core modules should be treated with | ||
extra care. |
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 would add that they need to land with two CTC (or maybe TSC now) signoff, like any other breaking change.
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.
Would that be a should or a must?
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 think that's a must. It's serious business: we are adding new API that we will need to maintain to core. Removing those is hard, so the CTC should be notified to weight in.
I guessed that was the reason. Personally, I disagree, when I look at PEP (Python Enhancement Proposal) I'm always impressed by the level of detail and thought that goes into pretty much any major feature. It is super helpful to learn about the thought process that went into the feature. I think we can learn a lot from them. But if EPS is something we want to discourage, then we should change the EPS guide lines or deprecate the approach completely. But a minimum requirement for any new major feature should be to put it on the CTC agenda, even if there are no disagreements. That would have made any concerns in this cause quite obvious. This is effectively equivalent to the EPS approach, but with less documentation and more code. |
@AndreasMadsen ... that's fair :-) We've been actively moving away from putting things on the (Of course, that's in addition to it landing as Experimental) |
Ok, take a look now! I think I've captured your feedback @AndreasMadsen and @mcollina :-) |
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.
LGTM
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.
LGTM
Especially the "ctc-review
label" part is important to me.
As for how we should deal with pref_hooks
specifically, I will defer that to @Fishrock123. It is clear to me that @Fishrock123 was against the PR and if a collaborator is against a PR then the CTC should be involved, which it wasn't. Mistakes were made, that happens and is fine, but we have to reevaluate perf_hooks
as well.
PR-URL: #15022 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Landed in 397dbab |
Should we notify all collaborators about this change? |
ping @nodejs/collaborators ... fyi |
module in the ecosystem unless a written agreement with the owner of those | ||
modules is reached to transfer ownership. | ||
|
||
If the new module name is free, a Collaborator should register a placeholder |
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.
Should we commit to adding (or allowing for) polyfills to be published for older versions of node under that name? Or is that out of scope for this generic document and would be discussed case-by-case?
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'd say that's out of scope
PR-URL: nodejs/node#15022 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
PR-URL: nodejs/node#15022 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
PR-URL: nodejs#15022 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
PR-URL: #15022 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
PR-URL: #15022 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
PR-URL: #15022 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
/cc @AndreasMadsen @evanlucas