Skip to content

updates config #6039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 22 additions & 9 deletions binary/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ const {
autodetectPlatformAndArch,
} = require("../scripts/util");
const { downloadRipgrep } = require("./utils/ripgrep");

/**
* ALL_Targets:win32-x64
* TARGET_TO_LANCEDB:"win32-x64": "@lancedb/vectordb-win32-x64-msvc","win32-arm64": "@lancedb/vectordb-win32-arm64-msvc",
*/

const { ALL_TARGETS, TARGET_TO_LANCEDB } = require("./utils/targets");

const bin = path.join(__dirname, "bin");
Expand Down Expand Up @@ -37,6 +43,7 @@ const assetBackups = [
];

let esbuildOnly = false;
console.log("[info]:process.argv", JSON.stringify(process.argv));
for (let i = 2; i < process.argv.length; i++) {
if (process.argv[i] === "--esbuild-only") {
esbuildOnly = true;
Expand Down Expand Up @@ -83,6 +90,10 @@ async function installNodeModuleInTempDirAndCopyToCurrent(packageName, toCopy) {
// This is a way to install only one package without npm trying to install all the dependencies
// Create a temporary directory for installing the package
const adjustedName = packageName.replace(/@/g, "").replace("/", "-");
console.log(
`[info] Creating temporary directory for installing ${packageName}`,
adjustedName,
);
const tempDir = path.join(
__dirname,
"tmp",
Expand Down Expand Up @@ -263,15 +274,17 @@ async function downloadRipgrepForTarget(target, targetDir) {

// Download and unzip prebuilt sqlite3 binary for the target
console.log("[info] Downloading node-sqlite3");

const downloadUrl =
// node-sqlite3 doesn't have a pre-built binary for win32-arm64
target === "win32-arm64"
? "https://continue-server-binaries.s3.us-west-1.amazonaws.com/win32-arm64/node_sqlite3.tar.gz"
: `https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v6-${
target
}.tar.gz`;

// only win32-x64
const downloadUrl = `https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v6-${target}.tar.gz`;
// node-sqlite3 doesn't have a pre-built binary for win32-arm64
/*** 原来的代码
const downloadUrl = target === "win32-arm64"
? "https://continue-server-binaries.s3.us-west-1.amazonaws.com/win32-arm64/node_sqlite3.tar.gz"
: `https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v6-${
target
}.tar.gz`;
*/
// target
execCmdSync(`curl -L -o ${targetDir}/build.tar.gz ${downloadUrl}`);
execCmdSync(`cd ${targetDir} && tar -xvzf build.tar.gz`);

Expand Down
8 changes: 5 additions & 3 deletions binary/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion binary/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"pkg": "^5.8.1",
"rimraf": "^5.0.7",
"ts-jest": "^29.1.4",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"@lancedb/vectordb-win32-x64-msvc": "0.4.20"
},
"dependencies": {
"@octokit/rest": "^20.0.2",
Expand Down
26 changes: 0 additions & 26 deletions binary/pkgJson/darwin-arm64/package.json

This file was deleted.

26 changes: 0 additions & 26 deletions binary/pkgJson/darwin-x64/package.json

This file was deleted.

26 changes: 0 additions & 26 deletions binary/pkgJson/linux-arm64/package.json

This file was deleted.

26 changes: 0 additions & 26 deletions binary/pkgJson/linux-x64/package.json

This file was deleted.

29 changes: 0 additions & 29 deletions binary/pkgJson/win32-arm64/package.json

This file was deleted.

2 changes: 2 additions & 0 deletions binary/utils/ripgrep.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const fs = require("fs");
const path = require("path");
const { rimrafSync } = require("rimraf");
const tar = require("tar");
// RIPGREP_VERSION = "14.1.1"
const { RIPGREP_VERSION, TARGET_TO_RIPGREP_RELEASE } = require("./targets");
const AdmZip = require("adm-zip");

Expand Down Expand Up @@ -88,6 +89,7 @@ async function downloadRipgrep(target, targetDir) {
try {
// Download the ripgrep release
console.log(`[info] Downloading ripgrep from ${downloadUrl}`);
console.log(`[info] Downloading ripgrep to ${archivePath}`);
await downloadFile(downloadUrl, archivePath);

// Extract the archive
Expand Down
26 changes: 13 additions & 13 deletions binary/utils/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@ const RIPGREP_VERSION = "14.1.1";
* All supported platform-architecture targets
*/
const ALL_TARGETS = [
"darwin-x64",
"darwin-arm64",
"linux-x64",
"linux-arm64",
// "darwin-x64",
// "darwin-arm64",
// "linux-x64",
// "linux-arm64",
"win32-x64",
];

/**
* Mapping from target triplets to ripgrep release file names
*/
const TARGET_TO_RIPGREP_RELEASE = {
"darwin-x64": `ripgrep-${RIPGREP_VERSION}-x86_64-apple-darwin.tar.gz`,
"darwin-arm64": `ripgrep-${RIPGREP_VERSION}-aarch64-apple-darwin.tar.gz`,
"linux-x64": `ripgrep-${RIPGREP_VERSION}-x86_64-unknown-linux-musl.tar.gz`,
"linux-arm64": `ripgrep-${RIPGREP_VERSION}-aarch64-unknown-linux-gnu.tar.gz`,
// "darwin-x64": `ripgrep-${RIPGREP_VERSION}-x86_64-apple-darwin.tar.gz`,
// "darwin-arm64": `ripgrep-${RIPGREP_VERSION}-aarch64-apple-darwin.tar.gz`,
// "linux-x64": `ripgrep-${RIPGREP_VERSION}-x86_64-unknown-linux-musl.tar.gz`,
// "linux-arm64": `ripgrep-${RIPGREP_VERSION}-aarch64-unknown-linux-gnu.tar.gz`,
"win32-x64": `ripgrep-${RIPGREP_VERSION}-x86_64-pc-windows-msvc.zip`,
};

/**
* Mapping from target triplets to LanceDB package names
*/
const TARGET_TO_LANCEDB = {
"darwin-arm64": "@lancedb/vectordb-darwin-arm64",
"darwin-x64": "@lancedb/vectordb-darwin-x64",
"linux-arm64": "@lancedb/vectordb-linux-arm64-gnu",
"linux-x64": "@lancedb/vectordb-linux-x64-gnu",
// "darwin-arm64": "@lancedb/vectordb-darwin-arm64",
// "darwin-x64": "@lancedb/vectordb-darwin-x64",
// "linux-arm64": "@lancedb/vectordb-linux-arm64-gnu",
// "linux-x64": "@lancedb/vectordb-linux-x64-gnu",
"win32-x64": "@lancedb/vectordb-win32-x64-msvc",
"win32-arm64": "@lancedb/vectordb-win32-arm64-msvc",
// "win32-arm64": "@lancedb/vectordb-win32-arm64-msvc",
};

module.exports = {
Expand Down
35 changes: 21 additions & 14 deletions core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@aws-sdk/credential-providers": "^3.778.0",
"@continuedev/config-types": "^1.0.13",
"@continuedev/config-yaml": "file:../packages/config-yaml",
"@continuedev/fetch": "^1.0.10",
"@continuedev/fetch": "file:../packages/fetch",
"@continuedev/llm-info": "^1.0.8",
"@continuedev/openai-adapters": "^1.0.25",
"@modelcontextprotocol/sdk": "^1.12.0",
Expand Down
Loading
Loading