solc-rust icon indicating copy to clipboard operation
solc-rust copied to clipboard

Updated solidity to 0.6.2 with read callback support

Open spalladino opened this issue 4 years ago • 5 comments

Updates solidity to 0.6.2 by building on top of the great work by @g-r-a-n-t (thanks so much for your help on this!) by adding a global lock around the compiler, to prevent the You shall not have another CompilerStack aside me when calling the compiler from multiple threads (such as when running tests).

Update: I also added support for the read callback. I copied most of the approach from this post, and added a pair of tests.

spalladino avatar Mar 24 '20 15:03 spalladino

Oh thanks for this! It is a bit unfortunate a lot of this was done in the read-callback and cb branches already :(

axic avatar Mar 24 '20 22:03 axic

To clarify, I was caught up with other work, but have all the callback stuff finished and support for the 0.6 series, just wasn't sure what is the best approach to support multiple versions.

And this work in solc-rust was the one triggering the complete API redesign in 0.6 which allows implementing it without any nasty mutexes.

axic avatar Mar 24 '20 22:03 axic

Oh thanks for this! It is a bit unfortunate a lot of this was done in the read-callback and cb branches already :(

No worries, I was actually using this to learn Rust, so it already served its purpose. I'll take a look at those branches to see how it's actually done! And feel free to close this PR.

spalladino avatar Mar 24 '20 22:03 spalladino

How about setting a telegram to have discussions instead? I'm glad there is some life here!

@g-r-a-n-t let me know if you are interested to join the conversation on Telegram, it would be awesome to have you too

axic avatar Mar 24 '20 22:03 axic

Thanks for picking this up @spalladino, the code looks great! Sorry to hear it has been duplicated.

Send me an invite @axic (telegram id: gwuerker)

g-r-a-n-t avatar Mar 25 '20 12:03 g-r-a-n-t