-
Notifications
You must be signed in to change notification settings - Fork 2.8k
infra: Add code-server development workflow with reliable file watching #10776
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
Review complete. Found one minor issue with duplicate log markers.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| rebuildTimeout = setTimeout(async () => { | ||
| console.log(`[${name}] File ${eventType}: ${path.relative(srcDir, filePath)}`) | ||
| console.log(`[esbuild-problem-matcher#onStart]`) | ||
| try { | ||
| await Promise.all([extensionCtx.rebuild(), workerCtx.rebuild()]) | ||
| console.log(`[esbuild-problem-matcher#onEnd]`) | ||
| } catch (err) { | ||
| console.error(`[${name}] Rebuild failed:`, err.message) | ||
| console.log(`[esbuild-problem-matcher#onEnd]`) | ||
| } | ||
| }, 200) |
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.
The manual [esbuild-problem-matcher#onStart] and [esbuild-problem-matcher#onEnd] markers here are redundant since the esbuild-problem-matcher plugin (lines 80-94) already emits these markers via esbuild's build.onStart() and build.onEnd() hooks. This causes duplicate markers in the output which could confuse VS Code problem matchers that expect balanced start/end pairs.
| rebuildTimeout = setTimeout(async () => { | |
| console.log(`[${name}] File ${eventType}: ${path.relative(srcDir, filePath)}`) | |
| console.log(`[esbuild-problem-matcher#onStart]`) | |
| try { | |
| await Promise.all([extensionCtx.rebuild(), workerCtx.rebuild()]) | |
| console.log(`[esbuild-problem-matcher#onEnd]`) | |
| } catch (err) { | |
| console.error(`[${name}] Rebuild failed:`, err.message) | |
| console.log(`[esbuild-problem-matcher#onEnd]`) | |
| } | |
| }, 200) | |
| rebuildTimeout = setTimeout(async () => { | |
| console.log(`[${name}] File ${eventType}: ${path.relative(srcDir, filePath)}`) | |
| try { | |
| await Promise.all([extensionCtx.rebuild(), workerCtx.rebuild()]) | |
| } catch (err) { | |
| console.error(`[${name}] Rebuild failed:`, err.message) | |
| } | |
| }, 200) |
Fix it with Roo Code or mention @roomote and request a fix.
Motivation
Developing the extension in code-server environments (remote, containers, etc.) has been problematic because native file system watchers often fail to detect changes properly. This PR introduces a streamlined development workflow with polling-based file watching. May close ROO-398.
Changes
New
pnpm servecommandImproved file watching with
chokidarsrc/esbuild.mjswith chokidar for more reliable detectionwebview-ui/watch.mjsscript for webview buildsCHOKIDAR_USEPOLLINGandCHOKIDAR_INTERVALenv varsExtension auto-reload enhancements
extension.tsnow also watches compiled output (dist/extension.jsandwebview-ui/build)Configuration
servecommand to.roo/roomotes.ymlwith port settingchokidardependency towebview-ui/package.jsonImportant
Introduces a code-server development workflow with improved file watching using chokidar for reliable change detection in remote environments.
pnpm servecommand:src/esbuild.mjsfor reliable detection.webview-ui/watch.mjsfor webview builds with polling support.CHOKIDAR_USEPOLLINGandCHOKIDAR_INTERVALenv vars.extension.tswatchesdist/extension.jsandwebview-ui/buildfor reloads.servecommand to.roo/roomotes.yml.chokidardependency towebview-ui/package.json.This description was created by
for 9e91335. You can customize this summary. It will automatically update as commits are pushed.