chore: skip native build scripts by default in allowBuilds - #5342
Merged
Conversation
Sets all pnpm-workspace.yaml allowBuilds entries to false to avoid running native-binary install/build scripts on every install. agent-browser and koffi are rebuilt explicitly in the copilot cli-plugin's prepack instead. @vscode/vsce-sign is rebuilt explicitly before publishing the VS Code extension, with its own cache-save opt-out in node-setup. Removes the unused marketplace.yml debug workflow.
🦋 Changeset detectedLatest commit: b7aae88 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Coverage Report
File CoverageNo changed files found. |
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.
Why is this change needed?
pnpm installwas slow because several packages' native-binary install/build scripts (agent-browser,koffi, tree-sitter, esbuild, etc.) ran on every install, even though most are only needed in narrow, specific contexts (publishing, interactive local auth, docs watching).What is the current behavior?
All 12 entries in
pnpm-workspace.yaml'sallowBuildsweretrue, so everypnpm install(locally and in CI) ran every native build/postinstall script, including ones only needed for the rarely-used Copilot cli-plugin, interactive MSAL auth, or VS Code extension signing.What is the new behavior?
All 12
allowBuildsentries are nowfalseby default, each with a comment explaining when it's actually needed and how to opt in manually (pnpm rebuild <pkg>). Two spots explicitly rebuild what they need instead of relying on the global install:prepacknow runspnpm rebuild agent-browser koffibefore building, so publishing still bundles the binaries.publish-vscode-extensionCI job now runspnpm rebuild @vscode/vsce-signbeforevsce publish(needed for the extension's signing binary), using a newsave-cache: 'false'input onnode-setupso this one-off rebuild isn't persisted into the shared main-branch pnpm store cache.Also removed
.github/workflows/marketplace.yml, an unused manual debug workflow with novsce/build steps and no callers.What is the intended behavior or invariant?
Unlisted packages under
strictDepBuilds: truehard-error (ERR_PNPM_IGNORED_BUILDS), so every native-script dependency must have an explicitallowBuildsentry —falsemeans "skip by default, opt in viapnpm rebuild <pkg>where actually needed," not "unreviewed."Does this PR introduce a breaking change?
No.
Impact assessment:
prepackchange; theallowBuilds/CI/workflow changes are workspace-root/tooling-only and don't require a changeset per repo convention)keytarfor interactive MSAL auth should runpnpm rebuild keytarmanually; documented inline inpnpm-workspace.yamlReview guidance:
Verified via full
pnpm clean:npm+pnpm store prune+ fresh install + forced (--force) full build (83/83 tasks) + full test suite (779/779 passing, only pre-existing unrelated leveldown/arm64 failures) +pnpm lint:fusion, confirming none of the 12 disabled scripts are actually required for the default build/test/lint pipeline.Additional context
None.
Related issues
None.
Checklist