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

Is it possible to replace node with bun? #119

Open
lpite opened this issue May 8, 2024 · 7 comments
Open

Is it possible to replace node with bun? #119

lpite opened this issue May 8, 2024 · 7 comments

Comments

@lpite
Copy link

lpite commented May 8, 2024

No description provided.

@jfcherng
Copy link
Contributor

jfcherng commented May 8, 2024

I had a bad experience with it on Windows. DetachHead/basedpyright#60 (comment)

Doubt how good it is on other platform.

@Jarred-Sumner
Copy link

Our Windows support is definitely worse than Linux/Mac.

@lpite
Copy link
Author

lpite commented May 9, 2024

On macOS bun works fine so I just curious if that's possible.

@jfcherng
Copy link
Contributor

jfcherng commented May 9, 2024

More of a "worth it or not" question. I don't think the user should care what runtime is used if it's managed by lsp_utils. If Bun can't beat Electron (speed or used RAM), I see no point to use it.

@jfcherng
Copy link
Contributor

jfcherng commented May 9, 2024

But if you want to use a non-lsp-managed Bun for servers and you have node installed... You can change the CLI command to invoke the server in server settings. The node version check is still required at this moment...

I feel the major issue is the Node.js version restriction specified in LSP-* plugins.

@lpite
Copy link
Author

lpite commented May 12, 2024

More of a "worth it or not" question. I don't think the user should care what runtime is used if it's managed by lsp_utils. If Bun can't beat Electron (speed or used RAM), I see no point to use it.

In case of speed it faster but in RAM i don't see any major difference

@jfcherng
Copy link
Contributor

jfcherng commented May 13, 2024

Found some benchmark on non-Windows. It's pretty appealing indeed. Not sure how to integrate Bun into lsp_utils though. Currently, all nodejs-based LSP-* just inherits NpmClientHandler and they can specify a nodejs version range which the server supports.

If the user doesn't want to use lsp_utils-managed JS runtime, lsp_utils would have to find node/bun from PATH. The possible combination becomes

  • local, system
  • node, electron, bun

It looks like the best is to use Electron on Windows and Bun on others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants