Uh oh!
There was an error while loading. Please reload this page.
module: remove require('.') with NODE_PATH compat - #3384
Conversation
silverwind
commented
Oct 15, 2015
silverwind
commented
Dec 1, 2015
Going to postpone this removal once more. This incompatibilty and the subsequent hack were added during io.js. the exposure time of this deprecation message would be quite short for users of 4.x. Likely target is 7.0.0. |
jasnell
commented
Mar 22, 2016
@silverwind ... is this still something you want to pursue? |
silverwind
commented
Mar 22, 2016
Yes, I'm just waiting for the v6 release so I can land this on master. |
7da4fd4 to
c7066fbComparebenjamingr
commented
Apr 30, 2016
Mind elaborating on this change? Also, can we get a citgm run? |
06275b9 to
5cb631fComparesilverwind
commented
May 2, 2016
Rebased. When we introduced I introduced a 'hack' to restore the functionality with a deprecation message in place (#1363), which is now removed again. When this goes into the 7.0.0 release, the deprecation will have been in place for 1.5 years. |
silverwind
commented
May 2, 2016
ChALkeR
commented
May 2, 2016
Perhaps we should review the stability levels in the documentation first? |
silverwind
commented
May 2, 2016
Test is broken. Looks like something in ae18bbe made my "maintain backwards compat" section neccessary to resolve |
silverwind
commented
May 2, 2016
Condition fixed, new CI: https://ci.nodejs.org/job/node-test-pull-request/2468/ |
CI is green except an unrelated java failure. I don't think a CITGM would bring any more insights here because modules usually don't set |
silverwind
commented
May 17, 2016
@thealphanerd can you run this through a CITGM, just to be sure? |
MylesBorins
commented
May 17, 2016
ChALkeR
commented
May 17, 2016
Note that this change currently directly contradicts with the documentation, which says that only security, performance, or bug fixes will be accepted for Either the documentation should be fixed first, or this change rejected. |
There was a problem hiding this comment.
@mscdex does this change look right to you? The condition was start !== '.' && start !== './' && start !== '..' before you refactored it to use charCodeAt. Tests are passing, but I'd like to get a second look on that one.
There was a problem hiding this comment.
You'll want to add appropriate request length checking before using charCodeAt(n) to make sure you don't cause a deopt due to an out-of-bounds access.
silverwind
commented
Jun 15, 2016
While #6528 is still in limbo, I'd like to get this hack removed rather sooner than later. @nodejs/collaborators any concerns regarding the changes? (See #3384 (comment) for a summary) |
There was a problem hiding this comment.
Instead of removing this test should we merely assert the opposite?
Totally forgot about this one. I'll move it to the next milestone. |
BridgeAR
commented
Aug 24, 2017
+1 for option 2 |
silverwind
commented
Aug 25, 2017
I don't assume that a CITGM will catch anything here. The compat is just for users that set |
silverwind
commented
Aug 30, 2017
CI: https://ci.nodejs.org/job/node-test-pull-request/9878/ (For real now, couldn't start the last time because the CI was down) |
@nodejs/ctc ... please take a look at this and weigh in.
|
silverwind
commented
Aug 30, 2017
@jasnell done. I'll land this tomorrow if there are no objections. |
jdalton
commented
Aug 30, 2017
🎉 which Node version is this expected to land in? |
jasnell
commented
Aug 30, 2017
It's a major so it would land in 9.0.0 |
silverwind
commented
Aug 31, 2017
Finally landed in a517466. It's been a long ride. |
This removes the compatibilty code that was in place to allow an unintended
interaction between `require('.')` and `NODE_PATH`. The compatibility code and
the accompanying deprecation warning has been in place since 2015-04-17.
PR-URL: #3384
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>This removes the compatibilty code that was in place to allow an unintended
interaction between `require('.')` and `NODE_PATH`. The compatibility code and
the accompanying deprecation warning has been in place since 2015-04-17.
PR-URL: nodejs/node#3384
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>MylesBorins
commented
Oct 31, 2017
@nodejs/tsc it appears that this landed without running citgm and it is breaking a fairly insignificant portion of our ecosystem. It breaks a common use case of the module d specifically: require('d/lazy')A revert is incoming. If we had caught this earlier we may have been able to come up with a fix but with d receiving over 500k downloads a day I don't see how we can ship this tomorrow |
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
MylesBorins
commented
Oct 31, 2017
Some more details after a bit more research this commit specifically broke the case of requiring individual files in modules that only have a single character as a name. This will thankfully be limited to 26 cases! The specific line that broke things is a517466#diff-d1234a869b3d648ebfcdce5a76747d71L338 In light of this specific edge case we may want to re-examine the deprecation all together |
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>
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>
In certain cases, `require('.')` could resolve outside the package
directory. This behavior has been removed.
PR-URL: nodejs#26973
Refs: nodejs#3384
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This PR replaces #1452. It's updated and targets
masternow. Adding 6.0.0 milestone as discussed.