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

Updated solidity to 0.6.2 #1

Closed
wants to merge 1 commit into from
Closed

Conversation

g-r-a-n-t
Copy link

This is part of some other work I'm doing here.

@g-r-a-n-t g-r-a-n-t requested review from axic and removed request for axic February 7, 2020 07:42
@g-r-a-n-t g-r-a-n-t force-pushed the master branch 2 times, most recently from 7d02349 to 7533a77 Compare March 2, 2020 06:53
Updated c compile call

Updated build.rs

Added nightly to ci

Revert "Added nightly to ci"

This reverts commit 6694346.

...

...

free and reset
@g-r-a-n-t g-r-a-n-t force-pushed the master branch 4 times, most recently from a3430fd to eb717e5 Compare March 2, 2020 14:28
@spalladino
Copy link

spalladino commented Mar 23, 2020

Hey there! I'm interested in picking this up for a side project, and when trying to run the tests on this branch with cargo test I'm getting the following error after the 2nd call to compile:

{"errors":[{"component":"general","formattedMessage":"Internal exception in StandardCompiler::compile: /solidity/libsolidity/interface/CompilerStack.cpp(90): Throw in function solidity::frontend::CompilerStack::CompilerStack(const Callback&)\nDynamic exception type: boost::exception_detail::clone_impl<solidity::langutil::InternalCompilerError>\nstd::exception::what: You shall not have another CompilerStack aside me.\n[solidity::util::tag_comment*] = You shall not have another CompilerStack aside me.\n","message":"Internal exception in StandardCompiler::compile: /solidity/libsolidity/interface/CompilerStack.cpp(90): Throw in function solidity::frontend::CompilerStack::CompilerStack(const Callback&)\nDynamic exception type: boost::exception_detail::clone_impl<solidity::langutil::InternalCompilerError>\nstd::exception::what: You shall not have another CompilerStack aside me.\n[solidity::util::tag_comment*] = You shall not have another CompilerStack aside me.\n","severity":"error","type":"InternalCompilerError"}]}

Where the You shall not have another CompilerStack aside me seems to come from here.

@g-r-a-n-t did you face this issue as well? @axic what would be needed to fully clear out the outstanding compiler stack, so as to call compile more than once and run multiple tests? grant seems to be properly calling free on the compile result and a full reset as well (see here). What else may be missing?

@g-r-a-n-t
Copy link
Author

g-r-a-n-t commented Mar 24, 2020

Hi @spalladino, thanks for reaching out!

More details on why this is happening can be found here. Basically, we can't call solc from multiple threads anymore. This is problematic with Rust tests because they run in parallel by default.

I think it would be best to just lock calls to solidity_compile within solc-rust, effectively shielding users from the fact that solc is not re-entrant. It should be pretty straight forward. Once this is fixed, I think we're good to merge this.

Let me know if you would like more info or suggestions :)

@spalladino
Copy link

Cool, thanks a lot Grant! Just gave a shot at it here. Let me know if you'd prefer if I sent the PR to your fork instead.

@g-r-a-n-t g-r-a-n-t closed this Mar 25, 2020
@g-r-a-n-t
Copy link
Author

see #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants