Skip to content

chore: skip native build scripts by default in allowBuilds - #5342

Merged
odinr merged 1 commit into
mainfrom
chore/skip-native-build-scripts
Aug 19, 2026
Merged

chore: skip native build scripts by default in allowBuilds#5342
odinr merged 1 commit into
mainfrom
chore/skip-native-build-scripts

Conversation

@odinr

@odinr odinr commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Why is this change needed?
pnpm install was 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's allowBuilds were true, so every pnpm 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 allowBuilds entries are now false by 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:

  • The copilot cli-plugin's prepack now runs pnpm rebuild agent-browser koffi before building, so publishing still bundles the binaries.
  • The publish-vscode-extension CI job now runs pnpm rebuild @vscode/vsce-sign before vsce publish (needed for the extension's signing binary), using a new save-cache: 'false' input on node-setup so 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 no vsce/build steps and no callers.

What is the intended behavior or invariant?
Unlisted packages under strictDepBuilds: true hard-error (ERR_PNPM_IGNORED_BUILDS), so every native-script dependency must have an explicit allowBuilds entry — false means "skip by default, opt in via pnpm rebuild <pkg> where actually needed," not "unreviewed."

Does this PR introduce a breaking change?
No.

Impact assessment:

  • Breaking changes: No
  • Version bump: Patch (changeset added for the copilot cli-plugin's prepack change; the allowBuilds/CI/workflow changes are workspace-root/tooling-only and don't require a changeset per repo convention)
  • Consumer impact: None — this only affects install/build/publish tooling, not published package behavior
  • Downstream impact: Local devs who need keytar for interactive MSAL auth should run pnpm rebuild keytar manually; documented inline in pnpm-workspace.yaml

Review 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

  • Confirm completion of the self-review checklist
  • Confirm TSDoc captures intent for functions, hooks, components, classes, and named arrow functions
  • Confirm iterator blocks, decision gates, RxJS chains, and complex decisions explain why they exist
  • Confirm React logic and derived values are resolved before markup when applicable
  • Confirm README/docs are updated for user-facing changes
  • Confirm changes to target branch validation
    • Included files validated
    • No new linting warnings
    • Not a duplicate PR
  • Confirm adherence to code of conduct

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.
@odinr
odinr requested a review from a team as a code owner August 19, 2026 17:06
@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b7aae88

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@equinor/fusion-framework-cli-plugin-copilot Patch

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

@github-actions github-actions Bot added the 🚧 chore maintaines work, (update deps, workflos ...) label Aug 19, 2026
@odinr
odinr merged commit afd3e54 into main Aug 19, 2026
9 checks passed
@odinr
odinr deleted the chore/skip-native-build-scripts branch August 19, 2026 17:07
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 67.37% 4052 / 6014
🔵 Statements 67.09% 4821 / 7185
🔵 Functions 53.7% 1385 / 2579
🔵 Branches 55.95% 2137 / 3819
File CoverageNo changed files found.
Generated in workflow #15490 for commit b7aae88 by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚧 chore maintaines work, (update deps, workflos ...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant