Follow-up from "Artifact 'abstraction' class"
- In
Element.stage_dependency_artifacts()for the incremental workspace build:- Create a separate, temporary
Artifactobject forlast_successfulas that is really a different artifact.
- Create a separate, temporary
- Move the optional
keyparameter from theArtifactmethods to theArtifactconstructor, storing it in a member variable. Makes much more sense, in my opinion, as this prevents accessing different artifacts with the sameArtifactobject. - Create the
Artifactobject only when the relevant cache key is determined. Replace theArtifactobject in the infrequent case when the relevant cache key changes (workspace build, pull in non-strict mode). I.e., createArtifactobject in_update_state(). - Move simplified metadata cache to the
Artifactclass. The above changes should guarantee that the sameArtifactobject is never used to access different artifacts and thus, this should allow simpler metadata caching.