-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Expose import graph in output json #11716
Comments
You can construct an import graph from the AST. For features like incremental compilation, we also recently implemented the The
How to go from Can you work with this information or do you need anything else? |
Ah interesting. Yes I think we can work with this. Thanks! |
Hmmmm yes I think it probably is. Otherwise we would have to maintain a copy of the file resolution stages ourselves in dapp. |
Abstract
Exposing the import graph as part of the compiler output would make implementing incremental compilation workflows in frameworks a lot easier.
Motivation
One very common feature request for dapptools is support for incremental compilation, especially for larger projects or monorepos. In order to do this we would need to parse the solidity files in the project, and build some tree or graph like structure showing which contracts are imported and where.
Once we have this graph we can pretty easily determine the set of changed contracts, and then use the graph to determine which contracts should be recompiled.
Presumably solidity already builds such a structure as part of the compilation process, it would be very helpful if this could be exposed as part of the build artifacts.
The text was updated successfully, but these errors were encountered: