| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Review requested:
|
Sorry, something went wrong.
|
The two flags are already set up as aliases in the options parser FWIW https://github.com/nodejs/node/blob/master/src/node_options.cc#L95-L114 https://github.com/nodejs/node/blob/master/src/node_options.cc#L366-L374 |
Sorry, something went wrong.
Yep, so I found what the actually bug is, Line 101 in ccdd1bd assign experimental_specifier_resolution with es_module_specifier_resolution but what if we have experimental_specifier_resolution=node instead of es_module_specifier_resolution |
Sorry, something went wrong.
|
Why is --es-module-specifier-resolution not set up as an actual alias of --experimental-specifier-resolution (or vice versa) using AddAlias()? That doesn’t seem great in the first place |
Sorry, something went wrong.
|
@addaleax I think I set it up this way to ensure that both aliases were not used at the same time, which may have been a bit of overengineering. We could likely simplify the logic or simply remove the alias on master / 15 tbh |
Sorry, something went wrong.
|
@MylesBorins Yeah, I think that’s something we should definitely simplify. Having it be a plain alias turns it into a single line with basically 0 maintenance overhead (which can and should be kept indefinitely according to our policies). @himself65 Do you want to turn --experimental-specifier-resolution into an alias for --es-module-specifier-resolution yourself, or should I open a PR with that? |
Sorry, something went wrong.
|
@addaleax would a simple alias fail if both the original and alias are passed with different values? |
Sorry, something went wrong.
|
@MylesBorins No, but if necessary we could make that happen. However, I don’t think it’s worth all the complexity of this code. |
Sorry, something went wrong.
|
Do we have a documented priority of the option value if 2 conflicting values are supplied? |
Sorry, something went wrong.
The last specified value is used. This is just like when an option that has a single value is used twice. |
Sorry, something went wrong.
|
@addaleax any behavior seems fine, just want docs. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you :)
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
Sorry, something went wrong.
|
Landed in 20a074b0cd55 Landed in 22c52aa |
Sorry, something went wrong.
Fixes: nodejs#35095 PR-URL: nodejs#35098 Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Refs: #35098 (comment) PR-URL: #35106 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Refs: #35098 (comment) PR-URL: #35106 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Refs: #35098 (comment) PR-URL: #35106 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Fixes: nodejs#35095 PR-URL: nodejs#35098 Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Refs: nodejs#35098 (comment) PR-URL: nodejs#35106 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
| Back | FazBrowse Home | New Git URL |
Fixes: #35095
Checklist