Foundation types
- class FastEnum(value)
Bases:
objectA reimplementation of a subset of the Enum functionality, which is far quicker than Enum.
enum.Enumattributes accesses can be really slow, and slow down the execution noticeably. This reimplementation doesn’t suffer the same problems, but also does not reimplement everything.- name = None
The name of the current Enum entry, same as
enum.Enum.name()
- value = None
The value of the current Enum entry, same as
enum.Enum.value()
- classmethod values()
Get all the possible values for the enum.
- Returns:
the list of all possible values for the enum
- Return type:
list
- class CoreWarnings
Bases:
objectSome common warnings which are raised by core functionalities within BuildStream are found in this class.
- OVERLAPS = 'overlaps'
This warning will be produced when buildstream detects an overlap on an element which is not whitelisted. See Overlap Whitelist
- UNSTAGED_FILES = 'unstaged-files'
This warning will be produced when a file cannot be staged. This can happen when a file overlaps with a directory in the sandbox that is not empty.
- REF_NOT_IN_TRACK = 'ref-not-in-track'
This warning will be produced when a source is configured with a reference which is found to be invalid based on the configured track
- class OverlapAction
Bases:
FastEnumDefines what action to take when files staged into the sandbox overlap.
Note
This only dictates what happens when functions such as
Element.stage_artifact()andElement.stage_dependency_artifacts()are called multiple times in an Element’sElement.stage()implementation, and the files staged from one function call result in overlapping files staged from previous invocations.If multiple staged elements overlap eachother within a single call to
Element.stage_dependency_artifacts(), then the overlap whitelist will be ovserved, and warnings will be issued for overlapping files, which will be fatal warnings ifCoreWarnings.OVERLAPSis specified as a fatal warning.- ERROR = <buildstream.types.OverlapAction object>
It is an error to overlap previously staged files
- WARNING = <buildstream.types.OverlapAction object>
A warning will be issued for previously staged files, which will fatal if
CoreWarnings.OVERLAPSis specified as a fatal warning in the project.
- IGNORE = <buildstream.types.OverlapAction object>
Overlapping files are acceptable, and do not cause any warning or error.
- SourceRef
A simple python object used to describe and exact set of sources
This can be
Nonein order to represent an absense of a source reference, otherwise it can beint,str, or a complexlistordictconsisting ofint,str,listanddicttypes.The order of elements in
listobjects is meaningful and should be produced deterministically bySourceimplementations, as this order will effect cache keys.See the source documentation for more detils on how
Sourceimplementations are expected to handle the source ref.alias of
Union[None,int,str,List[Any],Dict[str,Any]]