summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* _yaml: Remove 'node_find_target' and replace by 'MappingNode.find'Benjamin Schubert2019-07-154-68/+70
|
* _yaml: Remove 'key' from node_find_targetBenjamin Schubert2019-07-153-12/+7
| | | | | | | - node_find_target with 'key' is only used once in the codebase. We can remove and simplify this function - Allow 'MappingNode.get_node()' to be called without any 'expected_types'
* _yaml: Remove 'node_set'. Now use __setitem__Benjamin Schubert2019-07-1515-98/+98
| | | | | | - Implement __setitem__ on 'MappingNode' - Implement __setitem__ on 'SequenceNode' - Adapt all call sites to use the new calling way.
* _yaml: Remove 'node_items' and add 'MappingNode.items()'Benjamin Schubert2019-07-1510-86/+32
| | | | | | One difference is that 'MappingNode.items()' does not strip the provenance from scalars and lists, which ends up not affecting the code much.
* _yaml: Introduce 'MappingNode.values()'Benjamin Schubert2019-07-155-9/+17
| | | | | | | This is to mimic the 'dict.values()' interface. - Adapt parts of the code calling 'node_items' but ignoring the first value to use this instead
* _yaml: Remove 'node_keys' and add 'MappingNode.keys' to replace itBenjamin Schubert2019-07-158-30/+16
| | | | | This mimics the dict.keys() method but returns a list instead of a dict_keys, for cython performance reasons
* _yaml: Remove 'node_del' and support `del mapping[key]`Benjamin Schubert2019-07-159-30/+22
| | | | | - Also add a convenience method 'safe_del' catching the exception when we don't care if the value was there or not.
* _yaml: Remove 'node_copy' and add 'Node.copy()'Benjamin Schubert2019-07-157-85/+51
| | | | Also adaprt every part of the code calling it
* _yaml: Add a 'get_node' on Mapping, when return type can be of multiple typesBenjamin Schubert2019-07-153-12/+27
| | | | | | | | | | | Sometimes, we might want to have a list or a string, in which case, we can now use 'get_node', which can return multiple types. This method doesn't contain a 'default' value, as building a 'Node' from it would be hard. We therefore just have a 'allow_none' flag that allows returning 'None' when the value is not found. - includes: use the new 'get_node' instead of trying multiple versions
* _yaml: Never create base 'Node' directlyBenjamin Schubert2019-07-152-5/+8
| | | | We shouldn't have to create normal nodes ever. Let's ensure we don't
* _yaml: Remove 'node_get' and migrate all remaining calls to new APIBenjamin Schubert2019-07-1519-167/+67
|
* doc/bst2html: Remove usage of 'node_get' and use new APIBenjamin Schubert2019-07-151-13/+11
|
* element: Remove `node_get_member` and all references to itBenjamin Schubert2019-07-154-47/+3
| | | | This can now be done more easily with the Node api
* plugin: remove 'node_get_list_element'Benjamin Schubert2019-07-151-37/+1
| | | | | | | The new yaml API is able of getting these access with the same error messages handling. Having this helper is therefore not useful anymore.
* element: remove 'node_subst_list_element'Benjamin Schubert2019-07-152-43/+1
| | | | | This method is unused and can be easily reimplemented with the new Node API by looping over nodes.
* tests: remove 'node_get_yaml_provenance()' helper and replace with the new APIBenjamin Schubert2019-07-156-62/+19
| | | | | | This function is hard to make generic and, with the new API, the access is simplified. Therefore, removing this function and migrating all its usages
* _yaml: Introduce 'get_sequence()' and 'sequence_at()'/'mapping_at()'Benjamin Schubert2019-07-1519-70/+123
| | | | | | | | | - Adding 'get_sequence' on MappingNode to access sequences in a mapping - Adding 'sequence_at' on SequenceNode to access sequences in a sequence - Adding 'mapping_at' on SequenceNode to access mappings in a sequence Using "*_at" in sequences allows us to quickly understand if we are dealing with a sequence or a mapping.
* _yaml: Remove use of expected_type=None in 'node_get()'Benjamin Schubert2019-07-153-13/+11
| | | | | | | In a strongly typed API with Node, having a 'None' as expected type is hard to make nice. Moreover, this is rarely used in the codebase. Thus, adapting the call sites to not use 'None' as an expected type.
* _yaml: Add 'as_int()' on ScalarNodeBenjamin Schubert2019-07-158-15/+32
| | | | | | - 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-1516-36/+58
| | | | | | | | | | | - '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-1546-162/+190
| | | | | | | | | | - '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-1519-78/+102
| | | | | | | | 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.
* _yaml: Introduce a 'Sequence' NodeBenjamin Schubert2019-07-151-10/+20
| | | | | | | This allows us to represent sequences (lists) more efficiently. This is the third type that is needed in order to know what kind of datastructure we are handling in our graph.
* _yaml: Introduce a 'Mapping' Node classBenjamin Schubert2019-07-153-23/+38
| | | | | This allows us to specialize the base 'Node' class to store mappings (dicts) more efficiently.
* _yaml: Introduce a Scalar Node to encapsulate str/int/boolsBenjamin Schubert2019-07-151-12/+33
| | | | | | | | This node specializes the 'Node' class to represent a scalar value. This allows us to let users access leaf Nodes in the graph without having to find them with `node_find_target`, and also will allow us lazier computation of node provenance in some cases.
* Merge branch 'raoul/994-further-re-testing' into 'master'bst-marge-bot2019-07-1212-0/+369
|\ | | | | | | | | | | | | Further RE testing Closes #994 See merge request BuildStream/buildstream!1452
| * tests: Add RE test for builds that failRaoul Hidalgo Charman2019-07-121-0/+75
| | | | | | | | Part of #994
| * Fix scriptelement to set output directoryRaoul Hidalgo Charman2019-07-121-0/+3
| | | | | | | | | | This is important for sandboxremote which uses this to process the job outputs after a remote build.
| * tests: pulling buildtrees in remote executionRaoul Hidalgo Charman2019-07-123-0/+105
| | | | | | | | Part of #994
| * tests: Add remote execution junction testRaoul Hidalgo Charman2019-07-127-0/+186
|/ | | | Part of #994
* Merge branch 'traveltissues/cache-key-changes' into 'master'bst-marge-bot2019-07-1229-37/+34
|\ | | | | | | | | element.py: changes to __cache_key_dict See merge request BuildStream/buildstream!1466
| * element.py: change cache key dict fieldstraveltissues/cache-key-changesDarius Makovsky2019-07-1229-37/+34
|/ | | | relates to #1073
* Merge branch 'willsalmon/platformRefactor' into 'master'bst-marge-bot2019-07-1225-214/+585
|\ | | | | | | | | Refactor Platform and Sandboxes See merge request BuildStream/buildstream!1429
| * test for BST_FORCE_SANDBOX and BST_FORCE_BACKENDwillsalmon/platformRefactorWilliam Salmon2019-07-127-0/+231
| |
| * Refactor of Platform and SandboxWilliam Salmon2019-07-1218-214/+354
|/
* Merge branch 'raoul/1043-disabling-blob-fetching' into 'master'bst-marge-bot2019-07-115-12/+43
|\ | | | | | | | | | | | | Configuration option for disabling blob fetching with RE Closes #1043 See merge request BuildStream/buildstream!1402
| * doc/source/using_config.rst: Add pull-artifact-files optionRaoul Hidalgo Charman2019-07-111-2/+6
| | | | | | | | Part of #1043
| * tests/remoteexecution/partial.py: Parametrize for pull artifact filesRaoul Hidalgo Charman2019-07-111-5/+12
| | | | | | | | Part of #1043
| * Add pull-artifact-files configuration option for remote executionRaoul Hidalgo Charman2019-07-112-3/+21
| | | | | | | | | | | | | | This decides whether to fetch the file blobs of remote execution built artifacts. Part of #1043
| * _stream.py: Use build_all to determine required artifact files with RERaoul Hidalgo Charman2019-07-111-1/+3
| | | | | | | | Part of #1043
| * element.py: Add scope to _set_artifact_files_requiredRaoul Hidalgo Charman2019-07-111-3/+3
|/ | | | Part of #1043
* Merge branch 'tristan/exit-on-nonblock-terminal' into 'master'bst-marge-bot2019-07-101-0/+12
|\ | | | | | | | | | | | | _frontend/cli.py: Exit with error if output streams are set to nonblocking Closes #929 See merge request BuildStream/buildstream!1411
| * _frontend/cli.py: Exit with error if output streams are set to nonblockingTristan Van Berkom2019-07-101-0/+12
|/ | | | | | | This is better than raising a stack trace later on when logging gets intense with a BlockingIOError. This fixes #929
* Merge branch 'aevri/vulture' into 'master'bst-marge-bot2019-07-0913-139/+21
|\ | | | | | | | | Remove some unused code See merge request BuildStream/buildstream!1455
| * Option: rm unused self.descriptionAngelos Evripiotis2019-07-091-2/+5
| |
| * _casbaseddirectory: rm unused methodsAngelos Evripiotis2019-07-091-26/+0
| |
| * _casbaseddirectory: fix '_mark_changed' spellingAngelos Evripiotis2019-07-091-1/+1
| | | | | | | | | | Override the base-class method '_mark_changed', instead of declaring a new unused method that only raises NotImplementedError.
| * _casbaseddirectory: rm unused exception classesAngelos Evripiotis2019-07-091-29/+0
| |
| * source: rm unused _cache(), __source_cacheAngelos Evripiotis2019-07-091-6/+0
| |
| * element: rm unused __tracking_doneAngelos Evripiotis2019-07-091-2/+0
| |