-
Notifications
You must be signed in to change notification settings - Fork 21
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
Stage 3 Review #10
Comments
It was pretty intentional that it be phrased as a recommendation - that the web can't guarantee complying with the recommendation in all cases doesn't change what's recommended. |
@ljharb it should not be framed that way as no env I know of would follow it. |
I think it needs to be framed that way even if no env follows it - but also, browsers already will be following it except where servers prevent them from doing so; i hope node does; and bundlers and transpilers certainly will. |
@ljharb I think it must not be framed that way. It does not match even Node's fs usage if fs manipulation occurs during the loading process. If we frame it as a recommendation we must frame it in such a way that explains that it almost certainly can never match a real env. |
Perhaps we could introduce our first "intention" note into the spec here? I know we had a similar issue where graph re-ordering was intended to be banned but was unable to actually be enforced. |
It matches a real env under normal circumstances - which includes no server shenanigans and no filesystem manipulation. It’s not a requirement because these things can’t be guaranteed not to happen, but it’s a recommendation because in their absence, the guarantees should be kept (and will be, by browsers, and hopefully by node). |
@ljharb I disagree, a host does not control things and they are real possibilities, not shenanigans as you so claim. If it is a recommendation to assert guarantees and the guarantees cannot be achieved it should not be a recommendation. This sounds like an intention. |
To be clear, this comes from the fact that we are a standards body and the goals of interoperability both through documentation and creation of behaviors is not being done with a recommendation here. Stating something about behavior outside of the intention not being considered breaking if altered seems apt, but we cannot recommend something here if it cannot be actually achieved by anyone. |
I’m confused; this was a requirement for me for stage 3, and i thought we’d resolved it months ago. A host does not control these things which is why it’s not a requirement. However, in the absence of things a host does not control, the host is recommended to employ the stronger guarantee. It is very important to me that the spec language do whatever it can to maximize occurrences of the stronger guarantee (which matches what browsers will be doing in the absence of these things). |
@ljharb we had several calls about this in which I did state that it should not be a recommendation but was fine with a rewording. |
The point of our standard is to define the behaviors and stating that something is outside of behaviors we will be defining seems fine to me. Stating that a real behavior in all our implementations shouldn't happen doesn't make sense. |
As i recall, you stated it must not be a requirement - a recommendation is an editorial status which has no normative weight, and i was under the impression that this was acceptable. How would you suggest rewording it? It’s a rare behavior, and stating that hosts should strive, outside a rare behavior, to behave in a stronger way, makes perfect sense to me. |
Strive for and recommendation are very different. Recommendation implies it is possible since recommending something that is not possible doesn't make sense; to my knowledge the only way this is possible is with bundling an entire codebase and pre-linking the module graph in some way to make all modules static and unable to be altered during runtime. |
Browsers intend to use the stronger guarantee most of the time, as would, presumably, node - that’s why i find “should” appropriate. In other words, it’s quite possible often, just not always, which is the only reason it’s not a requirement. |
@ljharb it isn't able to be controlled by browsers or node, how can they make a guarantee? |
They can’t, which is why when it happens, the weaker guarantee will kick in. Until it does happen, the stronger guarantee would hold. |
@ljharb the point is they can't make the stronger guarantee. |
@ljharb what is wrong with "REALLY SHOULD NOT"? |
They can make them in the common case, just not always. “REALLY SHOULD NOT”’s definition seems like a good fit (altho “OUGHT NOT” would fit my intentions better), but I’m not sure 262 follows that RFC so far. |
@ljharb they cannot guarantee even the common case since it is the server which isn't an ECMAScript implementation that causes the behavior to be observed due to the cache infrastructure. Browsers cannot assert guarantees on server behaviors. |
@ljharb "OUGHT NOT" seems fine to me but the usage of moral implications is uncomfortable since we are not here to make moral judgements. |
re using RFC6919 keywords, the publication date of that RFC is not a coincidence |
lol thanks, I’d totally missed that. |
I'm fine w/ whatever wording is chosen even if it is from what was originally a joke. We cannot recommend impossibilities since they cannot be done. |
They aren’t impossible tho, that’s the crux i think of the disagreement here. They’re impossible for all cases, which is why it’s not required, but possible in many cases, which is why it’s what’s recommended. |
@ljharb they are not possible for the majority of cases. Any case where there is a non-bundled form it has a race which cannot be done. If IO is considered the non-majority that would be one thing, but the vast majority of cases are subject to this. I would once again move to block if the spec is trying to state the impossible. |
Even if a recommendation couldn't be followed in the majority case, we could still recommend it. The spec permits handling the cases you're concerned about - why is this recommendation so problematic for you? |
@ljharb because you can't recommend someone do something that cannot be done. Reframing it to be recommended for when it is possible seems fine, but for the vast majority of cases that hosts are doing it isn't. I wouldn't want to state that I recommend people stop eating for example if they need to eat and then back peddle to say that they don't need to eat all the time. |
The current phrasing says "It is recommended but not required" which already implies "when possible", would adding the words "when possible" address your concern? |
Likely that would work. To my knowledge there is no implication of "when possible" in the current phrasing. |
Great! I just filed #11; hopefully we can land that and move forward. |
Just for the record, the following point has been fixed:
|
LGTM now since that has merged |
Wasn't @codehag another reviewer? Have we gotten signoff from her? |
I am a reviewer. I haven't had time yet, the week since TC39 has been very busy. |
I read it all, it looks good to me, I didn't find any outstanding issues. but I am also brain dead due to a really long week.
|
@xtuc sounds good to close this and wait on the other review separately |
@codehag edited her message and it looks we have a 👍 too. Thanks, i'm going ahead and close the issue. |
This doesn't appear to have changed much since my last review so it is fairly simple:
https://github.com/tc39/proposal-json-modules/blob/master/spec.html#L81
per updated import assertions spec.
We probably don't want to imply a recommendation (since web and compatible envs itself won't do this exactly); the text above it isn't necessarily a recommendation but is an observation . Maybe a reframing:
Rest seems fine. 👍🏼
The text was updated successfully, but these errors were encountered: