-
Notifications
You must be signed in to change notification settings - Fork 134
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
Additions to import.meta
#1430
Comments
I was under the impression that |
I think semver-minor is fine since unlike new globals I don't expect code to break when we add stuff to import.meta.
I don't think we should require WinterCG approval for anything. I think we should engage with WinterCG in good faith and try to come up with standards and interoperability that work for all of us. I don't think it should block anything certainly not as a policy. |
In this case either Bun align (likely), Node.js would align (less but still likely) or someone would write an interop package for people who care about whether or not their code is portable across runtimes. I do believe standardization is a good idea and asking for feedback is good. |
Maybe that’s what TC39 intended, but like a few other things, that’s not what’s happened in practice. We went through years of negotiations with WHATWG to reach consensus on The unfortunate thing is that
In general I think we want to encourage interoperability of code by default; there are plenty of authors who write packages for Node, or for browsers, that could be compatible across runtimes but because it’s not the path of least resistance, they neglect to do so. The broader user base is better served the more we can make it easy for packages to be written in a cross-compatible way by default. What would this “interop package” look like? |
fwiw, a helper would likely look something like |
My takes:
I think semver-minor.
I think at least TSC approval, and the TSC should make an effort to get WinterCG approval too. We should also try to add whatever WHATWG adds to I also think that we should be sparing in granting approvals. There was a suggestion to add |
I doubt there's actually a performance cost - |
TSC approval aligns with my thinking at well with the expecation that the TSC should work to use the same values across runtimes when possible. |
Yep.
+1
+1,000,000
+1
A couple of things from a non-maintainer perspective:
That's literally the spec defined point of it, right?
I really don't see the point. Non-browser runtimes are by definition not web browsers. It'd be an unmitigated disaster if web browsers all implemented different runtime environments because they are designed to view client agnostic web pages. That's the thing folks like WHATWG are governing. But non-browser runtimes are chosen by developers for the features (API) of those runtimes. I don't think it is unreasonable for those developers to be aware of the ramifications of their choices.
Agreed.
Disagree. |
From TSC discussion, it seems like we're gaining consensus around:
|
@nodejs/tsc @jasnell are there any objections with this plan?
semver-minor
TSC approval, plus WinterCG notified |
Can we clarify what TSC approval means in this context? Does that mean TSC should vote every time we want to add something to |
IMO requiring TSC approval (whatever that means) is really not necessary, IMO the usual code review process is enough. If there are objections/lack of consensus, the TSC can get involved, but I don't see the point if the addition is already at consensus. AFAICT the current review process works well enough, let's not complicate it further, wdyt? |
No, additions here need to be coordinated with other runtimes. That's something the TSC needs to be involved with, if not lead. We can't just have any two collaborators landing whatever they want on here. |
I assumed "the TSC is pinged and we operate by lazy consensus and not necessarily a vote". |
If that's the case, +1, but that seems to be better described by "the TSC is notified" rather than "the TSC needs to approve".
The TSC does not own the code, the collaborators do. I don't know what your last sentence is implying, but I don't think I agree with it, the TSC members are not some kind of "better collaborators". Strong -1 on my side to add a vote requirement, it would be an overreach from the TSC, and it would add useless friction when the current process is actually working well enough. |
+100 to that |
What I mean is that we shouldn’t have just two approvals be enough here. We have a policy that any new global is considered a semver-major change, and per https://github.com/nodejs/node/blob/6919d7241657517bfff6d2041748fa9f8e85b76e/doc/contributing/collaborator-guide.md#breaking-changes:
I don’t think we need to make |
Isn't that already what's happening with the current process? There have been several proposal of addition for |
I think the point of this issue is to formalize what so far has been an improvised process, so that we do the same for future Especially with so many sources across the web defining |
I'm in favor of @mcollina's suggestion in #1430 (comment) where TSC approval means the regular lazy consensus process. |
I would suggest
The WinterCG has discussed setting up a kind of registry for With such a registry in place, if runtimes do agree to adhere to the registry and use it as a way of coordinating
|
I'm going to say it explicitly: I'm -1 on requesting TSC approval for changes on If WinterCG goes forward with their idea described in #1430 (comment), my suggestion for the guidelines would be: Any change to
It must also follow the usual process for landing PRs – specifically, that means a feature can be accepted on the WinterCG registry, and still be rejected in Node.js if a collaborator objects to it. Ideally, the TSC, or at least someone from the project, should be involved in reviewing changes to the WinterCG registry though. IMO any change to that registry would deserve discussion from the TSC, maybe we can have an automation that automatically adds to the TSC agenda any new PR to the registry. wdyt? |
I'm still waiting on more feedback from WinterCG before we can consider this official, but I have the start of the registry here: https://github.com/wintercg/import-meta-registry |
Why? What's the breaking potential - the issue with globals is they can change how JS code executes with regards to scoping - that's not a concern here as far as I'm aware? |
I disagree with this. Ultimately every PR needs TSC approval, since any block could lead to a TSC vote. Requiring two TSC approvals on an It’s not a question of trusting or not trusting the collaborators. It’s simply unreasonable to expect all of them to know about a particular process that’s specific to Additions to |
@GeoffreyBooth do you have any opinions on the guidelines I have drafted? |
Yes. The guideline should include that two TSC approvals are required, like we have for globals. I also think that requiring only that a PR be open for 7 days in the WinterCG repo is way too lax. It should be landed there. The registry is just a place for runtimes to lay claim to names; there’s no reason for other runtimes to ever block a proposal other than “hey, we already use that name.” There’s also no hurry on landing |
As mentioned above in #1430 (comment) I object to requiring WinterCG approval for additions, we are placing boundaries on ourselves that none of the other runtime are committing to and we have the biggest obligation to our users out of all of them as the biggest runtime. Node.js should do what's best for Node.js and the web and should collaborate in good faith with WinterCG but not be subservient to it IMO. Like Node.js can add stuff to I also agree with TSC approval (through lazy consensus, since we have globality concerns) but haven't heard a strong argument for semver-major. I don't see it as different from adding an argument to a method which isn't major. I am also OK with "regular collaborator process + ping". |
We can add some kind of condition like “if rejected at WinterCG, or still pending at WinterCG after two months, a lazy consensus or vote of the TSC can decide to proceed without WinterCG approval.” I would be fine with that. But WinterCG only meets once per month so it might take up to two months for a decision to be made by them. (But again, I don’t think it should be easy or quick to land additions to I agree that regular semver rules should apply, that additions are presumed minor, changes to existing properties are probably major, etc. |
@GeoffreyBooth mostly, people in WinterCG today (like James) are great and I trust them but as a standards body it's new and I wouldn't want our process to block on it or wait for it. What about the following idea:
The changed requirement is that " |
That’s mostly good, I would change a few things:
|
The idea of having a separate team dedicated to this SGTM – probably not a WG, and possibly with a broader scope than just |
@benjamingr was what you proposed captured in the documentation. Wondering if we have additional actions left or if this issue should be closed? |
Opening this issue per today’s TSC meeting. This is a spinoff from nodejs/node#49246 (review):
import.meta
semver-major or semver-minor?An
import.meta.node
namespace was floated in wintercg/proposal-minimum-common-api#50 (comment), but Bun objected. I think if we want to create a proprietary namespace then we need another WinterCG proposal for the namespace itself.See also wintercg/proposal-minimum-common-api#54.
The text was updated successfully, but these errors were encountered: