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

py-solc is incompatible with Solidity compiler 0.5.0

Open Jonasmpi opened this issue 5 years ago • 5 comments

  • py-solc Version: 3.2.0
  • solc Version: 0.5.0
  • Python Version: 3.6.7
  • OS: Linux

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

Jonasmpi avatar Nov 30 '18 13:11 Jonasmpi

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.

ABBDVD avatar Dec 04 '18 13:12 ABBDVD

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.

Jonasmpi avatar Dec 05 '18 12:12 Jonasmpi

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.

ABBDVD avatar Dec 05 '18 13:12 ABBDVD

@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 avatar Mar 14 '19 19:03 Pet3ris

@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.

Jonasmpi avatar Mar 18 '19 16:03 Jonasmpi