Don't emit extensionsApiProposals if it has not changed#312287
Merged
Conversation
This triggers our watcher scripts, causing an extra recompile Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prevents extensionsApiProposals.ts from being re-emitted when its generated contents are unchanged, avoiding an unnecessary file write that triggers watcher scripts and causes an extra recompile during initial watch.
Changes:
- Add a read/compare step for
src/vs/platform/extensions/common/extensionsApiProposals.tsand short-circuit emission when the contents match. - Centralize the generated output path into a
filePathconstant for emission.
Show a summary per file
| File | Description |
|---|---|
| build/lib/compilation.ts | Skips emitting extensionsApiProposals.ts when unchanged to avoid triggering watchers/extra recompiles. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
Comment on lines
+342
to
+345
| const filePath = 'vs/platform/extensions/common/extensionsApiProposals.ts'; | ||
| try { | ||
| const existing = fs.readFileSync(path.join('src', filePath), 'utf-8'); | ||
| if (existing === contents) { |
There was a problem hiding this comment.
filePath is introduced here, but the function still hard-codes the same path earlier when reading for EOL detection (src/vs/platform/extensions/common/extensionsApiProposals.ts). Consider reusing filePath for that earlier read as well to avoid the two strings drifting if the file is ever moved/renamed.
DonJayamanne
approved these changes
Apr 24, 2026
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.
This triggers our watcher scripts, causing an extra recompile on first watch