-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support for IR #3365
Comments
This issue is also being tracked on Linear. We use Linear to manage our development process, but we keep the conversations on Github. LINEAR-ID: 2c88424e-5990-4136-afac-2adf63271e8b |
The issue I'm having is my tests are now failing with viaIR: true, specifically the ones that check the revertedWith message. Which is a lot of them. For now, I'm having to turn viaIR off. Help me help us get to the bottom of it! |
Also, turns out that hardhat@ir doesn't work with my version of solidity-coverage: pm ERR! While resolving: @nomicfoundation/hardhat-toolbox@1.0.2 npm ERR! Found: solidity-coverage@0.8.2 npm ERR! node_modules/solidity-coverage npm ERR! dev solidity-coverage@"^0.8.2" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer solidity-coverage@"^0.7.21" from @nomicfoundation/hardhat-toolbox@1.0.2 npm ERR! node_modules/@nomicfoundation/hardhat-toolbox npm ERR! @nomicfoundation/hardhat-toolbox@"^1.0.2" from the root project npm ERR! npm ERR! Conflicting peer dependency: solidity-coverage@0.7.22 npm ERR! node_modules/solidity-coverage npm ERR! peer solidity-coverage@"^0.7.21" from @nomicfoundation/hardhat-toolbox@1.0.2 npm ERR! node_modules/@nomicfoundation/hardhat-toolbox npm ERR! @nomicfoundation/hardhat-toolbox@"^1.0.2" from the root project |
That's the first item in the checklist.
That's a llimitation of npm when a peer dependency and a pre-release version are mixed. You might need to use |
Yup, thanks. I did --force and that worked. It also works when running npm hardhat test. But when running coverage I get stack too deep. |
this has the advantage of making stack-too-deep errors much more unlikely, but involves using a pre-release version of hardhat. YOLO. in the future, we might encounter several unresolved issues with hardhat that are be caused by this. Main issue tracking progress: NomicFoundation/hardhat#3365
Is there a timeline for this to be included in the main release? Now that it's mark as ready I mean |
@jmendiola222 we want to release this ASAP. Hopefully this or next week; definitely January. |
do you have any workaround to solve this issue? ethereum/solidity#13858 |
this has the advantage of making stack-too-deep errors much more unlikely, but involves using a pre-release version of hardhat. YOLO. in the future, we might encounter several unresolved issues with hardhat that are be caused by this. Main issue tracking progress: NomicFoundation/hardhat#3365
@fruiz08 that seems a solc thing, unrelated to Hardhat. |
With IR, I get the following exception:
from a function as simple as:
When IR is not used, or other parts of the contracts are tinkered, or YUL steps are tinkered, the issue resolves. This issue is very similar to #2453 so I suspect it's a Hardhat issue. I tried many combinations of recent Solidity versions with Hardhat
Currently working around the issue with a custom order of YUL optimization steps. Let me know if you think if this's a Solidity issue. |
This's the stack trace from Hardhat
|
It didn't make it to the last release. :( Any update on the plan? @fvictorio |
I'm planning on merging that PR today, so it will definitely be included in the next release (this time for real 😅). |
is this fixed? |
Released in Hardhat v2.13.0 🚀 |
this warning when running tests
and losing information about error strings
with 2.13.0 |
This is the tracking issue for having full support for solc's IR-based code generation.
We have already released a beta version with some basic support under the
ir
npm tag. This version can be installed withnpm install hardhat@ir
.There are some pending things before we can release this in a stable version of Hardhat:
viaIR: true
and optimizer enabled #2453). I'm not sure if this was fixed on their
version or not.viaIR
enabled but not lose important information used by stack traces and error inferring? Can we enable those settings automatically or should users do it?solidity-coverage
seems to have issues whenviaIR
is enabled (see for example this comment). It's not clear if this is a problem in Hardhat or in the coverage plugin, or in both. It might also be just a documentation issue.CONTRACT_TOO_LARGE_ERROR
on a contract compiled withviaIR: true
#2115). I believe this is fixed in their
version, but we should double-check.The text was updated successfully, but these errors were encountered: