Skip to content
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

Duplicate esbuild binaries shipped in the VS Code extension #3999

Open
3 tasks done
fbricon opened this issue Feb 6, 2025 · 7 comments
Open
3 tasks done

Duplicate esbuild binaries shipped in the VS Code extension #3999

fbricon opened this issue Feb 6, 2025 · 7 comments
Assignees
Labels
good-first-issue Suggested issue for new contributors ide:vscode Relates specifically to VS Code extension kind:bug Indicates an unexpected problem or unintended behavior

Comments

@fbricon
Copy link
Contributor

fbricon commented Feb 6, 2025

Before submitting your bug report

Relevant environment info

- OS: Mac OS
- Continue version: 0.9.261
- IDE version: VS Code 1.96.4

Description

The Continue vsix ships 2 esbuild 0.17.19 binaries in out/node_modules, wasting an extra ~9MB of bandwidth/space.

Image Image

To reproduce

No response

Log output

@dosubot dosubot bot added ide:vscode Relates specifically to VS Code extension kind:bug Indicates an unexpected problem or unintended behavior labels Feb 6, 2025
@fbricon
Copy link
Contributor Author

fbricon commented Feb 6, 2025

it seems the esbuild/bin/esbuild binary could be removed, as esbuild will delegate to the specific @esbuild/<target>/bin/esbuild version.

@Patrick-Erichsen Patrick-Erichsen added good-first-issue Suggested issue for new contributors and removed "needs-triage" labels Feb 6, 2025
@Patrick-Erichsen
Copy link
Collaborator

it seems the esbuild/bin/esbuild binary could be removed, as esbuild will delegate to the specific @esbuild//bin/esbuild version.

That seems correct. Added a good-first-issue label to this if anyone is interested! Otherwise will keep it on our radar.

@Riddhimaan-Senapati
Copy link
Contributor

@Patrick-Erichsen I would like to contribute.

@joffeoja
Copy link
Contributor

joffeoja commented Feb 21, 2025

Should the esbuild binary be packaged into the vsix package at all? esbuild is configured as 'external' in esbuild.js with the purpose of excluding the package but since esbuild is configured as both 'devDependency' AND 'dependency' in package.json it doesn't get excluded. That's my take on this anyway

Documentation says to install esbuild using npm install --save-exact --save-dev esbuild , i.e. put it into devDependencies

@Patrick-Erichsen
Copy link
Collaborator

The only reason we bundle esbuild is for users that define a custom config.ts - we are moving away from this pattern and will eventually remove esbuild from the bundle entirely, so this this won't be an issue in the near to mid-term.

@Riddhimaan-Senapati - if you'd still like to contribute here are some good first issues: good-first-issue Suggested issue for new contributors

Feel free to follow up with me if anything catches your eye!

@joffeoja
Copy link
Contributor

@Patrick-Erichsen: When you reverted back to the old esbuild 0.17.19 the vscode package again gets flagged by vulnerability scanners. Lots of warnings. This is what you see when using an off the shelf scanner commonly used in a corp environment:
evanw/esbuild#3802

@dabockster
Copy link

dabockster commented Mar 8, 2025

I played around with this a bit in the codebase, and it looks like the big culprits are how esbuild.js and package.js do architecture checking (found in ./extensions/vscode/scripts) during the build process. I got it to build but not launch - the debugger kept saying that sqlite module wasn't a win32 application. I also still saw this error after multiple AI-assisted refactors.

I also noticed that the build system itself feels like tangled christmas lights, given how all the code for both the VSCode and Intellij platforms are in the same repo. I'm gonna open a new issue to recommend those be broken up into two codebase (and two build systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Suggested issue for new contributors ide:vscode Relates specifically to VS Code extension kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

5 participants