Skip to content

Temporarily rollback support for Electron v42 prebuilds#1470

Merged
m4heshd merged 1 commit into
WiseLibs:masterfrom
m4heshd:electron-42-rollback
May 12, 2026
Merged

Temporarily rollback support for Electron v42 prebuilds#1470
m4heshd merged 1 commit into
WiseLibs:masterfrom
m4heshd:electron-42-rollback

Conversation

@m4heshd

@m4heshd m4heshd commented May 11, 2026

Copy link
Copy Markdown
Contributor

Avoid building for Electron v42 until the updated V8 API errors are resolved.

Meanwhile, we'll do a release with added support for Node v26 and SQLite 3.53.1.

Avoid building for electron v42 till the updated V8 API errors are sorted out.
@m4heshd m4heshd requested review from a team and JoshuaWise as code owners May 11, 2026 10:21
@m4heshd m4heshd merged commit 3f89324 into WiseLibs:master May 12, 2026
26 checks passed
reaatech added a commit to reaatech/invoicing-app that referenced this pull request May 17, 2026
The electron-rebuild step fails because better-sqlite3 (v12.10.0, the
latest) cannot compile against Electron 42's V8 headers. Three breaking
V8 API changes cause the build to fail:

1. v8::External::New(isolate, addon) now requires a 3rd argument
   (v8::ExternalPointerTypeTag)
2. v8::External::Value() now requires 1 argument (ExternalPointerTypeTag)
3. SetNativeDataProperty overloads are ambiguous with new signatures

These are known upstream issues (WiseLibs/better-sqlite3#1474,
WiseLibs/better-sqlite3#1470). The better-sqlite3 maintainers explicitly
removed Electron v42 prebuild support in v12.10.0 and are working on
fixing the V8 API compatibility.

No caller code in this repo needs changes — the breakage is entirely in
a transitive native dependency's compilation step.
reaatech added a commit to reaatech/invoicing-app that referenced this pull request May 20, 2026
The electron-rebuild step fails because better-sqlite3 (v12.10.0, the
latest) cannot compile against Electron 42's V8 headers. Three breaking
V8 API changes cause the build to fail:

1. v8::External::New(isolate, addon) now requires a 3rd argument
   (v8::ExternalPointerTypeTag)
2. v8::External::Value() now requires 1 argument (ExternalPointerTypeTag)
3. SetNativeDataProperty overloads are ambiguous with new signatures

These are known upstream issues (WiseLibs/better-sqlite3#1474,
WiseLibs/better-sqlite3#1470). The better-sqlite3 maintainers explicitly
removed Electron v42 prebuild support in v12.10.0 and are working on
fixing the V8 API compatibility.

No caller code in this repo needs changes — the breakage is entirely in
a transitive native dependency's compilation step.
reaatech added a commit to reaatech/invoicing-app that referenced this pull request May 20, 2026
* ci(deps-dev): bump electron from 40.10.0 to 42.1.0

Bumps [electron](https://github.com/electron/electron) from 40.10.0 to 42.1.0.
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](electron/electron@v40.10.0...v42.1.0)

---
updated-dependencies:
- dependency-name: electron
  dependency-version: 41.5.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: investigated electron from 40.10.0 → 42.1.0 CI failure

The electron-rebuild step fails because better-sqlite3 (v12.10.0, the
latest) cannot compile against Electron 42's V8 headers. Three breaking
V8 API changes cause the build to fail:

1. v8::External::New(isolate, addon) now requires a 3rd argument
   (v8::ExternalPointerTypeTag)
2. v8::External::Value() now requires 1 argument (ExternalPointerTypeTag)
3. SetNativeDataProperty overloads are ambiguous with new signatures

These are known upstream issues (WiseLibs/better-sqlite3#1474,
WiseLibs/better-sqlite3#1470). The better-sqlite3 maintainers explicitly
removed Electron v42 prebuild support in v12.10.0 and are working on
fixing the V8 API compatibility.

No caller code in this repo needs changes — the breakage is entirely in
a transitive native dependency's compilation step.

* fix(deps): adapt better-sqlite3 for V8 14 API in Electron 42

Patch three V8 API breaks in better-sqlite3 C++ source that prevent
compilation against Electron 42 headers (V8 14.x):

1. v8::External::New() now requires ExternalPointerTypeTag (3rd arg)
2. v8::External::Value() now requires ExternalPointerTypeTag
3. SetNativeDataProperty(0) ambiguous between new nullptr_t/setter overloads

Adds a postinstall script (scripts/patch-better-sqlite3.js) to apply
these patches idempotently after every npm install.

Also bumps better-sqlite3 from ^12.6.2 to ^12.10.0.

* fix: format scripts/patch-better-sqlite3.js with Prettier

The patch-better-sqlite3 postinstall script introduced in the prior
commit was not Prettier-formatted, causing the CI format check to fail.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: reaatech <rick@reaatech.com>
guevaramonts pushed a commit to guevaramonts/opt-tourney-manager that referenced this pull request May 23, 2026
better-sqlite3 12.9.0 + Electron 40 is the stable combination — Electron 42 has breaking V8 API changes that better-sqlite3 rolled back support for (see WiseLibs/better-sqlite3#1470). Pinned both to resolve compilation errors on start.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
EurFelux added a commit to EurFelux/marginalia that referenced this pull request Jun 1, 2026
… support

Electron 42 ships V8 14.8, whose v8::External::New/Value require a
mandatory ExternalPointerTypeTag argument. better-sqlite3 12.10.0 (latest)
still uses the old signatures, so its native addon fails to compile against
the Electron 42 ABI (pnpm start aborts in @electron/rebuild with
"node-gyp failed to rebuild better-sqlite3"). Upstream rolled back Electron
42 support (WiseLibs/better-sqlite3#1470); the fix PR #1475 is not yet
merged/released. Local Node 24's V8 13.6 keeps the old signatures, which is
why headless vitest never surfaced this.

Pin electron to 41.7.1 (latest 41.x; has prebuilt better-sqlite3 binaries)
until better-sqlite3 ships Electron 42 support. Documented in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
EurFelux added a commit to EurFelux/marginalia that referenced this pull request Jun 2, 2026
… support

Electron 42 ships V8 14.8, whose v8::External::New/Value require a
mandatory ExternalPointerTypeTag argument. better-sqlite3 12.10.0 (latest)
still uses the old signatures, so its native addon fails to compile against
the Electron 42 ABI (pnpm start aborts in @electron/rebuild with
"node-gyp failed to rebuild better-sqlite3"). Upstream rolled back Electron
42 support (WiseLibs/better-sqlite3#1470); the fix PR #1475 is not yet
merged/released. Local Node 24's V8 13.6 keeps the old signatures, which is
why headless vitest never surfaced this.

Pin electron to 41.7.1 (latest 41.x; has prebuilt better-sqlite3 binaries)
until better-sqlite3 ships Electron 42 support. Documented in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
TAGOOZ pushed a commit to TAGOOZ/bookmarkX that referenced this pull request Jun 6, 2026
The current build is broken because better-sqlite3@12.10.0 rolled back
Electron 42 prebuilds (PR WiseLibs/better-sqlite3#1470), and source
compilation hits a node-gyp + GCC 15 dependency-file bug on Linux.

ADR 0011 supersedes the local-DB layer described in ADR-0002:
- better-sqlite3 (sync, native) -> @libsql/client v0.17.3 (async, JS/WASM)
- sqlite-vec (loadable extension) -> libSQL built-in vectors
- Cloud stays on Supabase Postgres + pgvector

Updated:
- docs/PRD.md: tech-stack table, architecture diagram, vector user story,
  ADR index
- docs/adr/0011-libsql-client-local-sqlite.md: full ADR

A detailed execution plan and handoff for the next agent are saved to
/tmp/opencode/libsql-migration-plan.md and
/tmp/opencode/handoff-libsql-migration.md.
tomymaritano added a commit to dripnex/readide that referenced this pull request Jun 9, 2026
The v0.15.0 Build workflow failed on all three platforms (mac/win/linux,
run 27184736470) because better-sqlite3 12.10.0 explicitly removed
Electron v42 prebuilds in release notes:

> Temporarily rollback support for Electron v42 prebuilds
> (WiseLibs/better-sqlite3#1470)

Without a prebuild for Electron 42, electron-builder install-app-deps
falls through to a source build via @electron/rebuild. That build then
hits V8 API breakages introduced in Electron 42's V8 (V8 13.x):
- SetNativeDataProperty ambiguity (3 candidate overloads)
- External::Value() now requires an ExternalPointerTypeTag argument
- External::New() signature change

Until better-sqlite3 ships v42 prebuilds again (no public ETA), pin
Electron to its previous major. v41.7.1 is the latest 41.x as of
2026-05-26 and has a complete prebuild matrix.

After this change, `pnpm install` locally:

  apps/desktop postinstall: electronVersion=41.7.1 arch=arm64
  apps/desktop postinstall: buildFromSource=false
  apps/desktop postinstall: preparing       moduleName=better-sqlite3
  apps/desktop postinstall: finished        moduleName=better-sqlite3
  apps/desktop postinstall: completed installing native dependencies

`buildFromSource=false` = we used the prebuilt binary; no V8 compile
errors. CI Build for v0.15.1 should now succeed on all platforms
without further changes to electron-builder, codesign, or notarize
config.

This is Phase 0 A1 in the post-audit roadmap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tomymaritano added a commit to dripnex/readide that referenced this pull request Jun 9, 2026
The v0.15.0 Build workflow failed on all three platforms (mac/win/linux,
run 27184736470) because better-sqlite3 12.10.0 explicitly removed
Electron v42 prebuilds in release notes:

> Temporarily rollback support for Electron v42 prebuilds
> (WiseLibs/better-sqlite3#1470)

Without a prebuild for Electron 42, electron-builder install-app-deps
falls through to a source build via @electron/rebuild. That build then
hits V8 API breakages introduced in Electron 42's V8 (V8 13.x):
- SetNativeDataProperty ambiguity (3 candidate overloads)
- External::Value() now requires an ExternalPointerTypeTag argument
- External::New() signature change

Until better-sqlite3 ships v42 prebuilds again (no public ETA), pin
Electron to its previous major. v41.7.1 is the latest 41.x as of
2026-05-26 and has a complete prebuild matrix.

After this change, `pnpm install` locally:

  apps/desktop postinstall: electronVersion=41.7.1 arch=arm64
  apps/desktop postinstall: buildFromSource=false
  apps/desktop postinstall: preparing       moduleName=better-sqlite3
  apps/desktop postinstall: finished        moduleName=better-sqlite3
  apps/desktop postinstall: completed installing native dependencies

`buildFromSource=false` = we used the prebuilt binary; no V8 compile
errors. CI Build for v0.15.1 should now succeed on all platforms
without further changes to electron-builder, codesign, or notarize
config.

This is Phase 0 A1 in the post-audit roadmap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
github-actions Bot pushed a commit to dripnex/readide that referenced this pull request Jun 9, 2026
…pat (Phase 0 A1) (#290)

## Summary

Phase 0 A1 of the post-audit devops roadmap. **Unblocks v0.15.x Build.**

The v0.15.0 Build workflow failed on all 3 platforms (run
[27184736470](https://github.com/tomymaritano/readide/actions/runs/27184736470))
because **better-sqlite3 12.10.0 explicitly removed Electron v42
prebuilds**
([WiseLibs/better-sqlite3#1470](WiseLibs/better-sqlite3#1470)).
Without a prebuild, \`electron-builder install-app-deps\` falls through
to a source build via \`@electron/rebuild\`, which then hits V8 13.x API
breakages:
- \`SetNativeDataProperty\` ambiguity (3 candidate overloads)
- \`External::Value()\` requires \`ExternalPointerTypeTag\` argument
- \`External::New()\` signature change

Same root cause on Linux/macOS (GCC/clang) and Windows (MSVC).

## Fix

Pin Electron to \`^41.7.1\` (latest 41.x as of 2026-05-26).
better-sqlite3 has prebuilts for it.

## Local validation

\`\`\`
apps/desktop postinstall: electronVersion=41.7.1 arch=arm64
apps/desktop postinstall: buildFromSource=false
apps/desktop postinstall: preparing       moduleName=better-sqlite3
apps/desktop postinstall: finished        moduleName=better-sqlite3
apps/desktop postinstall: completed installing native dependencies
\`\`\`

\`buildFromSource=false\` = the prebuilt was found and consumed; no V8
errors.

- ✅ \`pnpm install\` (with scripts) — succeeds
- ✅ \`pnpm -r typecheck\` — green
- ✅ \`pnpm test\` — 17/17 packages

## When to bump back to 42

Watch [WiseLibs/better-sqlite3
releases](https://github.com/WiseLibs/better-sqlite3/releases) for v42
prebuild restoration. As of 2026-06-09 there's no public ETA. When it
lands: bump electron to \`^42.x\` + better-sqlite3 to the version that
re-includes v42 prebuilds, in a single PR.

## Stack context

This is **A1** of Phase 0 (devops stabilization). A2-A4, B1-B5, C1-C2, D
follow in subsequent PRs against develop.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
  * Updated the runtime dependency for the desktop application.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants