Fix crash when bsc plugin in worker loads another version of bsc#1579
Fix crash when bsc plugin in worker loads another version of bsc#1579TwitchBronBron merged 6 commits intomasterfrom
Conversation
|
Hey there! I just built a new temporary npm package based on 18f0c23. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.70.2-fix-lsp-thread-crash.20251029201832.tgz |
|
Hey there! I just built a new temporary npm package based on 18f0c23. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.70.2-fix-lsp-thread-crash.20251029201831.tgz |
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the worker thread initialization architecture by extracting the worker entry point into a dedicated run.ts file and adding debugging support for worker threads.
- Extracted worker thread initialization code from
WorkerThreadProject.tsinto a standalonerun.tsentry point - Removed command-line argument-based worker detection in favor of a dedicated worker script
- Added automatic debugging support for worker threads when the main process is being debugged
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/lsp/worker/run.ts | New dedicated entry point script for worker threads that initializes WorkerThreadProjectRunner |
| src/lsp/worker/WorkerThreadProject.ts | Refactored to use the new run.ts script, removed inline worker initialization code, and added debugging support configuration |
|
Hey there! I just built a new version of the vscode extension based on 18f0c23. You can download the .vsix here and then follow these installation instructions. |
1 similar comment
|
Hey there! I just built a new version of the vscode extension based on 18f0c23. You can download the .vsix here and then follow these installation instructions. |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
Hey there! I just built a new temporary npm package based on 65c22a5. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.70.2-fix-lsp-thread-crash.20251031133439.tgz |
|
Hey there! I just built a new temporary npm package based on 81bf0a1. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.70.2-fix-lsp-thread-crash.20251031133448.tgz |
|
Hey there! I just built a new temporary npm package based on cd4da43. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.70.2-fix-lsp-thread-crash.20251031133607.tgz |
|
Hey there! I just built a new version of the vscode extension based on 65c22a5. You can download the .vsix here and then follow these installation instructions. |
|
Hey there! I just built a new version of the vscode extension based on 81bf0a1. You can download the .vsix here and then follow these installation instructions. |
|
Hey there! I just built a new version of the vscode extension based on b36662a. You can download the .vsix here and then follow these installation instructions. |
Fixes a crash when the language server. Here's the general problem that was happening:
This extra listener was the problem, because it was trying to answer questions for a project it had never initialized (and shouldn't have).
So this PR mitigates that by separating the "thread running" into its own file that will no longer be accidentally run anytime brighterscript was imported.