-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: add warnings for experimental flags #30617
Conversation
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.
Amazing work tackling this one... really appreciated.
Note that all the warnings need to have a boolean check that they have already been shown to ensure they only get shown once.
@guybedford Thanks for your review! I've noticed that there is already a function in Line 168 in 0646eda
Shall we reuse this function? |
Yes that is the function to use. Is there a version of that for C++ to use
or do we have to create our own?
…On Mon, Nov 25, 2019 at 09:01 Rongjian Zhang ***@***.***> wrote:
@guybedford <https://github.com/guybedford> Thanks for your review!
I've noticed that there is already a function in lib/internal/util.js to
ensure that experimental message only show once, by saving shown flags to a
set and check it at next time.
https://github.com/nodejs/node/blob/0646eda4fc0affb98e13c30acb522e63b7fd6dde/lib/internal/util.js#L168
Shall we reuse this function?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30617?email_source=notifications&email_token=AAESFSRMRNLUXRSRIWPZO5LQVPLE3A5CNFSM4JQ5LIBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFCPVPQ#issuecomment-558168766>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAESFSSSUBHPZY4QTV34IJDQVPLE3ANCNFSM4JQ5LIBA>
.
|
This LGTM code-wise 👍 |
Hi @guybedford , I've updated the current progress at #30617 (comment). There are some questions I haven't figured out and I'd like to ask you:
{{Feature name}} is an experimental feature. This feature could change at any time
Thanks! |
This has been added in the PR at #30678. We're discussing it at https://github.com/nodejs/node/pull/30678/files#r351640229.
The test-esm-exports.mjs test runs with the A new test for the warning messages only could be worthwhile though. |
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.
Mostly just wording fixes etc. Looking good.
I also believe that the JS warning methods don't automatically dedupe themselves like this C++ one does. That seems to be an argument for having boolean flags at the calling points... but I'm not set either way on this. |
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.
This seems great to merge at this point to me. @pd4d10 just let me know when you are ready for the CI run.
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.
It seems all the logic is there now, final comments are just on the wording of the messages.
Windows CI re-run: https://ci.nodejs.org/job/node-test-commit-windows-fanned/31996/ |
Landed in aa4c57a. |
Fixes: #30600
Progress
--es-module-specifier-resolution=node
has been added in the PR at #30678.Warning Message
--experimental-json-modules
--experimental-wasm-modules
--experimental-resolve-self
--experimental-conditional-exports
Test Case
--experimental-json-modules
--experimental-wasm-modules
--experimental-resolve-self
--experimental-conditional-exports
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes