-
Notifications
You must be signed in to change notification settings - Fork 3.6k
feat: remove config.ts support and esbuild runtime packaging across repo #7895
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
base: main
Are you sure you want to change the base?
Conversation
- remove logic for compiling and importing ~/.continue/config.ts - add fail-fast error if a legacy config.ts is detected - simplify loader to JSON/YAML only - skip one legacy test and adjust comments/strings refs continuedev#4173
- drop esbuild and @sentry/esbuild-plugin from core devDependencies - retypecheck and test after removal
… scaffolding - drop @esbuild hoist rule in .npmrc - remove esbuild from runtime dependencies (keep in devDeps for bundling) - strip esbuild download/copy and validation in prepackage scripts - remove getTsConfigPath import and config.ts scaffolding from activation
@Patrick-Erichsen: A first attempt to removing the bundled esbuild executable from the vscode extension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So much confusing code removed with this 🙌 Changes all look great aside from a few nitpicks on additional cleanup
As to the failing tests, I would recommend trying to just pass the output to an LLM for a few attempts at bugfixing. At a glance it seems like the issue isn't related to actual config.ts
logic in any of the tests but rather some build issues.
If that doesn't work though I'd be happy to take a stab at fixing some of the tests though.
void this.configHandler.reloadConfig( | ||
"config.yaml updated - fs file watch", | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole fn watcher is not necessary. Also getConfigTsPath
should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed the watcher but getConfigTsPath()
is being used here for fail fast legacy config.ts
detection. Would you like me to remove this as well?
@TyDunn let's talk about this one, might be other approaches to removing esbuild that don't remove config.ts support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joffeoja this is great. Spoke with the team further about this and we're thinking let's remove esbuild module installation while still supporting config.ts by assuming users already have esbuild installed and showing them an error with instructions if they don't e.g. config.ts has been deprecated and esbuild is no longer automatically installed by Continue. To use config.ts, you can run
npm i [email protected] in ~/.continue`. Sorry for the partial bait and switch on this
This would look like about half of this PR staying exactly the same and then the actual config loading left in place for now with that message if esbuild isn't found. I added some comments and let me know if you have any thoughts on this!
await copyTreeSitterWasms(); | ||
|
||
// Copy tree-sitter tag query files | ||
await copyTreeSitterTagQryFiles(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure we can remove tree sitter? Not config-ts related
"dbinfoz": "^0.14.0", | ||
"diff": "^7.0.0", | ||
"downshift": "^7.6.0", | ||
"esbuild": "0.17.19", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this esbuild is used for local dev, not the same as the one used for config.ts. Does that make sense? Or is this just unused?
} | ||
|
||
// Add necessary files | ||
getTsConfigPath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one can stay so that legacy users just have to npm i esbuild rather than trying to set up some ts config
} | ||
``` | ||
|
||
### How to Use `config.ts` for Advanced Configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could replace with a little deprecation note including how to install esbuild to use existing config.ts files
"@typescript-eslint/eslint-plugin": "^8.40.0", | ||
"@typescript-eslint/parser": "^8.40.0", | ||
"cross-env": "^7.0.3", | ||
"esbuild": "0.17.19", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these esbuild modules are separate from the ones copied for config.ts support? maybe not
import fs from "node:fs"; | ||
import path from "node:path"; | ||
|
||
import { describe, expect, test } from "vitest"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can leave this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can leave this file as is and add an ide message with instructions on how to install esbuild if it is not found
- [`config.json`](/reference) - The original configuration format which is stored in a file at the same location as `config.yaml` | ||
- [`.continuerc.json`](#how-to-use-continuercjson-for-workspace-configuration) - Workspace-level configuration | ||
- [`config.ts`](#how-to-use-configts-for-advanced-configuration) - Advanced configuration (probably unnecessary) - a TypeScript file in your home directory that can be used to programmatically modify (_merged_) the `config.json` schema: | ||
- `~/.continue/config.ts` (MacOS / Linux) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can leave in place with deprecation notice
console.log("[info] Downloading pre-built ripgrep binary"); | ||
rimrafSync("node_modules/@vscode/ripgrep/bin"); | ||
fs.mkdirSync("node_modules/@vscode/ripgrep/bin", { recursive: true }); | ||
4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆
} | ||
|
||
async function copyTreeSitterTagQryFiles() { | ||
// ncp( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah I see, it's empty
@RomneyDa & @Patrick-Erichsen: With these scope changes I think it's better to start over completely, not least for better readability when performing the code review... I'll leave this and the previous PR (#7790) for reference but to have a coherent changeset I feel I have start from scratch. |
Summary
This PR removes support for
config.ts
and all associatedesbuild
runtime packaging logic across the repository.Per discussion in #4173, the only remaining reason for including
esbuild
incore
was to compileconfig.ts
. That feature was deprecated more than 6 months ago, so it is now fully removed.Changes
Core
~/.continue/config.ts
fromload.ts
.config.ts
is present, Continue will stop and instruct the user to migrate toconfig.yaml
orconfig.json
.getTsConfigPath
and other helpers inutil/paths.ts
.ConfigHandler.vitest.ts
).core/package.json
:esbuild
runtime dependency.@sentry/esbuild-plugin
).Documentation
configuration.mdx
:config.ts
.config.ts
is fully removed as of 2025.Motivation
esbuild
from the runtime.config.yaml
andconfig.json
).Security
This PR removes any embedded esbuild runtime from our VSIX and core. That:
Supersedes #7790, which attempted to mitigate by upgrading the embedded binary; this PR removes the runtime binary entirely.
Related Issue
Refs #4173