Files
continue/binary
Patrick Erichsen 291f8f5dd2 fix: ensure cross-target LanceDB binaries are correctly copied (#9100)
* fix: install lancedb binary for cross-target builds

* chore: add temporary darwin build workflow

* chore: remove temporary darwin workflow

* fix: prettier formatting in prepackage.js

Co-authored-by: nate <nate@continue.dev>

* fix: ensure cross-target LanceDB binaries copied

* fix: retain target lancedb binary in vsix

* Update prepackage.js

* fix: install LanceDB packages sequentially in binary build

The previous code ran installAndCopyNodeModules in parallel for all
targets, but they all write to node_modules/@lancedb. This caused
race conditions where files could be partially written or empty.

Changed to sequential installation to prevent file corruption.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: add diagnostic logging for lancedb copy

* chore: add detailed diagnostics to install-copy-nodemodule

* fix: remove cached lancedb before fresh copy

ncp's clobber option doesn't reliably overwrite cached files.
Delete destination directory before copying to ensure fresh install.

* chore: clean up diagnostic code, keep fix for cached lancedb

Root cause: ncp doesn't reliably overwrite cached files.
Fix: Remove destination directory before copying fresh lancedb binaries.

---------

Co-authored-by: continue[bot] <continue[bot]@users.noreply.github.com>
Co-authored-by: nate <nate@continue.dev>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-10 10:39:42 -08:00
..
2025-05-25 20:27:23 -07:00
2025-12-01 14:29:44 -08:00

Continue Core Binary

The purpose of this folder is to package Typescript code in a way that can be run from any IDE or platform. We first bundle with esbuild and then package into binaries with pkg.

The pkgJson/package.json contains instructions for building with pkg, and needs to be in a separte folder because there is no CLI flag for the assets option (it must be in a package.json), and pkg doesn't recognize any name other than package.json, but if we use the same package.json with dependencies in it, pkg will automatically include these, significantly increasing the binary size.

The build process is otherwise defined entirely in build.js.

List of native modules

  • sqlite3/build/Release/node_sqlite3.node (*)
  • @lancedb/**
  • esbuild?
  • @esbuild?
  • onnxruntime-node?

List of dynamically imported modules

  • posthog-node
  • @octokit/rest
  • esbuild

List of .wasm files

  • tree-sitter.wasm
  • tree-sitter-wasms/

(*) = need to download for each platform manually

Debugging

To debug the binary with IntelliJ, set useTcp to true in CoreMessenger.kt, and then in VS Code run the "Core Binary" debug script. Instead of starting a subprocess for the binary and communicating over stdin/stdout, the IntelliJ extension will connect over TCP to the server started from the VS Code window. You can place breakpoints anywhere in the core or binary folders.

Building

npm run build

Testing

npm run test