-
Notifications
You must be signed in to change notification settings - Fork 155
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
Compile only what has changed #581
Comments
Yes, I observed the same effect. Actually, after adding the interfaces. It seems to slow compilation down tremendously. One big problem at the moment is that we recompile all contracts all the time. It is possible to only recompile a specific contract and its dependencies. In fact, I already started to implement this functionality here: https://github.com/melonproject/protocol/blob/a4ee46f78c8d9c803978008a6319b24c6bfb3ace/bin/compile.ts#L39:L68 but did not properly end it. Solidity-cli looks interesting too. I will play around a bit with these two solutions. |
Just to clarify what I mean about the tree: if we make changes to just one contract, only that contract and its dependants (not dependencies) need to be recompiled. Simple example:
If we change |
Thanks for the clarification. The problem is, that I don't know yet, how to use To actually have the changes mirrored to |
Compiling is sufficiently fast now that we got rid of some external contracts we were compiling with our own. |
* feat: add exit fees * chore: update deployment * chore: add helper utils * test: add test suites
Compiling takes around 2 mins on an i7 which limits how fast we can prototype and test the solidity code.
We could take advantage of caching to only compile the contracts that have changed and their dependants.
I know how to do this with
make
but it means maintaining a Makefile (not that big a deal if that's what we have to do), but maybe there is a better way that you guys know of.jake
looks like it may be useful, or maybe this compiler or that one, but I haven't had time to experiment with any of this.As a side effect, we could also cache in CI and shave a few minutes off our builds.
@schmidsi @fubhy Thoughts?
The text was updated successfully, but these errors were encountered: