element.py: Reset workspace state if last successful build is missing.

If the artifact referred to by the last successful build in the workspace state no longer exists, reset the workspace state and do not attempt to perform an incremental build instead of crashing.

This branch includes a regression test, which actually absolutely must be an integration test. In order to trigger the issue, you need to be building the workspaced element, and building the workspaced element must itself trigger the staging of it's dependencies recursively.

This also includes a minor fix to cli.remove_artifact_from_cache(), which turns out to be unneeded since we can just use bst artifact delete, but might as well include the fix for this function.

This branch fixes #1017 (closed)

Merge request reports

Loading