solc-js
solc-js copied to clipboard
Change rules for selecting filename for generated files
Closes https://github.com/ethereum/solc-js/issues/219.
Behaviour is now the same as for native solc
.
EDITED by @r0qs:
I pushed my attempt to finish this PR. It adds the overwrite
flag and tests to it.
The first commit was necessary to allow the tests to clean the .bin
and .abi
artifacts generated by the test cases. Before, they weren't clean after each run, and with the addition of the overwrite functionality, they would not work.
Coverage: 84.729% (+0.2%) from 84.537% when pulling 5b5bd05ae4d8169924c4660217d02b53903b6277 on krzkaczor:kk/fix-cli-output-filename into c572d36fdad98dde5d3434cd21362830d2b59d40 on ethereum:master.
solc is looking for collisions. If there are none, it uses the contract name, otherwise the fully qualified name with :
and others replaced by _
@chriseth okay i can recrete this behaviour in solcjs. I just think that current state of things is wrong.
@krzkaczor it would be appreciated. Please also rebase :)
Hi, I believe we can have this. And maybe add a --overwrite
flag like the one in solc
to prevent the name collisions? So the behavior of solc-js and solc would be compatible.
What do you think @chriseth?
@krzkaczor would you like to finish this, or should we take it over?
@r0qs please, take over :)