-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
forge build
with extra output files doesn't re-run for cached files
#6241
Comments
I see, I think the issue here is that we don't invoke the which is only invoked when we write (new) artifacts I think we need some check here that applies the extra output files to the unchanged contracts |
I am also seeing another potential issue that I am wondering if is related. We have an interface Happy to open a new issue if this seems like a separate thing. |
Resolves foundry-rs/foundry#6241 Removes `write_extra` logic from `ArtifactOutput` trait Adds new methods: - `handle_artifacts` - by default empty implementation which can be overloaded to implement handling of compiled artifacts. `ConfigurableArtifacts` implements it to write extra files - `is_dirty` - method allowing `ArtifactOutput` implementations to reject cached artifacts and enforce recompilation. Used by `ConfigurableArtifacts` to reject artifacts which data is not enough to write required extra output files. - `handle_cached_artifacts` - same as `handle_artifacts` but for those which were not recompiled. Used by `ConfigurableArtifacts` to write extra files from cached artifacts.
@holic yes, it should fix this as well |
incredible, thank you! |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (059aa45 2023-11-07T08:20:43.711020000Z)
What command(s) is the bug in?
forge build
Operating System
macOS (Apple Silicon)
Describe the bug
I ran
forge build
on a project and then later ranforge build --extra-output-files abi
but no.abi.json
files were generated.I was able to workaround this by
forge clean
thenforge build --extra-output-files abi
.The text was updated successfully, but these errors were encountered: