| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
They have been the same for a long time.
|
| |
|
| |
|
|
|
|
| |
Match the structure of real targets.
|
|
|
|
|
| |
Since these changes were effected in 3b17762a4cab23c238762ca32baa348788347473,
these stringifications are now implied and no longer needed.
|
| |
|
|
|
|
| |
Hide all of buildstream's internal exceptions from the API surface.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
All of the _yaml APIs which deal with a node (dictionary loaded
from YAML) are named _yaml.node_foo(), _yaml.node_bar(), _yaml.node_baz()
etc, except for this one glaring exception.
Also added a missing internal API documenting comment for _yaml.node_validate()
Also updated all callers to _yaml.validate_node() to now call _yaml.node_validate().
|
|
|
|
| |
Fixes another regression from validating all the loaded node attributes.
|
| |
|
|
|
|
|
|
| |
This is equivalent to not specifying a dependency type at all.
Fixes #61
|
|
|
|
|
| |
Add an extra argument to the function to know which elements
were already resolved.
|
|
|
|
|
|
|
|
|
| |
After resolving variants and checking for circular dependencies,
perform one pass and resolve the chosen project variant.
This is used later by the caller to complete the project
initialization before resolving the final Element() and Source()
objects.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit contains some good refactors to the variant resolution
code and provides a bit better context on variant resolution failures.
However the patch is still imperfect, variant resolution code needs
a more solid algorithm.
Currently this is fixed by adding an additional hash table of the
expected variants imposed by the parent when recursing, however
it will still likely fail when variant disagreements occur deep
in nested branches, since we still only ever return the first
valid variant for a recursion.
I have another branch which resolves variants perfectly, but it
does so by always returning every valid configuration through
the recursion algorithm and then choosing the first valid configuration
once recursion completes (thus satisfying the rule which prioritizes
the first variant of any ambivalent dependencies).
The problem with the perfect algorithm is that complexity is exponential
and takes minutes to resolve small pipelines of only 50 elements with
around 15 elements with two variants each.
NOTE: I suspect the current approach can be made to produce the
expected result 100% of the time with decent complexity,
if we can change the current algorithm to recurse through
the graph in a bredth first manner, instead of depth first.
|
|
|
|
|
|
|
|
|
| |
Previously, the loader was incorrectly settling on the *last*
valid variant instead of the *first* valid configuration.
This is incorrect and violates the rule that the first variant
of an element is chosen when depended on ambivalently, and that
the first variant without disagreement will always be chosen.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o When the toplevel variant does not exist in the loaded target,
raise the LoadError
o When any element requests a nonexistent variant on any of
it's dependencies, raise the LoadError
o Internal Dependency objects now track the provenance from
whence they were declare, to allow more accurate error reporting
for invalid variants via dependencies.
Beyond this, we also remove the Loader's self.loaded_files attribute
and a bogus assertion that two elements can claim the same name, instead
just rely on a single map of loaded elements to protect against reentrancy.
This was a legacy leftover from an initial implementation which allowed
elements to be named, and as such we were treating loaded files and
loaded elements separately.
|
|
|
|
| |
Dont lose the selected variant of elements, pass them along to the metaelement at load time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This command adds initial cross-compilation support to BuildStream.
It has been tested against a converted version of the Baserock
compiler bootstrap and used to cross build sysroots for armv8l64 and ppc64l
from an x86_64 host.
For example, to build a sysroot for ARM v8 64-bit you can do this:
bst build --target-arch=armv8b64 gnu-toolchain/stage2.bst
This would cause the adapted Baserock definitions to produce a stage1 simple
cross compiler that runs on the native architecture and produces armv8b64
binaries, and then cross build a stage2 sysroot that executes on armv8b64.
Currently the --host-arch option does nothing of use. It will one day
enable host-incompatible builds using a QEMU-powered cross sandbox.
The `--arch=` option is now shorthand for `--host-arch= --target-arch=`.
Elements have 2 new variables available, %{bst-host-arch} and
%{bst-target-arch}. The 'arches' conditional now follows %{bst-target-arch},
while the new 'host-arches' conditional follows %{bst-host-arch}. All
of --arch, --host-arch and --target-arch default to the output of `uname -a`.
There's no magic here that would make all BuildStream elements suddenly
able to cross compile. It is up to an individual element to support this by
honouring %{bst-target-arch} in whatever way makes sense.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o The metaelements and metasources now carry the name, the loader
resolves source names now.
o Element/Source factories dont require a name anymore as they
are already in the meta objects
o Pipeline no longer composes names
o Element.name is now the original project relative filename,
this allows plugins to identify that name in their dependencies,
allowing one to express configuration which identifies elements
by the same name that the user used in the dependencies.
o Removed plugin._get_display_name() in favor of the plugin.name
o Added Element.normal_name, for the cases where we need to have
a normalized name for creating directories and log files
o Updated frontend and test cases and all callers to use the
new naming
|
| |
|
|
|
|
|
|
| |
It was incorrect to use the meta.config for provenance, since
it may be incorrect when the element itself uses only default
configuration.
|
|
|
|
| |
So the user has some feedback while we load files.
|
|
|
|
|
| |
This is more accurate than 'dict', it can be a ChainMap sometimes
which will not be a 'dict'
|
|
|
|
| |
Seems I had this here from pure paranoia, no need to copy this data at all.
|
|
|
|
|
| |
Avoids the deep copy in _yaml.load() unless writable is True,
use writable=True if you need to later serialize loaded sources.
|
|
|
|
|
|
|
| |
This was working but very expensive, now we cache a flat dictionary
of each element's dependencies once in order to query deep dependencies
for the sort, this memory will anyway be let go after the load process
completes.
|
| |
|
|
|
|
| |
Dont enforce unique basenames.
|
|
|
|
|
|
|
| |
This ensures that whenever Element.dependencies() is used, the
correct staging / building order is always reported by the generator,
without requiring multiple topological sorts to occur throughout
the build process.
|
|
|
|
|
|
|
|
|
|
|
| |
The last circular dependency checker was insanely convoluted and
also insanely expensive.
The dependency check is still performed at the correct place: after
resolving the variants and knowing what the dependencies will be
for the pipeline, and just before returning LoadElements.
Dependency check is now also performed in linear time.
|
| |
|
| |
|
|
|
|
|
|
| |
This flags certain environment variables as being irrelevant
in cache key resolution, allowing one to set verbosity or max jobs
and such without effecting cache keys.
|
|
|
|
| |
constructor
|
| |
|
|
|
|
|
| |
The user may specify overrides for the environment or for variables
in the element configurations.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Fixed false positives of circular dependency errors, moved
circular dependency detection outside of variant resolution
o Simplified code for variant resolution, dont ever allow more than
one of the same element/variant configuration exist in the same pool,
silently continue in the case of a match or raise VariantError otherwise,
the algorithm will eventually try a matching variant itself.
o Removed another redundant loop hunting for variant errors prematurely:
no need to check if dependencies of all configurations have variant
mismatches, if something depends on the element, it will be traversed.
|
|
|
|
|
| |
Stacks should still exist but they are purely an element
implementation detail.
|
|
|
|
|
| |
The directory is available on all sources and handled by the core, lets
construct the MetaSource with the directory already resolved.
|
| |
|
| |
|
| |
|