Skip to content

inspector: fix builds without SQLite - #67722

Open
christianaurichzm wants to merge 1 commit into
nodejs:mainfrom
christianaurichzm:inspector-without-sqlite
Open

christianaurichzm wants to merge 1 commit into
nodejs:mainfrom
christianaurichzm:inspector-without-sqlite

Conversation

@christianaurichzm

Copy link
Copy Markdown
Member

./configure --without-sqlite fails to compile unless the inspector is disabled too:

$ ./configure --without-sqlite && make
In file included from ../src/inspector/dom_storage_agent.h:8,
                 from ../src/inspector_agent.cc:7:
../src/node_webstorage.h:10:10: fatal error: sqlite3.h: No such file or directory

Since #62145, dom_storage_agent.h includes node_webstorage.h, which needs SQLite. This replaces the include with a forward declaration and puts the code that reads localStorage and sessionStorage behind HAVE_SQLITE. Without SQLite, getDOMStorageItems still returns what was registered with inspector.DOMStorage.registerStorage(). Anything else gets the same "storage is unavailable" error as when localStorage is missing.

v24.x and v26.x got the same include in 24.16.0 and 26.1.0.

Refs: #62145

dom_storage_agent.h includes node_webstorage.h, which needs sqlite3.h,
so `./configure --without-sqlite` only compiles together with
`--without-inspector`. Forward-declare webstorage::Storage there and
build the agent's web storage fallback only with SQLite. Without it,
getDOMStorageItems reports unregistered storage as unavailable.

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

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/inspector

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Nov 23, 2026
@christianaurichzm christianaurichzm added inspector Issues and PRs related to the V8 inspector protocol. lts-watch-v26.x PRs that may need to be released in v26.x. labels Nov 23, 2026
@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.54%. Comparing base (2566f1b) to head (b42cf85).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #67722   +/-   ##
=======================================
  Coverage   90.54%   90.54%           
=======================================
  Files         801      801           
  Lines      284119   284119           
  Branches    54882    54883    +1     
=======================================
+ Hits       257257   257261    +4     
+ Misses      17022    17011   -11     
- Partials     9840     9847    +7     
Files with missing lines Coverage Δ
src/inspector/dom_storage_agent.cc 83.25% <ø> (ø)

... and 32 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 added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Nov 23, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 23, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95 aduh95 added the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue PRs queued for automated landing through the Commit Queue. inspector Issues and PRs related to the V8 inspector protocol. lts-watch-v26.x PRs that may need to be released in v26.x. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants