Skip to content

Compile prerequisite extensions before starting watchers in watch-extensions - #15236

Merged
softwarenerd merged 1 commit into
mainfrom
fix/watch-extensions-prerequisite-order
Jul 31, 2026
Merged

Compile prerequisite extensions before starting watchers in watch-extensions#15236
softwarenerd merged 1 commit into
mainfrom
fix/watch-extensions-prerequisite-order

Conversation

@softwarenerd

@softwarenerd softwarenerd commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Problem

Ext - Build Task is red almost all the time

Ext - Build Task

Fix

Apply the same prerequisite ordering that compile-extensions already uses to watch-extensions.

Summary

watch-extensions started every extension watcher in parallel, so extensions that consume an in-repo package's compiled out/ (currently positron-data-explorer-duckdb -> positron-data-explorer-protocol) could race: a watcher's clean step deletes out/ while a dependent is already resolving its .d.ts files. This compiles the ordered prerequisites to completion first, then starts all watchers in parallel. Since watchers are long-lived, they can't be sequenced with each other, so the prerequisites' watchers use a new watch-extension-no-clean:<name> variant that skips the clean step and preserves the out/ that was just built for their dependents. The watch stream body is extracted into a createWatchStream() helper so both variants share it; no behavior change for extensions that aren't prerequisites.

Release Notes

New Features

  • N/A

Bug Fixes

  • N/A

Validation Steps

Build-only change, no e2e coverage applies.

  1. From a clean tree (git clean -xfd extensions/positron-data-explorer-*/out or equivalent), run npm run watch-extensions.
  2. Verify positron-data-explorer-protocol and positron-data-explorer-duckdb compile before the remaining watchers start, and that no Cannot find module/unresolved-import errors appear for the DuckDB backend.
  3. Edit a file in each of those two extensions and confirm the watcher still picks up the change and recompiles.
  4. Confirm npm run compile-extensions is unchanged.

@github-actions

Copy link
Copy Markdown

E2E Tests 🚀
This PR will run tests tagged with: @:critical

Note

No feature tags detected. If this PR needs feature coverage, add the tag above and retrigger the workflow.

readme  valid tags

@softwarenerd
softwarenerd requested review from Copilot and jmcphers and removed request for Copilot July 30, 2026 19:54

@jmcphers jmcphers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels really good to have these all reporting healthy!

Image

@softwarenerd
softwarenerd merged commit 0dbc572 into main Jul 31, 2026
50 of 52 checks passed
@softwarenerd
softwarenerd deleted the fix/watch-extensions-prerequisite-order branch July 31, 2026 16:56
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants