-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
node 14 file url looses host on windows path #41371
Comments
@lachrist I test on [email protected] and doesn't reproduce this issues. I think that this issue have fixed. |
They (@lachrist) did say that it was fixed on 16.x:
So I imagine the question is "will the fix be backported to 14.x?" |
Hmmm...looks like the previous behavior was spec compliant, and then the spec changed. whatwg/url#302 So we may not want to "fix" previous behavior (in 14.x and 12.x) if it's not a bug under the old spec. We don't want to break people's existing code. (The new behavior was introduced in 15.0.0.) Thoughts? @nodejs/url |
Thanks for your answers @Trott
That is exactly right. In my case, the aforementioned difference between 14.x and later versions makes it harder to create portable code. And since there is a spec that the url module should be following it is a bit confusing. Maybe referencing in the doc the version of the spec that the url module is following could already help? |
We may not be able to backport my PR #35477 easily since modules system would be affected so that keep the current behaviour of v14 would be better as @Trott mentioned.
+1 to @lachrist's idea:
|
WHATWG specs are intentionally unversioned (i.e. "Living Standards") to prevent situations like this and increase interoperability. Referencing any commit (not version) of the spec except the current one is highly discouraged and indicates that Node.js intentionally wants to be buggy software. I would recommend against it. For more information see FAQs like https://whatwg.org/faq#living-standard and https://github.com/whatwg/html/blob/main/FAQ.md#why-are-there-no-stable-snapshots-or-versions-of-the-standard where we've tried to document this and steer implementations away from such strategies. |
@domenic Based on what you've written and the links you've provided, would I be correct to conclude that the options that comply with the spirit of a living standard would be either:
As far as undesirable options go, in addition to linking to a specific commit of the spect, another undesirable option would be to leave behavior in Node.js 14.x and 12.x (both currently supported versions) as-is? Do I have that all right? |
Backporting would be ideal, indeed. The Living Standards are written under the expectation that they will be implemented by software that updates frequently, like browsers. |
Sorry. Let me step back a bit. Upon reflecting for a few minutes, I realized that I am being kind of annoying and inconsiderate. Node's situation is different than browsers and you all are stuck between some tricky options. I shouldn't speak so confidently about what the right path is. You all know better than me how to balance stability expectations versus correctness expectations, when interacting with bugfixes in your dependencies. While I can talk semi-authoritatively about the intent with respect to browser implementations, Node is different and I shouldn't be so confident I know what is right for you and your users. If you need to reference the commit snapshots, that might just be a reflection of the fact that it's better for Node to follow a different path than browsers. It's not the end of the world. |
I could support trying to generally backport changes like this to supported release lines on a case-by-case basis as long as they are things that only affect highly unusual edge cases, are relatively infrequent, and it won't be too much work for @nodejs/releasers. |
I see great discussion in the above, thank you all :) Let me ping @nodejs/modules to kindly ask for your inputs if there is any concern to backport #35477 within module system into v14. My position in general is +1 to backport #35477 if the impact is only on URL. The reason why I +1 is the impact of the changes was not found by citgim when I made PR. |
I also +1 the backport of #35477. Generally we have encountered very few compatibility issues when backporting WHATWG URL changes in the past, especially for edge cases like this one. |
This is not the case anymore. Tested on Node 19.4.0. Closing the issue.
|
As the original reporter noted when opening this issue, it affects 14.x. It was fixed in 16.x (and, by implication, anything after 16.x). 14.x is still affected. On the one hand, we should probably re-open this because it's still an issue in the release line where it was reported. On the other hand, at this point it's extremely unlikely to be fixed and will be closed again when 14.x goes out of support in April. So maybe closing as |
I missed that, thanks @Trott |
@nodejs/releasers Do you agree that this is unlikely to be fixed in 14.x before the April EOL date and we should probably close this as |
Given the thumbs ups I'd say the answer is "not going to get fixed." I'll go ahead and close this. |
Version
v14.18.2
Platform
Darwin softs-MacBook-Pro.local 19.6.0 Darwin Kernel Version 19.6.0: Thu Sep 16 20:58:47 PDT 2021; root:xnu-6153.141.40.1~1/RELEASE_X86_64 x86_64
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Nope
What is the expected behavior?
Keep the
host
field of the url intact on modifying thepathname
as the spec indicates. FYI node 16 does not have this bug.What do you see instead?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: