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

Concurrent download of solc compiler fails #4382

Closed
robercano opened this issue Sep 13, 2023 · 2 comments
Closed

Concurrent download of solc compiler fails #4382

robercano opened this issue Sep 13, 2023 · 2 comments
Assignees

Comments

@robercano
Copy link

robercano commented Sep 13, 2023

Version of Hardhat

2.17.3

What happened?

We are using Lerna in our monorepo, and we have 2 packages with contracts. A GitHub action is used to compile the packages when changes are pushed to the repo. This uses Lerna to concurrently compile the 2 packages with contracts. Both attempt to download the same compiler at the same time, and sometimes it fails. It seems a concurrency issue probably due to opening the file from 2 different threads.

We have a workaround in which we have a third dummy package with a dummy contract for the same compiler version. We first run the compilation of the dummy package, thus triggering the download of the compiler. Then when we compile the other 2 packages the compiler is already available and it works.

However this is a nasty approach that also adds a new dependency to our repo: every time we need to add a new compiler version to a package, we need to remember to add the same version to the dummy package so it downloads the proper compiler.

This bug was related, but it was never followed up: #1925

Minimal reproduction steps

Please find a reproduction repo with instructions here:

https://github.com/robercano/hardhat-concurrency-issue

Search terms

concurrent download lerna hardhat compiler

@fvictorio
Copy link
Member

Hey @robercano, thanks for this. I believe it's a duplicate of #3722 though. But your reproduction repo is better than mine, so I'm going to comment it in that issue.

@fvictorio fvictorio closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2023
@github-project-automation github-project-automation bot moved this from Ready to Done in Hardhat Sep 26, 2023
@robercano
Copy link
Author

Great, thanks for checking it out! I'll jump into the other issue to follow it up

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

3 participants