From 67198d59b1249dc8ab4a95590fd91160b18694b2 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 27 Jan 2024 07:36:50 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=92=9A=20Update=20package.json=20vers?= =?UTF-8?q?ion=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index d28a7ecb6..10055400f 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.31", + "version": "0.9.32", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.31", + "version": "0.9.32", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 618c768fe..e1850c796 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.31", + "version": "0.9.32", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 1f15b6dbf0997d50500f8eba82a8278900f65393 Mon Sep 17 00:00:00 2001 From: Stefan Kapusniak <121311569+one-lithe-rune@users.noreply.github.com> Date: Sun, 28 Jan 2024 04:05:44 +0000 Subject: [PATCH 2/2] Add install-dependencies.ps1, and point the associated vscode Task at it when running on Windows (#773) * Add install-dependencies.ps1 for windows * Add an install-dependencies.ps1 powershell script for installing the dependencies as the bash version didn't work for me on windows. * Update the install dependencies task definition to use the powershell script rather than the bash script on windows. * Installs node on windows if its not already installed. * Installs yarn 1.x on windows at extensions/vscode level as it seems `npm run package` needs it. * Remove auto-install of manual dependencies In install-dependencies.ps1: * Add cargo as one of the manually installed dependencies. * Only check for cargo, node, and yarn being available, rather than attempting to install them if they are not present. * Print suitable messages when cargo, node or yarn are not present and then exit. --- .vscode/tasks.json | 3 +- install-dependencies.ps1 | 95 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 install-dependencies.ps1 diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 767734ec5..758820fa5 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -102,8 +102,9 @@ { "label": "install-all-dependencies", "type": "shell", + "windows": { "command": "./install-dependencies.ps1" }, "command": "./install-dependencies.sh", - "problemMatcher": [] // Empty so users are not promted to select progress reporting + "problemMatcher": [] // Empty so users are not prompted to select progress reporting }, // // Start the React App for debugging with Vite diff --git a/install-dependencies.ps1 b/install-dependencies.ps1 new file mode 100644 index 000000000..3e9225f6e --- /dev/null +++ b/install-dependencies.ps1 @@ -0,0 +1,95 @@ +# This is used in a task in .vscode/tasks.json when on windows +# Start developing with: +# - Run Task -> Install Dependencies +# - Debug -> Extension + +# Everything needs node and npm +Write-Host "`nChecking for dependencies that may require manual installation...`n" -ForegroundColor White + +$cargo = (get-command cargo -ErrorAction SilentlyContinue) +if ($null -eq $cargo) { + Write-Host "Not Found " -ForegroundColor Red -NoNewLine + Write-Host "cargo" +} else { + Write-Host "Found " -ForegroundColor Green -NoNewLine + & cargo --version +} + +$node = (get-command node -ErrorAction SilentlyContinue) +if ($null -eq $node) { + Write-Host "Not Found " -ForegroundColor Red -NoNewLine + Write-Host "node" +} else { + Write-Host "Found " -ForegroundColor Green -NoNewLine + Write-Host "node " -NoNewLine + & node --version +} + +Push-Location extensions/vscode +$yarn = (get-command yarn -ErrorAction SilentlyContinue) +if ($null -eq $yarn) { + Write-Host "Not Found " -ForegroundColor Red -NoNewLine + Write-Host "yarn" +} else { + Write-Host "Found " -ForegroundColor Green -NoNewLine + Write-Host "yarn " -NoNewLine + & yarn --version +} +Pop-Location + +if ($null -eq $cargo) { + Write-Host "`n...`n" + Write-Host "Cargo`n" -ForegroundColor White + Write-Host "Doesn't appear to be installed or is not on your Path." + Write-Host "For how to install cargo see:" -NoNewline + Write-Host "https://doc.rust-lang.org/cargo/getting-started/installation.html" -ForegroundColor Green +} + +if ($null -eq $node) { + Write-Host "`n...`n" + Write-Host "NodeJS`n" -ForegroundColor White + Write-Host "Doesn't appear to be installed or is not on your Path." + Write-Host "On most Windows systems you can install node using: " -NoNewLine + Write-Host "winget install OpenJS.NodeJS.LTS " -ForegroundColor Green + Write-Host "After installing restart your Terminal to update your Path." + Write-Host "Alternatively see: " -NoNewLine + Write-Host "https://nodejs.org/" -ForegroundColor Yellow +} + +if ($null -eq $yarn) { + Write-Host "`n...`n" + Write-Host "Yarn`n" -ForegroundColor White + Write-Host "Doesn't appear to be installed or is not accessible from .\extensions\vscode" + Write-Host "For how to install Yarn 1.x see:" + Write-Host "https://classic.yarnpkg.com/lang/en/docs/install/#windows-stable" -ForegroundColor Yellow + Write-Host "For how to install Yarn 2.x or 3.x see: " + Write-Host "https://yarnpkg.com/getting-started/install" -ForegroundColor Yellow +} + +if (($null -eq $cargo) -or ($null -eq $node) -or ($null -eq $yarn)) { + return "`nSome dependencies that may require installation could not be found. Exiting" +} + +Write-Host "`nInstalling Core extension dependencies..." -ForegroundColor White +Push-Location core +npm install +npm link +Pop-Location + +Write-Output "`nInstalling GUI extension dependencies..." -ForegroundColor White +Push-Location gui +npm install +npm link core +Pop-Location + +# VSCode Extension (will also package GUI) +Write-Output "`nInstalling VSCode extension dependencies..." -ForegroundColor White +Push-Location extensions/vscode + +# This does way too many things inline but is the common denominator between many of the scripts +npm install +npm link core + +npm run package + +Pop-Location