Conversation
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62462 +/- ##
==========================================
- Coverage 89.70% 89.69% -0.01%
==========================================
Files 678 678
Lines 207195 207190 -5
Branches 39730 39734 +4
==========================================
- Hits 185862 185839 -23
- Misses 13438 13439 +1
- Partials 7895 7912 +17
🚀 New features to boost your workflow:
|
|
I think a dedicated error is indeed more user friendly for now, though we may need some text suggesting this can go away in future versions and users should avoid rely on being able to catch one/prepare that it may "just work" in a future version - there are a couple of preconditions that can make it disappear, e.g. async loading path going away after |
|
|
||
| assert.throws( | ||
| () => require(fixtures.path('import-require-cycle/race-condition.cjs')), | ||
| { code: 'ERR_REQUIRE_ESM_RACE_CONDITION' }, |
There was a problem hiding this comment.
This should be moved to known-issues if we want to formulate this as a "FIXME" instead of "working as intended"
Unless I'm missing something, both removal of |
They are preconditions but would not in themselves fix the issue automatically, so they could land in semver major but the actual disappearance of the error need to be implemented some time after. If we confuse people into thinking this is an always catchable error that makes it harder to land fixes in a minor/patch.
I think this is something we would agree but unfortunately not very clear to users (e.g. there were some users arguing disappearance of ERR_REQUIRE_ESM should be semver major because some libraries rely on the appearance of it, while some library authors arguing it should be semver-minor, so it was at least something people consider debatable instead of well-agreed). Since this error is just a temporary limitation instead of an intentional design, a heads up in the doc would hopefully steer people away from counting on it at all and into using more robust solutions for whatever they are relying on it for, and there generally seem no harm in emphasising it a bit in the docs. |
I don't think we have any way to support it, so we shouldn't be throwing
ERR_INTERNAL_ASSERTIONthat requests the user to open an issue here.Closes: #62432