BlockCatIO / solidity-flattener

A python utility to flatten Solidity code with imports into a single file.
MIT License
267 stars 98 forks source link

allow multiple solc-paths #31

Open zetherz opened 6 years ago

zetherz commented 6 years ago

Space-delimited, i.e. --solc-paths="my_solidity_path=my_actual_path my_solidity_path2=my_actual_path2"

Using slice notation.

XertroV commented 6 years ago

Why don't you use the format solc already has for this? I don't use aliases like that but does path1=realPath1,path2=realPath2, work?

XertroV commented 6 years ago

Why don't you use the format solc already has for this? I don't sue aliases like that but does path1=realPath1,path2=realPath2, work?

Also, not sure your patch would work b/c currently you either need to manually patch core.py or use --solc-paths "--allow-paths ./p1,./p2,

zetherz commented 6 years ago

@XertroV no, that didn't work for me, hence this PR. See also #5.

Not sure what your second point means. This patch works perfectly for me as-is without either of the two kludges you suggested. I've been using it for a while. Please feel free to actually try it and let me know if you still have issues with it.

XertroV commented 6 years ago

@zetherz replied to that issue

The second point was talking about using a command like: solidity_flattener --solc-paths "--allow-paths a=b,c=d,"

Note: I patched core.py manually on my machine so I don't add in --allow-paths at the beginning, but saw it referenced in another issue/PR today, so hopefully works?