ethereum / py-solc

Python wrapper around the solc Solidity compiler.
MIT License
185 stars 232 forks source link

py-solc is incompatible with Solidity compiler 0.5.0 #64

Open Jonasmpi opened 6 years ago

Jonasmpi commented 6 years ago

What was wrong?

py-solc is incompatible with Solidity compiler 0.5.0

--combined-json clone-bin is deprecated in version 0.5.0 but is set in main.py and wrapper.py. Has to be removed.

Compile from source uses the solc compiler option to compile from stdin but does this incorrectly. The fix would be to add command += "-" at the end of the command creation. A quick and dirty fix for both issues can be seen on my repository master branch at:

https://github.com/Jonasmpi/py-solc

Cute Animal Picture

ABBDVD commented 6 years ago

Changing the solc version using py-solc with for example python -m solc.install v0.4.25 didn't work either anymore when I tried it about a week ago. There's no error but the solc used by py-solc remains v0.5.0 regardless. And obviously it would need a change to support installing v0.5.0 through the same command.

Jonasmpi commented 6 years ago

Changing the solc version using py-solc with for example python -m solc.install v0.4.25 didn't work either anymore when I tried it about a week ago. There's no error but the solc used by py-solc remains v0.5.0 regardless. And obviously it would need a change to support installing v0.5.0 through the same command.

I installed solc via sudo apt-get install solc so i havent touched the installer.

ABBDVD commented 6 years ago

I don't intend to say you introduced new errors. I just want to remark that the changes you listed and fixed are not the only things broken by solc v0.5.0 in py-solc.

Pet3ris commented 5 years ago

@Jonasmpi - I'm starting to rely on this as it's very faithful to the original - thanks for putting it together. I found the other fork attempts to self-install and maintain solc and does not play well with brew.

Would you consider rolling this out as a separate fork and pypi repo so that future changes from other people could be accepted? It looks like it won't get merged in here.

Jonasmpi commented 5 years ago

@Jonasmpi - I'm starting to rely on this as it's very faithful to the original - thanks for putting it together. I found the other fork attempts to self-install and maintain solc and does not play well with brew.

Would you consider rolling this out as a separate fork and pypi repo so that future changes from other people could be accepted? It looks like it won't get merged in here.

@Pet3ris Sorry for the late anwser. For myself we complety changed our backend code now to higher maintained libraries based on javascript, because as @ABBDVD pointed out, there are to many things that are broken at the moment. Depending on the situation i may consider doing this.