WIP: Replace _update_state with various methods in various CacheKey implementations
Description
Element._update_state is complicated because it does many things when called at various different times under differing circumstances. Hopefully, this could be delegated to an external class and reduce the complexity of Element.
Changes proposed in this merge request:
- A CacheKey class, with implementations such as:
- StrictCacheKey - a normal element when buildstream runs in Strict mode
- NonStrictCacheKey - a normal element when buildstream runs in non-strict mode
- StrictWorkspacedCacheKey - a workspaced element when Strict mode
- NonStrictWorkspacedCacheKey - a workspaced element in non-strict mode
- Element._update_source_state is promoted from Class-private to API-private
- Element._fetch_done only updates source state
- Element._schedule_tracking no longer calls _update_state
Note that for the moment, there are two distinct code paths, one for when using Strict Non-Workspaced, and one for the rest.
This merge request, when approved, will close: #902 (closed)
Edited by Jonathan Maw