| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
All of the errors which subclass from BstError have their first
positional argument as message, LoadError should follow this
ordering for consistency.
|
|
|
|
|
|
|
|
| |
A 'clone' operation has an implicit understanding that it is expensive,
which is not the case of a 'copy' operation, which is more usually
a shallow copy.
Therefore renaming to 'clone'
|
|
|
|
|
| |
This makes the 'Node' API public, and available for use directly for
plugins.
|
|
|
|
|
|
|
| |
- _composite -> __composite (internal)
- composite -> _composite (BuildStream private)
- composite_under -> _composite_under (BuildStream private)
- get -> _get (internal)
|
|
|
|
|
|
|
|
| |
This replaces the helper method by adding a 'get_provenance' on the node
directly
- Adapt all call sites
- Delay getting provenance wherever possible without major refactor
|
|
|
|
|
| |
- Also take care of node_composite_move in the same way.
- Adapt all calling places
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
- Also add a convenience method 'safe_del' catching the exception
when we don't care if the value was there or not.
|
|
|
|
| |
Also adaprt every part of the code calling it
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Treat junction element sources the same as sources of any other element
and always fetch subprojects as needed. Do not ask the user to manually
fetch subprojects.
|
|
This was discussed in #1008.
Fixes #1009.
|