Skip to content

fix: better handle concurrent builds - #3301

Open
dsanders11 wants to merge 8 commits into
nodejs:mainfrom
dsanders11:fix/concurrent-rebuilds
Open

fix: better handle concurrent builds#3301
dsanders11 wants to merge 8 commits into
nodejs:mainfrom
dsanders11:fix/concurrent-rebuilds

Conversation

@dsanders11

Copy link
Copy Markdown
Contributor
Checklist
  • npm install && npm run lint && npm test passes
  • tests are included
  • commit message follows commit guidelines
Description of change

Fixes #3165, which unfortunately was not actually fixed by #3170. I'm not sure #3170 had any effect on the issue, as my original changes in #2846 which were extended to all platforms in #3710 were targeting a specific issue on Windows, and did not aim to fix (or know of) the issue in #3165.

The second commit on this branch adds a test which repros the issue being reported in #3165, namely that header files can be seen as partially written when multiple builds are happening concurrently. A failing test run before the other commits on this branch can be seen here.

The remainder of the commits refactor copyDirectory to fix the issue, fix another concurrent build issue I came across during testing, and adds more test coverage. This refactor also allows for dropping exponential-backoff as a dependency.

@dsanders11
dsanders11 force-pushed the fix/concurrent-rebuilds branch 2 times, most recently from 49c5a3c to dad0d06 Compare April 13, 2026 00:23
@dsanders11
dsanders11 marked this pull request as ready for review April 13, 2026 01:23
Signed-off-by: David Sanders <dsanders11@ucsbalum.com>
Assisted-by: Claude Opus 4.6
Signed-off-by: David Sanders <dsanders11@ucsbalum.com>
Assisted-by: Claude Opus 4.6
Signed-off-by: David Sanders <dsanders11@ucsbalum.com>