Skip to content

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

Merged
alan-agius4 merged 1 commit into
angular:mainfrom
clydin:feat-sqlite-cache-store
Jul 2, 2026
Merged

feat(@angular/build): add built-in SQLite cache store fallback#33499
alan-agius4 merged 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
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jul 2, 2026
@alan-agius4 alan-agius4 merged commit 34d558c into angular:main Jul 2, 2026
67 of 69 checks passed
@alan-agius4

Copy link
Copy Markdown
Collaborator

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants