Skip to content
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

Support --base-path #78

Closed
KPrasch opened this issue Jun 9, 2020 · 3 comments · Fixed by #79
Closed

Support --base-path #78

KPrasch opened this issue Jun 9, 2020 · 3 comments · Fixed by #79

Comments

@KPrasch
Copy link

KPrasch commented Jun 9, 2020

Overview

I am trying to leverage the --base-path solc feature introduced in version 0.6.9 to reduce complexity handling import remappings, however, there is no kwarg for solc_wrapper mapping to this flag.

Specification

Ideally this feature can be implemented like other CLI flags as a keyword argument:

solc_wrapper(base_path='/some/source/path/dir/', ...)
@iamdefinitelyahuman
Copy link
Contributor

Yeah, that seems useful and easy to expose. I'll try to get a new version out asap.

@iamdefinitelyahuman
Copy link
Contributor

OK I added a quick fix so it's not a blocker. But I also noticed there are quite a few recently added kwargs that lack support!

Long term I think the kwargs should be generalized / future-proofed by regexing the solc --help output. This would also reduce a lot of overhead around checking exactly which flags were added in which version. A few of them require specific logic but the fast majority are just setting a flag or setting a flag and adding a string after it.. shouldn't be that hard to do.

All that said - this will require a decent amount of refactoring, so it's a task for the next major release I think.

@KPrasch
Copy link
Author

KPrasch commented Jun 10, 2020

OK I added a quick fix so it's not a blocker. But I also noticed there are quite a few recently added kwargs that lack support!

Yes - I think the high-velocity API is one of the motives why the py-solc package was abandoned.

Long term I think the kwargs should be generalized / future-proofed by regexing the solc --help output.

Great Idea - Even incrementally, this is useful. You might warn the user when such a forward/backward compatible flag is detected.

All that said - this will require a decent amount of refactoring, so it's a task for the next major release I think.

Agreed. Thanks for putting some focus on --base-paths anyways. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants