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.
Resolves https://github.com/foundry-rs/foundry/issues/6241
Removes
write_extra
logic fromArtifactOutput
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 filesis_dirty
- method allowingArtifactOutput
implementations to reject cached artifacts and enforce recompilation. Used byConfigurableArtifacts
to reject artifacts which data is not enough to write required extra output files.handle_cached_artifacts
- same ashandle_artifacts
but for those which were not recompiled. Used byConfigurableArtifacts
to write extra files from cached artifacts.