-
Notifications
You must be signed in to change notification settings - Fork 478
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
Change rules for selecting filename for generated files #220
base: master
Are you sure you want to change the base?
Conversation
solcjs
Outdated
@@ -115,7 +115,7 @@ function writeFile (file, content) { | |||
} | |||
|
|||
for (var contractName in output.contracts) { | |||
var contractFileName = contractName.replace(/[:./]/g, '_'); | |||
var contractFileName = contractName.replace(/(.*):/, ''); |
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.
What happens in case of collisions?
solc is looking for collisions. If there are none, it uses the contract name, otherwise the fully qualified name with |
@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 @krzkaczor would you like to finish this, or should we take it over? |
@r0qs please, take over :) |
be371c2
to
db0e88f
Compare
db0e88f
to
8c6f1af
Compare
8c6f1af
to
fd73c07
Compare
Closes #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.