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

Watch mode for tests? #28

Open
mbrock opened this issue Jun 13, 2018 · 2 comments
Open

Watch mode for tests? #28

mbrock opened this issue Jun 13, 2018 · 2 comments

Comments

@mbrock
Copy link
Contributor

mbrock commented Jun 13, 2018

Issue by pospi
Friday Jan 19, 2018 at 05:10 GMT
Originally opened as dapphub/dapp#74


Hi all,

Are there any plans to support file watching and incremental compilation / testing for contracts during development? Or is the general opinion that hevm is fast enough that an external tool should be used to trigger a rebuild & re-run?

@mbrock
Copy link
Contributor Author

mbrock commented Jun 13, 2018

Comment by rainbreak
Friday Jan 19, 2018 at 07:23 GMT


We've not really discussed it. You could probably do incremental build (which uses solc) with something like dapp build src/file.sol (although for non large projects it's pretty quick to just build everything). Incremental test is more tricky, but you could perhaps construct a dependency tree and compare hashes of built contracts.

hevm is pretty quick though, so for small projects you might as well just run everything. For larger projects (e.g. makerdao/sai), it takes a bit longer as everything is in serial, but could maybe be parallelised (again).

Do you have a specific use case in mind? (size of project? in-editor usage?)

@mbrock
Copy link
Contributor Author

mbrock commented Jun 13, 2018

Comment by pospi
Saturday Jan 20, 2018 at 00:52 GMT


Nothing specific- but near-immediate feedback even for large projects is the goal I'm really hoping to fill. Mainly for realtime development; as in "change file & immediately see feedback". I guess you would need to keep a cache of the dependency tree from each test entrypoint file, and then re-run the affected tests if any files in the tree change?

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

No branches or pull requests

1 participant