-
Notifications
You must be signed in to change notification settings - Fork 55
fix: is_dirty to use additional_files #268
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense but the extra !
is a bit confusing, can we add a note here?
crates/compilers/src/cache.rs
Outdated
@@ -989,7 +989,9 @@ impl<T: ArtifactOutput<CompilerContract = C::CompilerContract>, C: Compiler> | |||
for artifacts in self.cached_artifacts.values() { | |||
for artifacts in artifacts.values() { | |||
for artifact_file in artifacts { | |||
if self.project.artifacts_handler().is_dirty(artifact_file).unwrap_or(true) { | |||
if !artifact_file.file.starts_with(&self.project.paths.artifacts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's an example for an artifact_file that doesn't reside in the artifacts folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for pushing back, I got this totally wrong. the reason here is that we have additional_values
and additional_files
and we didn't account the additional files when checking if artifact dirty in cache, changed with abb1371
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah this makes a lot of sense now
/home/george/work/foundry-issues/issue-preproc/out/Base.sol/CommonBase.json
are checked and erroneously flag missing extra files / rebuild sources