fix(build): transpile watcher stages codicon.ttf so dev-mode icons render#59
Merged
Merged
Conversation
…nder codicon.ttf ships in node_modules/@vscode/codicons and is normally moved into src/ by gulp's copy-codicons task before transpile runs. The watch-client-transpile entry point (build/next/index.ts) doesn't depend on gulp, so a dev who runs only `npm run watch-client-transpile` (instead of the full `npm run watch`) ends up with no font in src/, no font in out/, and every workbench glyph rendering as a tofu box. Add a small idempotent ensureCodiconFontStaged() called from copyAllNonTsFiles() — checks the destination, copies once if missing, no-op afterwards. The cost is one stat per build cycle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
codicon.ttfships innode_modules/@vscode/codicons/dist/and is normally moved intosrc/vs/base/browser/ui/codicons/codicon/by gulp'scopy-codiconstask before transpile runs. The font file is.gitignore'd (correctly — it's a build artifact).The
watch-client-transpileentry point (build/next/index.ts) doesn't depend on gulp. So a dev who runs only:(instead of the full
npm run watch, which fans out to both) ends up with:src/out/(becausecopyAllNonTsFilesglobssrc/**/*)I hit this myself running the dev IDE this afternoon — the symptom is unambiguous and a fresh contributor would lose at least 20 minutes chasing it through Chromium's font-query logs before finding the gulp task.
Fix
One idempotent helper
ensureCodiconFontStaged()called from the top ofcopyAllNonTsFiles():node_modulessource missing → warn and continue (don't break the build over an icon)Cost per build cycle: one
fs.existsSync()call.1 file changed, +21 / -0.
Test plan
rm -rf src/vs/base/browser/ui/codicons/codicon/codicon.ttf && npm run watch-client-transpile— confirm[codicons] Staged codicon.ttf into …appears on the next build cycle./scripts/code.shafter the above — confirm workbench icons render correctly🤖 Generated with Claude Code