Uh oh!
There was an error while loading. Please reload this page.
fix: rebase patches onto upstream 1.136.0 - #60
Merged
Conversation
The nightly build failed applying 00-brand-remove-branding.patch against
vscode 1.136.0. prepare_vscode.sh halts on the first rejection, so the log
named only that one; ./dev/dry-apply-patches.sh found four broken patches.
Rebased against 520fb30b2d3d324b4cb2342f6e88e2cd93751de1:
- 00-brand-remove-branding: upstream reworded the PromptsType.skill
diagnostic from "VS Code agents" to "VS Code skills".
- 00-vsce-use-custom-lib: brace-expansion in the vsce dep tree went
5.0.7 -> 5.0.9.
- 21-policy-use-custom-lib: @vscode/os-proxy-resolver went ^0.3.0 -> ^0.4.0.
- 51-ext-copilot-remove-it: regenerated. Upstream added @devcontainers/cli
between the anchored context lines, renamed agentService.registerProvider
to providerService.registerProvider, and changed the contents of ten
copilot files whose deletion hunks then silently no-op'd ("removal patch
leaves file contents" emits no .rej). Deletion count is unchanged at 24
and the !!APP_NAME!! tokens are preserved.
1.136.0 also added two new importers of the removed @github/copilot-sdk
(copilotSecondaryAssignmentContext.ts and its test); both get the same
local type alias the patch already uses for GitHubTelemetryNotification.
Also bumps upstream/stable.json to 1.136.0 so the PR build targets the tree
these patches were rebased onto.With the patches rebased, the build got past patching and failed in prepare_vscode.sh's npm ci: TypeError: Cannot read properties of null (reading '1') at getElectronVersion (build/lib/electronVersion.ts:13:57) at ensureElectronTypes (build/npm/electronTypes.ts:29:30) at main (build/npm/postinstall.ts:242:8) 1.136.0 added ensureElectronTypes() to postinstall; it is absent in 1.135.0's postinstall.ts, which is why this never fired before. It calls getElectronVersion(), which non-null-asserts a /^target="(.*)"$/ match against .npmrc. prepare_vscode.sh swaps vscode's .npmrc for this repo's npmrc for the duration of npm ci (mv .npmrc .npmrc.bak; cp ../npmrc .npmrc) and restores it afterwards. Our npmrc deliberately omits the electron settings, so during that window there is no target= line and the assertion dereferences null. Read the version from .npmrc.bak when the live .npmrc has no target=. Copying target= into our npmrc instead would be wrong: without the accompanying runtime="electron" and disturl, node-gyp would read it as a Node.js target and try to fetch headers for a nonexistent v42.10.0. The other getElectronVersion() callers all run after .npmrc is restored, so they keep taking the original path.
Contributor
sbs44
approved these changes
Sep 3, 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 freeto 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.
Fixes the nightly build failure on vscode 1.136.0.
Refs #59
Root causes
Two distinct failures, the second only reachable once the first was fixed.
1. Four patches stopped applying
The build log named only
00-brand-remove-branding.patch, becauseprepare_vscode.shhalts on the first rejection../dev/dry-apply-patches.shfound four broken patches:00-brand-remove-brandingPromptsType.skilldiagnostic reworded "VS Code agents" -> "VS Code skills"00-vsce-use-custom-libbrace-expansionin the vsce dep tree 5.0.7 -> 5.0.921-policy-use-custom-lib@vscode/os-proxy-resolver^0.3.0 -> ^0.4.051-ext-copilot-remove-it@devcontainers/clidep split the anchored context;agentService.registerProviderrenamed toproviderService.registerProvider; ten copilot files changed contentsThe first three are context-line drift, fixed in place so the
!!TOKEN!!placeholders are untouched.
51was regenerated by applying it raw andre-diffing, so its 21
!!APP_NAME!!tokens round-trip.51's deletion hunks are the notable part: for ten files upstream changedthe contents, so
git applyreportedremoval patch leaves file contentsand emitted no
.rej— the deletions would have silently vanished froma naive regeneration. Post-regeneration checks:
deleted file modecountunchanged at 24, deletion set byte-identical to the old patch, no files
dropped, tokens preserved, no literal
BradfordCodeleaked in.1.136.0 also added two new importers of the removed
@github/copilot-sdk(
copilotSecondaryAssignmentContext.tsand its test). Both get the samelocal type alias the patch already applies to
GitHubTelemetryNotificationelsewhere.
upstream/stable.jsonis bumped to 1.136.0 /520fb30b2d3d324b4cb2342f6e88e2cd93751de1(resolved via
git ls-remote refs/tags/1.136.0, not the update API) so thePR build targets the tree these patches were rebased onto.
2.
npm cicrashed resolving the electron versionWith patching fixed, the build reached
prepare_vscode.sh'snpm ciand died:1.136.0 added
ensureElectronTypes()topostinstall.ts; it is absent from1.135.0's, which is why this never fired before. It calls
getElectronVersion(), which non-null-asserts a/^target="(.*)"$/matchagainst
.npmrc.prepare_vscode.shswaps vscode's.npmrcfor this repo'snpmrcfor theduration of
npm ci(mv .npmrc .npmrc.bak; cp ../npmrc .npmrc) and restoresit after. Our
npmrcdeliberately omits the electron settings, so during thatwindow there is no
target=line and the assertion dereferences null.00-build-fix-electron-version-lookup.patchreads the version from.npmrc.bakwhen the live.npmrchas notarget=. Copyingtarget=intoour
npmrcinstead would be wrong: without the accompanyingruntime="electron"anddisturl, node-gyp would read it as a Node.js targetand try to fetch headers for a nonexistent v42.10.0. The other
getElectronVersion()callers all run after.npmrcis restored, so they keeptaking the original path.
Verification
./dev/dry-apply-patches.sh— all patches apply cleanly against520fb30b2d3d324b4cb2342f6e88e2cd93751de1.Tier reached: compile passed (overlay + patches +
npm ci+ TypeScriptcompile). Not run:
--full(vscode-min-prepackminify + ASCII hygiene) andpackaging/signing, so those remain covered only by the PR build.