Renaming of elements and projects affect cache keys

Updated description

It was identified a long time ago that element and project renames cause cache keys to change in reverse dependencies, as well as the addressing scheme rendering artifact sharing being useless when projects get renamed (which can happen a lot if you have a workflow involving many small projects).

It was decided that:

This needs to be investigated and resolved in order to provide properly stable cache keys going forward.

This is a blocker item for BuildStream 2.0.

Original description

Background

If I rename a element then it's old artifact is no longer used and bst1.2 will trigger a rebuild, I assume this is also true of master. Some of my elements can take hours to build on my fastest available system for my target architecture

Task description

Ideally bst should notice that the contents of the files are the same. But for some of my elements that take many hours to build having a bst rename command would be great.

Acceptance Criteria

There should be some way to rename a bst file and not trigger a rebuild.

Edited by Tristan Van Berkom
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information