-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[Profiler] Truffle sometimes fails to compile #1713
Comments
Seeing something similar in our environment (same as above) when using Gulp watch task. Deleting build folder resolves it. |
This looks very similar to #1659 |
This might be fixed by the outstanding PR #1720, which needs to be revisited. Will add that to the to-dos for this week or next. Thanks all! |
Is this still an issue on the latest version of Truffle (v5.0.21)? |
@eggplantzzz I tried it a bit with v5.0.21 and I did not get this error. However, instead of throwing this error, truffle compiled invalid code which caused invalid opcode error when running Maybe this error is still present. I did not try much as truffle v5.0.21 was unusable for me. |
To be honest I'm not sure if this was ever directly addressed or reproduced on my part but some of the code related to compilation/parsing has been worked on since 5.0.4. If you are able to provide specific reproduction steps then I would be happy to try and troubleshoot this. Let me know! |
I wonder if this is related to Solidity issue 6977, which @chriseth thinks is actually a problem in Truffle? |
@wbt Just to confirm, you said you are unable to reproduce this? If you ever figure out a way to do this reliably then I would appreciate it! In the meantime, however, I will keep a look out for this issue. |
I have not reproduced the specific issue I put the cross-link in here because there may be a relationship between the two, as suggested by OP on June 11, like a fix for the original problem causing the other one...or maybe they are two intermittent independent bugs. |
Is this still a problem that exists on current Truffle (5.1.16)? I feel like this may have been solved. If someone can produce this error, let us know! |
So this issue is still a mystery, then. The original issue is almost certainly out of date (we recently removed Unless there's evidence that there's still a real issue here, or something actionable for us, going to mark this one as closed for issue maintenance. Happy to re-open if there's further work here; let us know! Thanks! |
Issue
When solidity code has changed a lot since the last compile,
truffle compile
fails most of the time. The exact error thrown isI suspect that the reason behind this is that solcjs is used by the parser in profiler (thanks to @gnidan for pointing that out in gitter) while I am using native solc for actual compilation. The native solc being used and solcjs being used are of different version which I suspect might be causing some issues. I am not sure though. The issue can very well be something completely different.
The issue goes away on clearing the
build
folder.Steps to Reproduce
I don't have reliable steps to reproduce it. I reckon trying to compile something with solc 0.5.0 and then changing the hell outa it and recompiling. Make sure that a different version of solcjs is cached to be used by the profiler.
Environment
The text was updated successfully, but these errors were encountered: