Skip to content

src: unflag --experimental-default-config-file #58703

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marco-ippolito
Copy link
Member

@marco-ippolito marco-ippolito commented Jun 13, 2025

Let's unflag it in Node.js v25

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Jun 13, 2025

Review requested:

  • @nodejs/config
  • @nodejs/test_runner
  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. config Issues or PRs related to the config subsystem needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. test_runner Issues and PRs related to the test runner subsystem. labels Jun 13, 2025
@marco-ippolito marco-ippolito marked this pull request as ready for review June 13, 2025 10:22
@marco-ippolito marco-ippolito added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jun 13, 2025
@marco-ippolito marco-ippolito changed the title src: unflag --experimental-default-config src: unflag --experimental-default-config-file Jun 13, 2025
Copy link

codecov bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.13%. Comparing base (bba07d7) to head (6043c63).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58703      +/-   ##
==========================================
- Coverage   90.17%   90.13%   -0.04%     
==========================================
  Files         637      637              
  Lines      188023   187999      -24     
  Branches    36887    36878       -9     
==========================================
- Hits       169552   169461      -91     
- Misses      11223    11286      +63     
- Partials     7248     7252       +4     
Files with missing lines Coverage Δ
lib/internal/process/pre_execution.js 92.43% <100.00%> (-0.43%) ⬇️
lib/internal/test_runner/runner.js 92.64% <ø> (-0.01%) ⬇️
src/node_options.cc 84.44% <ø> (-0.12%) ⬇️
src/node_options.h 97.84% <100.00%> (ø)

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@marco-ippolito marco-ippolito force-pushed the unflag-default-config-file branch from f664b7b to 76d618d Compare June 13, 2025 11:40
doc/api/cli.md Outdated
@@ -990,7 +990,7 @@ added:

> Stability: 1.0 - Early development

If the `--experimental-default-config-file` flag is present, Node.js will look for a
Unless `--no-experimental-default-config-file` flag is present, Node.js will look for a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still an experimental feature (line 991). What's the goal of this change? We should also make it stable at the same time, or not enable it this early.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make it stable? It's still experimental but people can start using it with a nice dx, so that node automatically picks up node.config.json without the flag

Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to stabilize this feature before enabling it by default?

  • Stabilize the default config file (remove the --experimental)
  • Enable it by default

@marco-ippolito
Copy link
Member Author

marco-ippolito commented Jun 14, 2025

To answer both @RafaelGSS and @anonrig it does not make sense to stabilize and then unflag because similarly to --experimental-strip-types we can only determine the impact it has on ecosystem if enabled by default.
For example if the default name conflicts with some other framework that we are unaware of, and we have to make a change, we would not be able to do it after making it stable without deprecation cycle.

@marco-ippolito marco-ippolito force-pushed the unflag-default-config-file branch from 76d618d to 6043c63 Compare June 14, 2025 06:55
Copy link
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should unflag this while having the config file as an experimental feature.

@marco-ippolito
Copy link
Member Author

marco-ippolito commented Jun 14, 2025

There is no way it can become stable before being unflagged as I explained above. @nodejs/tsc

@RafaelGSS
Copy link
Member

RafaelGSS commented Jun 15, 2025

There is no way it can become stable before being unflagged as I explained above. @nodejs/tsc

I won’t be too strong about this, but that’s usually how it works for most experimental flags we introduce—for example, the Permission Model. If we enable an experimental feature by default before addressing all the necessary security patches (while the feature is still opt-in and experimental), it feels a bit odd and too risky in my opinion. Some features just need more time for people to adopt and test. Forcing them (or enabling by default) feels like pushing it too much, IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. config Issues or PRs related to the config subsystem needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. semver-major PRs that contain breaking changes and should be released in the next major version. test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants