Skip to content

[Compiler download] Allow multiple parallel downloads of different compilers#7946

Merged
ChristopherDedominici merged 2 commits intomainfrom
fix-mutex-concurrency
Feb 12, 2026
Merged

[Compiler download] Allow multiple parallel downloads of different compilers#7946
ChristopherDedominici merged 2 commits intomainfrom
fix-mutex-concurrency

Conversation

@ChristopherDedominici
Copy link
Copy Markdown
Contributor

Previously, downloadCompiler() used a single shared MultiProcessMutex("compiler-download"), a file-based lock at, for example, /tmp/compiler-download.txt. This meant that across all parallel test workers, only one could download or even check if a compiler exists at a time. Workers needing different compiler versions would still block each other.

The fix makes the mutex version-specific (compiler-download-${version}), so workers downloading different versions proceed in parallel. Same-version downloads are still correctly serialized.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 12, 2026

⚠️ No Changeset found

Latest commit: 0c1ac95

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ChristopherDedominici ChristopherDedominici moved this from Backlog to In Progress in Hardhat Feb 12, 2026
@schaable schaable self-requested a review February 12, 2026 16:26
Copy link
Copy Markdown
Member

@schaable schaable left a comment

Choose a reason for hiding this comment

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

LGTM. The mutex logic already has its own test in v-next/hardhat/test/internal/builtin-plugins/solidity/build-system/compiler/downloader.ts, which should cover this change.

@ChristopherDedominici ChristopherDedominici added this pull request to the merge queue Feb 12, 2026
Merged via the queue into main with commit 4f88fca Feb 12, 2026
195 checks passed
@ChristopherDedominici ChristopherDedominici deleted the fix-mutex-concurrency branch February 12, 2026 16:50
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Hardhat Feb 12, 2026
@github-actions github-actions Bot mentioned this pull request Feb 12, 2026
@github-actions github-actions Bot mentioned this pull request Feb 23, 2026
@kanej
Copy link
Copy Markdown
Member

kanej commented Feb 25, 2026

This has been released as part of hardhat@3.1.10: https://github.com/NomicFoundation/hardhat/releases/tag/hardhat%403.1.10

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

Labels

no docs needed This PR doesn't require links to documentation no peer bump needed

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants