-
Notifications
You must be signed in to change notification settings - Fork 379
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
Checking if Solc satisfies version requirements #1394
Checking if Solc satisfies version requirements #1394
Conversation
Solves raiden-network#1365 A few things, firstly I'm new to open-source contributions and I've been dabbling with Python for a bit, so I wanted to put my skills to use on Raiden. Please do tell me what I'm doing wrong (or right). Secondly, this relies on the compiler_version() method of _solidity.py in ethereum.tools but I have a feeling that the Regex on line 127 might be a bit messed up, since I tried testing it and it doesn't come out right sometimes. I'll defer to their expertise though, might just be me. I've also imported the inbuilt LooseVersion to save time on developing a version comparison function from scratch.
raiden/blockchain/abi.py
Outdated
|
||
elif LooseVersion(_solidity.compiler_version()) < LooseVersion(MIN_REQUIRED_SOLC): | ||
raise RuntimeError( | ||
"You are currently using the solidity compiler version {}.\n".format{_solidity.compiler_version()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this is meant to be .format(_solidity.compiler_version())
Hey @Arbitrage0 you have style violations. Run flake8 on the code to see what they are or just see where the travis job failed |
So I think now everything is running great from my end, however the Should I create another method from scratch? I've sent a pull request to the guys at pyethereum about this as well. |
raiden/blockchain/abi.py
Outdated
@@ -134,6 +136,13 @@ def validate_solc(): | |||
"Make sure the solidity compiler is installed and available on your $PATH." | |||
) | |||
|
|||
elif LooseVersion(_solidity.compiler_version()) < LooseVersion(MIN_REQUIRED_SOLC[1:]): | |||
raise RuntimeError( | |||
'You are currently using the solidity compiler version {0}.\n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to add numbers inside the {}
for the format string
raiden/blockchain/abi.py
Outdated
elif LooseVersion(_solidity.compiler_version()) < LooseVersion(MIN_REQUIRED_SOLC[1:]): | ||
raise RuntimeError( | ||
'You are currently using the solidity compiler version {0}.\n' | ||
'Please upgrade to the compatible version {1}.'.format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please upgrade to the compatible version -> Please upgrade to the minimum compatible version
@Arbitrage0 Hello again. Thank you for your contribution! Please address my 2 comments and also squash all your 6 commits into one. |
Solves raiden-network#1365 A few things, firstly I'm new to open-source contributions and I've been dabbling with Python for a bit, so I wanted to put my skills to use on Raiden. Please do tell me what I'm doing wrong (or right). Secondly, this relies on the compiler_version() method of _solidity.py in ethereum.tools but I have a feeling that the Regex on line 127 might be a bit messed up, since I tried testing it and it doesn't come out right sometimes. I'll defer to their expertise though, might just be me. I've also imported the inbuilt LooseVersion to save time on developing a version comparison function from scratch. Update abi.py Update abi.py Update abi.py Update abi.py Update abi.py
…//github.com/Arbitrage0/raiden into Arbitrage0-compare_solc_version_requirements
Hi @Arbitrage0 , we updated some code related to your change. In order to merge your PR you need to update this PR. Thank you. |
Hi @Arbitrage0 . We haven't heard back from you in two weeks so I'm closing this PR. Feel free to reopen when you revisit this. |
Solves issue #1365
A few things, firstly I'm new to open-source contributions and I've been dabbling with Python for a bit, so I wanted to put my skills to use on Raiden! Please do tell me what I'm doing wrong (or right).
Secondly, this relies on the
compiler_version()
method of _solidity.py in ethereum.tools but I have a feeling that the Regex on line 127 might be a bit messed up, since I tried testing it and it doesn't come out right sometimes. I'll defer to their expertise though, might just be me.I've also imported the inbuilt
LooseVersion
to save time on developing a version comparison function from scratch.