Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement robustness improvements in the compiler downloader #6056

Open
wants to merge 6 commits into
base: v-next
Choose a base branch
from

Conversation

galargh
Copy link
Member

@galargh galargh commented Dec 16, 2024

  • Because this PR includes a bug fix, relevant tests have been included.
  • Because this PR includes a new feature, the change was previously discussed on an Issue or with someone from the team.
  • I didn't do anything of this.

Resolves #5990

This PR implements changes outlined in #5990. Please note, that trimming down the solc dependency has been extracted to a separate issue #6071 as it will be easier to review that way.

Copy link

changeset-bot bot commented Dec 16, 2024

⚠️ No Changeset found

Latest commit: ed94118

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

Copy link

vercel bot commented Dec 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 22, 2024 11:19am

Copy link
Member Author

Choose a reason for hiding this comment

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

I have copied the multi-process mutex from the v2.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have copied the compiler downloader tests from v2 and updated them to work with the v3 implementation.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have copied the compiler tests from v2 and updated them to work with the v3 implementation. One significant update is the installation of tsx for the solcjs compiler tests.

Comment on lines +418 to +424
assertRejectsWithHardhatError(
() => mockDownloader.downloadCompiler("0.4.12"),
HardhatError.ERRORS.SOLIDITY.INVALID_DOWNLOAD,
{
remoteVersion: "0.4.12+commit.194ff033",
},
);
Copy link
Member Author

Choose a reason for hiding this comment

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

I've seen this check being flaky already as we sometimes get HardhatError.ERRORS.SOLIDITY.DOWNLOAD_FAILED instead. What do you think about adding a retry mechanism to the downloader?

@galargh galargh changed the title [WIP - not ready for review] Implement robustness improvements in the compiler downloader Implement robustness improvements in the compiler downloader Dec 22, 2024
@galargh galargh marked this pull request as ready for review December 22, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

1 participant