delvtech / hyperdrive-rs

Rust SDK for the Hyperdrive AMM.
https://docs.rs/crate/hyperdrive-math/latest
Apache License 2.0
2 stars 0 forks source link

Don't rebuild hyperdrive-wrappers if no solidity files changed. #118

Closed sentilesdal closed 5 months ago

sentilesdal commented 5 months ago

Resolved Issues

n/a

Description

Building hyperdrive-wrappers takes a long time and happens way too often during local development and testing. We don't need to rebuild these if no solidity files have changed. On top of this, vscode is breaking because its watching for changes and rebuilding way too much. This fixes both of these issues.

Review Checklists

Please check each item before approving the pull request. While going through the checklist, it is recommended to leave comments on items that are referenced in the checklist to make sure that they are reviewed.

wakamex commented 5 months ago

another way to speed this up is just to remove the --force from the forge build command, which already checks whether solidity files have changed:

forge build
[⠒] Compiling...
No files changed, compilation skipped
wakamex commented 5 months ago

you could also check the output of the forge build to see whether the wrappers need to be rebuilt (whether or not No files changed, compilation skipped is in the output)

sentilesdal commented 5 months ago

@wakamex that's brilliant. Gonna try that out.