Skip to content

Opening a workspace with a cached build

depends on #21 (closed)

We need a way for a workspace to use a cached build instead of building a fresh one from sources. E.G.

One could, for instance, desire to hack on WebKit and create a workspace using the last known build of the correct cache key, so after modifying some file, only part of the webkit build would have to run.

Current Idea

Override workspace if cached build found

At the point of opening a new workspace, check for an appropriate cached build tree created by that element and stage that in place of the elements sources.

If no cache found, continue as normal

Add the flag --no-cache: This will bypass the cache and create a workspace as normal

We should have some STATUS messages along the way informing the user what is being used.

Workspace special sauce

When opening workspaces, the Source API has an opportunity to enhance things.

This is mostly because we want to be sure that say, for a git source, the upstream origin is set to the real upstream, and not set to the local artifact cache from whence it was staged.

For right now, it would be best that you implement the feature while bypassing init_workspace() completely, as a first step

After that, we have to come up with a plan to address it, depending on how complex that plan is; we may merge the initial implementation "without the special init_workspace() sauce" and punt that part as an enhancement

Or, we may block the patch on first fixing that so that it works nicely off the bat

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