Skip to content

feat(@angular/build): add built-in SQLite cache store fallback#33499

Open
clydin wants to merge 1 commit into
angular:mainfrom
clydin:feat-sqlite-cache-store
Open

feat(@angular/build): add built-in SQLite cache store fallback#33499
clydin wants to merge 1 commit into
angular:mainfrom
clydin:feat-sqlite-cache-store

Conversation

@clydin

@clydin clydin commented Jul 1, 2026

Copy link
Copy Markdown
Member

To improve toolchain robustness in environments where native dependencies (like lmdb) fail to compile or load (e.g. Docker, locked-down CI environments), this change introduces a built-in SQLite cache store using Node.js v22's node:sqlite module.

@clydin clydin added the target: minor This PR is targeted for the next minor release label Jul 1, 2026
@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: @angular/build labels Jul 1, 2026
@clydin clydin marked this pull request as ready for review July 1, 2026 20:06

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new SQLite-backed persistent cache store (SqliteCacheStore) as a fallback for the native LMDB cache store, along with a unified PersistentCacheStore interface and factory initialization. Feedback focuses on improving robustness and performance: safely accessing error messages using optional chaining to prevent runtime TypeErrors, optimizing database operations by preparing and reusing SQL statements, wrapping cache parsing in a try-catch block to handle corruption, and properly cleaning up prepared statements upon closing the database.

Comment thread packages/angular/build/src/tools/esbuild/angular/compiler-plugin.ts
Comment thread packages/angular/build/src/tools/esbuild/cache.ts
Comment thread packages/angular/build/src/tools/esbuild/sqlite-cache-store.ts Outdated
Comment thread packages/angular/build/src/tools/esbuild/sqlite-cache-store.ts
Comment thread packages/angular/build/src/tools/esbuild/sqlite-cache-store.ts
Comment thread packages/angular/build/src/tools/esbuild/sqlite-cache-store.ts
@clydin clydin force-pushed the feat-sqlite-cache-store branch from aa5b08b to 58d93fa Compare July 1, 2026 20:11
To improve toolchain robustness in environments where native dependencies (like lmdb) fail to compile or load (e.g. Docker, locked-down CI environments), this change introduces a built-in SQLite cache store using Node.js v22's node:sqlite module.
@clydin clydin force-pushed the feat-sqlite-cache-store branch from 58d93fa to 7ba63cd Compare July 1, 2026 20:12
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer area: @angular/build detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release

1 participant