-
Notifications
You must be signed in to change notification settings - Fork 30k
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
module: revert #3384 DEP0019 EOL #16634
Conversation
The original commit was landed without running CITGM. Unfortunately this change breaks the module `d` which has over 500k downloads a day. It is worth mentioning that the compatibility hack can be removed without breaking anything. We should definitely revisit for the next Semver-Major but shipping this today will cause non trivial ecosystem breakages. Refs: nodejs#3384
can you post the citgm failure here please? |
here is an example of one of the failures
|
thanks. I'm surprised we don't test this use of require. It is common to do that with lodash. |
@targos it seems like this commit specifically broke the case of requiring specific files in modules that only have a single character as a name. This will thankfully be limited to 26 cases! Hopefully this hint can help us with maybe landing this in the future |
CI failed completely on windows. Trying again https://ci.nodejs.org/job/node-test-commit-windows-fanned/13041/ |
@MylesBorins ...
A regression test for specifically this case would be helpful as a separate PR |
Ah, nervermind. When forcing it on (was some semver
|
Trying CI on Windows again now that #16639 is landed: https://ci.nodejs.org/job/node-test-commit-windows-fanned/13045/ ... that failed, but I may have restarted it wrong... trying again https://ci.nodejs.org/job/node-test-pull-request/11117/ |
got past the compile error on windows... should be good but letting the CI finish |
single windows failures edit: make that two |
Both of which appear to be flaky |
Just waiting on AIX and OSX to finish... then will get this landed |
The original commit was landed without running CITGM. Unfortunately this change breaks the module `d` which has over 500k downloads a day. It is worth mentioning that the compatibility hack can be removed without breaking anything. We should definitely revisit for the next Semver-Major but shipping this today will cause non trivial ecosystem breakages. Refs: #3384 PR-URL: #16634 Refs: #3384 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The original commit was landed without running CITGM. Unfortunately this change breaks the module `d` which has over 500k downloads a day. It is worth mentioning that the compatibility hack can be removed without breaking anything. We should definitely revisit for the next Semver-Major but shipping this today will cause non trivial ecosystem breakages. Refs: #3384 PR-URL: #16634 Refs: #3384 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Landed in 45873d2 |
@@ -334,7 +347,8 @@ Module._resolveLookupPaths = function(request, parent, newReturn) { | |||
} | |||
|
|||
// Check for relative path | |||
if (request.charCodeAt(0) !== 46/*.*/ && | |||
if (request.length < 2 || | |||
request.charCodeAt(0) !== 46/*.*/ || | |||
(request.charCodeAt(1) !== 46/*.*/ && | |||
request.charCodeAt(1) !== 47/*/*/)) { | |||
var paths = modulePaths; |
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 use of charCodeAt
jazz really complicates the logic. It was introduced in a pass to optimize lots of things but I suspect it was micro-opts carried a bit too far. Anyways, would this do to fix it:
if (! (request.length === 1 &&
request.charCodeAt(0) === codeOfDot) &&
! (request.charCodeAt(0) === codeOfDot &&
(request.charCodeAt(1) === codeOfDot ||
request.charCodeAt(1) === codeOfSlash))) {
@jdalton do you want to take a pass at a fix + test in a new PR?
|
Thanks @MylesBorins! I'm a bit time crunched at the moment but I'd dig picking it up at the end of the week if it's still available. I'll update my comment with findings from my local implementation today. |
The original commit was landed without running CITGM. Unfortunately this change breaks the module `d` which has over 500k downloads a day. It is worth mentioning that the compatibility hack can be removed without breaking anything. We should definitely revisit for the next Semver-Major but shipping this today will cause non trivial ecosystem breakages. Refs: nodejs/node#3384 PR-URL: nodejs/node#16634 Refs: nodejs/node#3384 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The original commit was landed without running CITGM. Unfortunately this change breaks the module `d` which has over 500k downloads a day. It is worth mentioning that the compatibility hack can be removed without breaking anything. We should definitely revisit for the next Semver-Major but shipping this today will cause non trivial ecosystem breakages. Refs: nodejs/node#3384 PR-URL: nodejs/node#16634 Refs: nodejs/node#3384 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The original commit was landed without running CITGM. Unfortunately this change breaks the module `d` which has over 500k downloads a day. It is worth mentioning that the compatibility hack can be removed without breaking anything. We should definitely revisit for the next Semver-Major but shipping this today will cause non trivial ecosystem breakages. Refs: nodejs/node#3384 PR-URL: nodejs/node#16634 Refs: nodejs/node#3384 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The original commit was landed without running CITGM. Unfortunately
this change breaks the module
d
which has over 500k downloads a day.It is worth mentioning that the compatibility hack can be removed
without breaking anything.
We should definitely revisit for the next Semver-Major but shipping
this today will cause non trivial ecosystem breakages.
Refs: #3384