-
Notifications
You must be signed in to change notification settings - Fork 1.6k
✨ feat(extension): Add auto-restart for core changes in dev mode #351
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
Conversation
81a0f8d to
1be2eb0
Compare
|
1be2eb0 to
cff7fd7
Compare
janpaul123
left a comment
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.
Seems good to me! Maybe make a PR to Roo as well?
- implement file system watcher for core files - automatically reload extension host on changes - enhance development experience by eliminating manual restarts 📝 docs(DEVELOPMENT.md): update hot reloading instructions - clarify auto-reload behavior for core extension changes - specify development mode requirements for auto-reloading
cff7fd7 to
d170fc8
Compare
kevinvandijk
left a comment
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.
Awesome! Can we also provide this to Roo Code?
|
Haha jinx @kevinvandijk |
|
Opened a PR on Roo here: RooCodeInc/Roo-Code#3284 |
| if (enableCoreAutoReload) { | ||
| console.log(`♻️♻️♻️ Core auto-reloading is ENABLED!`) | ||
| const watcher = vscode.workspace.createFileSystemWatcher( | ||
| new vscode.RelativePattern(context.extensionPath, "src/**/*.ts"), |
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.
What happens if we change.a different file; e.g. one of the translation .json files?
|
I love it. @hassoncs Thanks for updating the docs!!! ❤️ |
|
Is there a chance we will want to have it more flexible? Like, keep the DEV environment but disable auto-reload? Just asking. |
I'd wait for someone tell us about an actual use case for that. As a workaround this is easy to find and comment out (bc of the console logs). |
Until now, it was necessary to halt the debugging process, terminate all tasks, and restart the extension host to see
corechanges. Now, with this change, we now monitor the files within the core directory. If any changes are detected, we trigger a reload command within the extension, effectively enabling hot reloading within the extensionDev notes
ENABLE_CORE_AUTO_RESTART, but instead just based it on the NODE_ENV. Let me know if you think the env var would be better! (or something else!)📝 docs(DEVELOPMENT.md): update hot reloading instructions