summaryrefslogtreecommitdiff
path: root/buildstream/_workspaces.py
Commit message (Collapse)AuthorAgeFilesLines
* _workspaces.py: Do not include .bstproject.yaml in the cache keyJonathan Maw2018-12-111-1/+6
| | | | This is a part of #222
* Create and store data inside projects when opening workspacesJonathan Maw2018-12-111-8/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | Changes to _context.py: * Context has been extended to contain a WorkspaceProjectCache, as there are times when we want to use it before a Workspaces can be initialised (looking up a WorkspaceProject to find the directory that the project is in) Changes to _stream.py: * Removed staging the elements from workspace_open() and workspace_reset() Changes in _workspaces.py: * A new WorkspaceProject contains all the information needed to refer back to a project from its workspace (currently this is the project path and the element used to create this workspace) * This is stored within a new WorkspaceProjectCache object, which keeps WorkspaceProjects around so they don't need to be loaded from disk repeatedly. * Workspaces has been extended to contain the WorkspaceProjectCache, and will use it when opening and closing workspaces. * Workspaces.create_workspace has been extended to handle the staging of the element into the workspace, in addition to creating the equivalent WorkspaceProject file. This is a part of #222
* _workspaces.py: Simplify chained comparisonDaniel Silverstone2018-10-251-1/+1
| | | | | | | In `_parse_workspace_config` there was a chained version comparison which is simplified in this commit to quieten a pylint issue. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* Implementing relative workspacesrelative_workspacesPhillip Smyth2018-08-101-24/+17
| | | | | | | This fixes #191 A note has been added to NEWS explaining backwards compatibility issues
* Remove shebangs from python filesGökçen Nurlu2018-06-191-1/+0
| | | | Fixes #424
* Reword uses of project in Workspaces.Valentin David2018-06-081-22/+30
| | | | | Make it clear we expect the top-level project here as we use it to resolve paths relative to project directory.
* _workspaces.py: Use file mtime for workspace cache keys instead of checksummingTristan Van Berkom2018-05-111-9/+6
| | | | | | | | | | | | | | | | | | | The rationale for this is basically: o A workspace is completely local o A cache key for a workspace is used to determine if the workspace has changed or not o Within reason, one should not expect buildstream to detect a change without a file's mtime having been modified On my machine, it takes about 1 minute to checksum 11GB of WebKit checkout, that is annoyingly a long time. With this change, it takes only 5 seconds. Not perfect, but it's a start. This is related to issues #294, #295 and #392
* Add element.prepare methodTristan Maat2018-04-131-3/+6
| | | | This is one of the tasks of #209
* _workspaces.py: Assert that configuration is only saved in the main process.Tristan Van Berkom2018-04-101-0/+2
|
* _workspaces.py: Added Workspaces.update_workspace()Tristan Van Berkom2018-04-101-0/+42
| | | | | | | | This takes a serialized workspace dictionary as understood by Workspace.from_dict() and created by Workspace.to_dict() Further, this adds a Workspace.differs() method to compare the state of two workspace instances.
* _workspaces.py: Add generic serialization/deserializationTristan Van Berkom2018-04-101-21/+56
| | | | | Also streamline the instantiation code paths to layer the yaml parsing on top of simple dictionary deserialization.
* _workspaces.py: Remove knowledge of Elements completelyTristan Van Berkom2018-04-101-47/+23
| | | | | | | | | | | | | This makes workspaces more cleanly separated from everything else. o Removed some methods from Workspace() o Added Element._open_workspace() to initialize workspaces on sources o Cleanup some code in the pipeline o Have the App() call Element._open_workspace() instead of Workspace.open()
* _workspaces.py: Fix cache key calculation regressionTristan Van Berkom2018-04-091-1/+1
| | | | This was regressed in the refactor done in commit f761140f
* element.py, source.py: Element consumes the rest of workspace logic.Tristan Van Berkom2018-04-091-2/+0
| | | | And Source no longer has any __workspace handle.
* Allow 'None' as a default_value for _yaml.node_getTristan Maat2018-04-071-7/+2
|
* _workspaces.py: Adhere to policy on private symbolsTristan Van Berkom2018-04-031-5/+5
| | | | This is a part of issue #285
* Refactoring of highlevel workspace codeTristan Van Berkom2018-04-021-7/+7
| | | | | | | | | | | | | | | | | | Move all workspace related code out of Pipeline() and into the frontend App() object. Some changes in transition here include: o Workspaces() object methods for looking up and deleting workspaces now take an element name instead of an element. o Share code for partial App() initialization between the `workspace close` and `workspace list` commands o No longer require that an element exist in the project in order to close a workspace This fixes issue #249
* _workspaces.py: Dont unconditionally create workspace local state file at ↵Tristan Van Berkom2018-04-011-7/+9
| | | | | | startup. Fixes issue #257
* _workspaces.py: Fix fallout from using python3.4Tristan Maat2018-03-281-2/+4
|
* Add list of running files to workspace metadataTristan Maat2018-03-271-5/+34
|
* Record last successful workspace build keyTristan Maat2018-03-271-3/+9
|
* Make workspaces use objects instead of pipeline helper methodsTristan Maat2018-03-271-0/+322