Skip to content
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: hide internal stack when emitCircularRequireWarning #32991

Closed
wants to merge 2 commits into from

Conversation

himself65
Copy link
Member

@himself65 himself65 commented Apr 22, 2020

Fixes: #32987
Refs: #29935

previously:

> node --trace-warnings a
(node:19168) Warning: Accessing non-existent property 'foo' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:814:11)
    at Object.get (internal/modules/cjs/loader.js:825:5)
    at Object.<anonymous> (C:\Users\Himself65\Desktop\github\test\cycle\c.js:4:10)
    at Module._compile (internal/modules/cjs/loader.js:1185:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
    at Module.load (internal/modules/cjs/loader.js:1034:32)
    at Function.Module._load (internal/modules/cjs/loader.js:923:14)
    at Module.require (internal/modules/cjs/loader.js:1074:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\Users\Himself65\Desktop\github\test\cycle\b.js:1:1)

now

node\Release\node.exe --trace-warnings C:\Users\Himself65\Desktop\github\test\cycle\a.js
(node:18824) Warning: Accessing non-existent property 'foo' of module exports inside circular dependency
    at Object.<anonymous> (C:\Users\Himself65\Desktop\github\test\cycle\c.js:4:10)
    at Object.<anonymous> (C:\Users\Himself65\Desktop\github\test\cycle\b.js:1:1)
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@himself65 himself65 added the wip Issues and PRs that are still a work in progress. label Apr 22, 2020
@nodejs-github-bot nodejs-github-bot added the process Issues and PRs related to the process subsystem. label Apr 22, 2020
@himself65 himself65 changed the title module: hide internal stack when onWarning module: hide internal stack when emitCircularRequireWarning Apr 22, 2020
@gengjiawen
Copy link
Member

I think the internal stacktrace okay with me, don't see a reason to remove it.

@himself65 himself65 closed this Apr 22, 2020
@himself65
Copy link
Member Author

Seems right, it okay with displaying internal stack

@himself65 himself65 deleted the 2020-04-22-emitError branch April 22, 2020 07:20
@himself65 himself65 removed the wip Issues and PRs that are still a work in progress. label Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
process Issues and PRs related to the process subsystem.
Projects
None yet
3 participants