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

--experimental modules flags should have warnings #30600

Closed
guybedford opened this issue Nov 22, 2019 · 3 comments
Closed

--experimental modules flags should have warnings #30600

guybedford opened this issue Nov 22, 2019 · 3 comments
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. good first issue Issues that are suitable for first-time contributors. help wanted Issues that need assistance from volunteers or PRs that need help to proceed.

Comments

@guybedford
Copy link
Contributor

Currently the following experimental modules flags don't have warnings:

  • --experimental-json-modules
  • --experimental-wasm-modules
  • --experimental-resolve-self
  • --experimental-conditional-exports
  • --es-module-specifier-resolution=node

Ideally when using any of these flags we should provide a warning message that not only is the base experimental modules implementation unstable, but these flags are not even clear if they will be provided as final features in the implementation and any of them might be removed still.

@guybedford guybedford added the esm Issues and PRs related to the ECMAScript Modules implementation. label Nov 22, 2019
@pd4d10
Copy link
Contributor

pd4d10 commented Nov 23, 2019

If multiple experimental flags specified, should these warnings emitted separately for every flag, or merged into one?

@guybedford
Copy link
Contributor Author

I would prefer one for each. Warning consolidation is a separate consideration for Node.js more generally I think.

@guybedford
Copy link
Contributor Author

guybedford commented Nov 23, 2019

For at least --experimental-json-modules, --experimental-wasm-modules it should be possible to move the warnings to their first use.

For --experimental-resolve-self and --experimental-conditional-exports the first use would be within C++ code and applies both to the CJS and ESM resolver implementations so may be a bit trickier, but it is in theory possible.

@guybedford guybedford added good first issue Issues that are suitable for first-time contributors. help wanted Issues that need assistance from volunteers or PRs that need help to proceed. labels Nov 25, 2019
targos pushed a commit that referenced this issue Dec 9, 2019
PR-URL: #30617
Fixes: #30600
Reviewed-By: Guy Bedford <guybedford@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 12, 2020
PR-URL: #30617
Fixes: #30600
Reviewed-By: Guy Bedford <guybedford@gmail.com>
BethGriggs pushed a commit that referenced this issue Feb 6, 2020
PR-URL: #30617
Fixes: #30600
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. good first issue Issues that are suitable for first-time contributors. help wanted Issues that need assistance from volunteers or PRs that need help to proceed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants