summaryrefslogtreecommitdiff
path: root/src/buildstream/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Remove special loading for workspacestraveltissues/notesDarius Makovsky2019-10-171-10/+1
| | | | | WorkspaceSource.init_workspace raises an exception so it is no longer necessary to retain the original source objects of the loaded element.
* workspace.py: raise AssertionError on init_workspaceDarius Makovsky2019-10-161-7/+4
|
* element.py: Rework 'node_subst_list' to take the sequence directlyBenjamin Schubert2019-10-161-1/+1
| | | | Also rename it to 'node_subst_sequence_vars' to mimic 'node_subst_vars'.
* element.py: remove 'node_subst_member' and replace with 'node_susbst_vars'Benjamin Schubert2019-10-162-4/+4
|
* workspace.py: Do not close gRPC channelsJürg Billeter2019-10-151-3/+0
| | | | This is now handled in Context.prepare_fork().
* cascache.py: Rename close_channel() to close_grpc_channels()Jürg Billeter2019-10-151-1/+1
| | | | This aligns the method name with has_open_grpc_channels().
* Defer committing workspace files to cachetraveltissues/1159Darius Makovsky2019-10-081-9/+4
| | | | | | | | | Remove XFAIL mark from test_workspace_visible and remove the explicit SourceCache.commit() in the workspace source plugin. Allow buildstream to handle the commit logic. Add handling for non-cached workspace sources in `source.Source._generate_keys()`.
* import.py: assemble the element via `stage_sources`Darius Makovsky2019-09-241-2/+1
|
* Remove workspace mounting for sandboxesDarius Makovsky2019-09-241-1/+1
| | | | | | | | Workspaces will be handled via the workspace source plugin methods. This does not currently support reflecting build artifacts in the open workspace. tests: Mark incremental workspace builds as xfail (strict)
* workspace.py: add workspace source pluginDarius Makovsky2019-09-241-0/+150
| | | | | | | | | | | | | | | | | | | | | | | | | The `workspace.init_workspace()` call should wrap `source._init_workspace` for held sources to support those sources not publishing `BST_VIRTUAL_DIRECTORY` This object owns a directory digest attribute used inplace of the source ref. `track` and `fetch` become noop methods and the workspace is imported into the CAS in the call to `get_unique_key` which also sets the digest attribute and owns that Directory object. The directory is referenced during stage to import directly to the virtual directory object. Importing is expected to be expensive and will be optimised in future. When the unique key is retrieved for the workspace source it will also be commited to the sourcecache. The logic for this source is still a slight variant on other sources since it cannot itself be expected to be in the cache when it's opened. In the source preflight method the preflights of the held sources must be called.
* element.py: Abstract not producing artifactsThomas Coldrick2019-09-162-5/+9
| | | | | | | | Currently the stack element does not produce an artifact, and sometimes has to be treated differently because of this. It is conceivable that someone will write a plugin that must be treated similarly and doesn't produce an artifact. As a result this commit abstracts this "not producing an artifact" feature of elements.
* filter.py: Fail if parent element is a stackThomas Coldrick2019-09-161-0/+7
| | | | | | | | | | | As stack elements do not provide any artifacts, it is misleading to allow them as dependencies for filter elements. This commit makes a dependency on a stack element a failure with a descriptive error message. Additionally adds a test to make sure this works. Addresses #1104
* filter.py: Allow passing integration commandsThomas Coldrick2019-09-162-1/+13
| | | | | | | | | | | | | It is tedious to manually copy the integration commands of the parent element into a filter element, so this allows it to be done automatically. Here we modify FilterElement.integrate() to allow us to pass through the parent's integration commands, iff an option is set. Also adds a test for the new feature, but this is not as comprehensive as would be idea, as getting to the integration commands which are run is a little more difficult. Addresses #1107
* Use distutils plugin from bst-plugins-experimentalJavier Jardón2019-09-122-100/+0
|
* sources/tar.py: Ensure tar source files are readableShahwat Dalal2019-09-051-2/+19
| | | | | | When non-readable files were being added to CAS, `add_object` was failing. Thus all sourced files must be readable if they are to be cached. The tar source has been modified to ensure this precondition.
* plugins/sources/patch.py: Validate keysThomas Coldrick2019-09-021-0/+1
| | | | | | Currently we don't validate the keys on a `patch` source, leading to nastier-looking error messages when `path` is missing. This simply makes us validate the yaml, as we do for other plugins.
* Move qmake plugin to bst-plugins-experimentalcoldtom/move-qmakeThomas Coldrick2019-08-142-101/+0
|
* Move modulebuild plugin to bst-plugins-experimentalThomas Coldrick2019-08-142-99/+0
| | | | Continuing moving plugins over to bst-plugins-experimental.
* Move makemaker plugin to bst-plugins-experimentalThomas Coldrick2019-08-122-99/+0
| | | | Continuing moving plugins to bst-plugins-experimental.
* Move make plugin to bst-plugins-experimentalcoldtom/move-makeThomas Coldrick2019-08-092-98/+0
|
* Move meson element to bst-plugins-experimentalThomas Coldrick2019-08-082-150/+0
|
* Move cmake plugin to bst-plugins-experimentalcoldtom/move-cmakeThomas Coldrick2019-08-082-146/+0
| | | | | | | | | | | | It was agreed on the mailing list to move all plugins to a single repository, before moving them into domain-specific repositories. As a result it seems reasonable to move everything to the bst-plugins-experimental repo as this stepping stone, rather than creating a whole new repo. This commit starts the process of moving things over by moving only the cmake plugin to bst-plugins-experimental, and altering the tests to reflect the new location.
* plugins/elements/junction.py: Add 'ignore-junction-remotes' optionJames Ennis2019-08-061-2/+9
| | | | | | | | This option allows us to completely ignore remotes defined in the subproject. As a user, we may not wish to interact with subproject remotes as we may not be able to trust them, for example. An appropriate test and some documentation has also been added.
* plugins/elements/junction.py: Add 'cache-junction-elements' optionJames Ennis2019-08-061-1/+8
| | | | | | | | | The 'cache-junction-elements' configuration option for junction's is a boolean which enables elements from within the junction to interact with the parent project's remote(s). A test has been added to enforce this behaviour and the BST_FORMAT_VERSION has been bumped.
* downloadablefilesource: Cache 'mirror_dir' and 'default_mirror_file'Benjamin Schubert2019-07-171-9/+14
| | | | | This allows faster access to those two files and reduces the time spent in their getters by more than 50%, which can be 2-3s on medium projects
* node: Add 'get_str_list' on 'MappingNode'Benjamin Schubert2019-07-172-4/+4
| | | | | | `mapping.get_sequence(...).as_str_list()` is a very common pattern seen both in plugins and the core. Adding a helper to reduce the number of operations will make usage smoother
* plugin: remove 'node_get_provenance', use the Node API directlyBenjamin Schubert2019-07-152-7/+8
|
* _project: remove 'key' argument from 'get_path_from_node'Benjamin Schubert2019-07-152-2/+2
| | | | | | | Now that we have scalar nodes, we can directly give the scalar to the method. - Adapt the plugin method to also not access via the key
* _yaml: Remove 'node_validate' and replace by 'MappingNode.validate_keys'Benjamin Schubert2019-07-1510-10/+10
| | | | - adapt all call sites to use the new API
* _yaml: Remove 'node_items' and add 'MappingNode.items()'Benjamin Schubert2019-07-151-1/+1
| | | | | | One difference is that 'MappingNode.items()' does not strip the provenance from scalars and lists, which ends up not affecting the code much.
* _yaml: Remove 'node_get' and migrate all remaining calls to new APIBenjamin Schubert2019-07-154-8/+8
|
* element: Remove `node_get_member` and all references to itBenjamin Schubert2019-07-152-2/+2
| | | | This can now be done more easily with the Node api
* _yaml: Add 'as_int()' on ScalarNodeBenjamin Schubert2019-07-151-1/+1
| | | | | | - Add the 'as_int()' method on 'ScalarNode' to replace 'node_get(mapping, key, int)' - Adapt all call sites to use the new API
* _yaml: Add 'as_bool()' and 'is_none()' to ScalarNodeBenjamin Schubert2019-07-154-6/+5
| | | | | | | | | | | - 'as_bool()' casts a ScalarNode into a boolean, understanding both 'True' and 'False' as truthy-falsy values, as per node_get(type=bool) behavior - 'is_none()' allwos checking whether the scalar node contains a 'None' value. Since 'None' cannot be used when working with booleans, we need to have a way of checking for 'None' when we actually need the information of whether the value is unset. - Adapt all call places to use the new API
* _yaml: Add 'as_str()' on ScalarNode and 'get_scalar()' on MappingNodeBenjamin Schubert2019-07-158-17/+15
| | | | | | | | | | - 'get_scalar()' allows retrieving a scalar node from a mapping. - 'as_str()' casts a ScalarNode into a string (thus removing the node information). Both together, those replace 'node_get(mapping, key, type=str)' but also allow retrieving the 'Node' itself, which will allow in the future lazier provenance computation.
* _yaml: add 'get_mapping()' to MappingNodeBenjamin Schubert2019-07-152-2/+2
| | | | | | | | This allows to get a mapping node from another 'MappingNode', replacing 'node_get(my_mapping, key, type=dict)' Also changes all places where 'node_get' was called like that by the new API.
* tar.py: Make link target renaming work between base-dirsTristan Maat2019-07-021-9/+36
| | | | Fixes #1052
* plugins/sources: Remove 'or None' call that will never be trueBenjamin Schubert2019-06-102-2/+2
| | | | | Since node_get_member has a default value passed in, it is impossible for the method to return 'None'
* _yaml.pyx: Forbid expected_type=Mapping, and remove isinstance checkBenjamin Schubert2019-06-031-2/+1
| | | | | | | | | | | Calls to `isinstance` can be particularily costly. Using type() is much faster. The only known case where the `isinstance` was useful is for dictionnaries where we would ask for a 'Mapping' instead. Disallowing 'Mapping' for expected_type considerably speeds up the calls to this functions. Also add into NEWS
* local.py: Support staging directly into CASRaoul Hidalgo Charman2019-05-221-33/+15
| | | | Part of #983
* Move source from 'buildstream' to 'src/buildstream'Chandan Singh2019-05-2142-0/+3891
This was discussed in #1008. Fixes #1009.