-
Notifications
You must be signed in to change notification settings - Fork 31.3k
assert: lazy load acorn #19863
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
assert: lazy load acorn #19863
Conversation
This makes sure acorn is only loaded in case it is necessary.
Doesn't this make Upd: ah, I still am not very comfortable on having |
@ChALkeR this change will only load acorn once, when it is first required. After that, the module cache should be hit besides the error cache that is implemented here as well. I am not a huge fan of using acorn either but it makes simple assert much more powerful. If there is a different way of doing this: I would love to know. |
@ChALkeR I guess your comment is not blocking this PR, right? |
This makes sure acorn is only loaded in case it is necessary. PR-URL: nodejs#19863 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 9c06770 Since the |
@BridgeAR My comment was not blocking this, but I am unhappy with how this upsets |
This makes sure acorn is only loaded in case it is necessary. This prevents acorn always being loaded on startup.
I decided to use the modules cache instead of special handling this. The loading
is only done rarely.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes