Skip to content

cli: remove --no-experimental-sqlite flag - #67698

Open
christianaurichzm wants to merge 2 commits into
nodejs:mainfrom
christianaurichzm:sqlite-noop-flag
Open

christianaurichzm wants to merge 2 commits into
nodejs:mainfrom
christianaurichzm:sqlite-noop-flag

Conversation

@christianaurichzm

@christianaurichzm christianaurichzm commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #67654, as discussed with @aduh95 there.

node:sqlite is stable now, so it doesn't need an opt-out. This makes --experimental-sqlite an undocumented no-op, like --experimental-websocket after #65284. That's semver-major because --no-experimental-sqlite now fails as an invalid negation, and node.config.json rejects an "experimental-sqlite" key with either value.

The first commit is from #67727 (ERR_NO_SQLITE in builds without SQLite), split out so it can be backported. Only the second one is new here.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/config
  • @nodejs/loaders
  • @nodejs/sqlite
  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. config Issues and PRs related to Node.js configuration and feature settings. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Nov 22, 2026
@christianaurichzm christianaurichzm added semver-major PRs that contain breaking changes and should be released in the next major version. sqlite Issues and PRs related to the SQLite subsystem. labels Nov 22, 2026
Comment thread src/node_config.cc Resolved
Comment thread lib/internal/bootstrap/realm.js Outdated
Comment on lines +207 to +208
// The option is a no-op, so builds without SQLite never expose node:sqlite.
['sqlite', true, hasSQLite ? null : '--experimental-sqlite'],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's confusing, IIUC that implies that when node was built without SQLite support, --experimental-sqlite is no longer no-op?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No, it's still a no-op, so without SQLite the gate never opens. I reworded the comment. If you'd rather not rely on that, I can make lib/sqlite.js throw when SQLite is missing instead, like inspector does.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Or how node:crypto throws when built --without-ssl; let's do that and document it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done, it now throws ERR_NO_SQLITE, documented in sqlite.md and errors.md. I tested it in a --without-sqlite build with #67722 applied.

@codecov

codecov Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.54%. Comparing base (ec97d64) to head (e4a3bcb).
⚠️ Report is 59 commits behind head on main.

Files with missing lines Patch % Lines
lib/sqlite.js 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67698      +/-   ##
==========================================
- Coverage   90.60%   90.54%   -0.07%     
==========================================
  Files         801      801              
  Lines      281140   284125    +2985     
  Branches    54275    54867     +592     
==========================================
+ Hits       254739   257268    +2529     
- Misses      16576    17018     +442     
- Partials     9825     9839      +14     
Files with missing lines Coverage Δ
lib/internal/bootstrap/realm.js 97.09% <100.00%> (ø)
lib/internal/errors.js 98.12% <100.00%> (+<0.01%) ⬆️
src/node_options.cc 88.23% <100.00%> (-0.01%) ⬇️
src/node_options.h 95.74% <ø> (-0.02%) ⬇️
lib/sqlite.js 87.50% <50.00%> (-12.50%) ⬇️

... and 43 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.

@aduh95

aduh95 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Can we make ERR_NO_SQLITE part backportable?

Builds configured --without-sqlite hide node:sqlite because
--experimental-sqlite defaults to false there. Make the flag default to
true in every build and throw ERR_NO_SQLITE when the module is loaded
without SQLite, like node:crypto does without OpenSSL.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
node:sqlite is stable, so it no longer needs an opt-out.
--experimental-sqlite stays as an undocumented no-op, like
--experimental-websocket.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
@christianaurichzm

Copy link
Copy Markdown
Member Author

Sure, moved it to #67727, where the flag now defaults to true so builds without SQLite throw too. This PR is stacked on top of it.

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 and PRs related to Node.js configuration and feature settings. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version. sqlite Issues and PRs related to the SQLite subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants