fix: minor issues (#581)

* fix: minor issues

* chore: poetry lock --no-update

* chore: write stdout and stderr in failed "npm build"

* chore: remove redundant lines in prepackage.js

* fix: Added stdout and stderr outputs to error handling in install_from_source.py
This commit is contained in:
LangLangBart 2023-10-25 18:59:10 +02:00 • committed by GitHub
parent f3d1ef79be
commit 570f61de5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 39 deletions

View file

@ -1,7 +1,7 @@
---
title: Other Configuration
description: Swap out different LLM providers
keywords: [tempature, custom policies, custom system messsage]
keywords: [temperature, custom policies, custom system message]
---
# Other Configuration

View file

@ -1,6 +1,6 @@
---
title: How Continue works
description: Overview of the Continue archictecture
description: Overview of the Continue architecture
keywords: [architecture, vs code, jetbrains, ide, manually]
---

View file

@ -2,7 +2,7 @@
**[Continue](https://continue.dev/docs) is the open-source autopilot for software development—an extension that brings the power of ChatGPT to your IDE**
### Get possible explainations
### Get possible explanations
Ask Continue about a part of your code to get another perspective

View file

@ -31,33 +31,33 @@ def main():
# Clear out old stuff
build_directory = "../build"
remove_existing_vsix_files(build_directory)
run("rm ../server/continuedev-0.1.2-py3-none-any.whl", True)
run("rm ../../../server/continuedev-0.1.2-py3-none-any.whl", True)
# Check for Python and Node - we won't install them, but will warn
resp1 = run("python --version")
resp2 = run("python3 --version")
if resp1.stderr and resp2.stderr:
if resp1.returncode != 0 and resp2.returncode != 0:
print(
"Python is required for Continue but is not installed on your machine. See https://www.python.org/downloads/ to download the latest version, then try again."
)
return
resp = run("node --version")
if resp.stderr:
if resp.returncode != 0:
print(
"Node is required for Continue but is not installed on your machine. See https://nodejs.org/en/download/ to download the latest version, then try again."
)
return
resp = run("npm --version")
if resp.stderr:
if resp.returncode != 0:
print(
"NPM is required for Continue but is not installed on your machine. See https://nodejs.org/en/download/ to download the latest version, then try again."
)
return
resp = run("poetry --version")
if resp.stderr:
if resp.returncode != 0:
print(
"Poetry is required for Continue but is not installed on your machine. See https://python-poetry.org/docs/#installation to download the latest version, then try again."
)
@ -74,20 +74,19 @@ def main():
break
if not editor_cmd:
print(
"No code editor command is available. Please install a code editor and try again."
)
print("No code editor command is available. Please install a code editor and try again.")
return
resp = run("cd ../../continuedev; poetry install; poetry run typegen")
resp = run("cd ../../../server; poetry install; poetry run typegen")
if resp.returncode != 0:
print("Error running the poetry commands. Please try again.")
return
resp = run(
"cd ../../..; npm i; cd gui; npm i; cd ../extensions/vscode; npm run package"
)
if resp.stderr:
resp = run("cd ..; npm i; cd gui; npm i; cd ..; npm run package", True)
if resp.returncode != 0:
print("Error packaging the extension. Please try again.")
print("This was the error: ", resp.stderr)
print("stdout: ", resp.stdout.decode())
print("stderr: ", resp.stderr.decode())
return
run(

View file

@ -21,7 +21,13 @@ exec("npm install", (error) => {
if (error) throw error;
console.log("npm install in gui completed");
exec("npm run build", (error) => {
exec("npm run build", (error, stdout, stderr) => {
if (error) {
console.log("Error running npm run build in gui");
console.log("stdout: ", stdout);
console.log("stderr: ", stderr);
throw error;
}
// Then copy over the dist folder to the Intellij extension
const intellijExtensionWebviewPath = path.join(
"..",
@ -71,10 +77,6 @@ exec("npm install", (error) => {
console.log("Copied gui build to VSCode extension");
});
if (error) {
console.log("Error running npm run build in gui: ", error);
throw error;
}
if (!fs.existsSync(path.join("dist", "assets", "index.js"))) {
throw new Error("gui build did not produce index.js");
}

18
server/poetry.lock generated
View file

@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
[[package]]
name = "aiofiles"
@ -2290,20 +2290,6 @@ files = [
[package.dependencies]
mpmath = ">=0.19"
[[package]]
name = "tenacity"
version = "8.2.3"
description = "Retry code until it succeeds"
optional = false
python-versions = ">=3.7"
files = [
{file = "tenacity-8.2.3-py3-none-any.whl", hash = "sha256:ce510e327a630c9e1beaf17d42e6ffacc88185044ad85cf74c0a8887c6a0f88c"},
{file = "tenacity-8.2.3.tar.gz", hash = "sha256:5398ef0d78e63f40007c1fb4c0bff96e1911394d2fa8d194f77619c05ff6cc8a"},
]
[package.extras]
doc = ["reno", "sphinx", "tornado (>=4.5)"]
[[package]]
name = "tiktoken"
version = "0.4.0"
@ -3049,4 +3035,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p
[metadata]
lock-version = "2.0"
python-versions = "^3.8.1"
content-hash = "7a5cc2f989f9bb12ed7735355fbe27d1fc590edde5bb9727dfc6f9898b0d2254"
content-hash = "3cb831bcd0ce1c9cb2e1c353a0a7449fe0afe4ad8e1c3de2e806c27e80366207"