summaryrefslogtreecommitdiff
path: root/src/buildstream
Commit message (Collapse)AuthorAgeFilesLines
* _messenger: Fix complex objects leaking into child jobsJonathan Maw2019-07-261-0/+7
|
* Render progress information for loading and processing elementsJonathan Maw2019-07-268-61/+359
|
* loader: Move sort_dependencies to loadelement as a cython methodbschubert/optimize-loaderBenjamin Schubert2019-07-262-75/+78
|
* loadelement: Move loadelement to CythonBenjamin Schubert2019-07-262-29/+54
|
* loader: Don't pickle caches for child jobs, they are not needed thereDaniel Silverstone2019-07-261-0/+5
| | | | Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* sandbox: Add initial SandboxBuildBoxJürg Billeter2019-07-254-1/+289
|
* Mark buildbox tests as xfail if they require non implemented featuresWilliam Salmon2019-07-251-0/+1
|
* Update sandbox to use virtual directoriesWilliam Salmon2019-07-252-4/+17
|
* Fix descend can not follow symlinksWilliam Salmon2019-07-253-6/+53
|
* Implmented export_to_tar for casbaseddirectoryWilliam Salmon2019-07-251-1/+30
|
* Fix infinite recursion in _partial_import_cas_into_casWilliam Salmon2019-07-251-2/+7
|
* job: try pickling child jobs if BST_TEST_SUITEaevri/pickleAngelos Evripiotis2019-07-241-0/+7
| | | | | | | | If we're running BuildStream tests then pickle child jobs. This ensures that we keep things picklable, whilst we work towards being able to support platforms that need to use the 'spawn' method of starting processes.
* Make ChildJobs and friends picklableAngelos Evripiotis2019-07-249-1/+352
| | | | | | | | | Pave the way toward supporting the 'spawn' method of creating jobs, by adding support for pickling ChildJobs. Introduce a new 'jobpickler' module that provides an entrypoint for this functionality. This also makes replays of jobs possible, which has made the debugging of plugins much easier for me.
* node: picklable {Scalar,Mapping,Sequence}NodeAngelos Evripiotis2019-07-241-0/+18
| | | | | Make ScalarNode, MappingNode, and SequenceNode pickable by implementing `__reduce__` for them.
* optionpool: make OptionPool picklableAngelos Evripiotis2019-07-241-3/+18
| | | | | In order to enable the 'spawn' method of creating jobs, make sure that OptionPool is pickable, otherwise it cannot be sent to the job process.
* _platform: make picklable, no nested methodsAngelos Evripiotis2019-07-243-49/+53
| | | | | Make the _platform implementations pickable by moving the nested _setup_*_sandbox methods up into their enclosing classes.
* _context, cascache: mv BST_TEST_SUITE to ContextAngelos Evripiotis2019-07-242-1/+5
| | | | | | | Store the result of checking for BST_TEST_SUITE in the environment into the Context. This feels less weird than checking the environment every time. Note that this cannot replace every instance, as not everything should have access to the Context.
* _exceptions: fix 'BuildSream' typoAngelos Evripiotis2019-07-241-1/+1
|
* Reset cache data if a workspace build is pendingDarius Makovsky2019-07-221-0/+4
| | | | | | This reverts one of the changes in https://gitlab.com/BuildStream/buildstream/commit/fa70a4299bc97b1f723a8602f6fad1bcc013f17a#11743b796594142e47df22054b99d263d52e28aa_1151_1152 and will be followed in a new issue.
* Remove recalculate kwarg from Workspace.get_key()Darius Makovsky2019-07-221-2/+2
| | | | This is only used following key invalidation
* element.py: clobber sources with workspaceDarius Makovsky2019-07-221-3/+15
| | | | add name to sources in cache key dict
* Don't remove workspace directory when `--no-checkout` option is givenChandan Singh2019-07-191-2/+2
| | | | | | | | | | | | | When `--no-checkout` flag is used, BuildStream assumes that the target destination already contain the sources (potentially edited already). Hence BuildStream must not remove its contents. Fixes #1086. --- Also, fix a minor typo in the file that probably doesn't need a commit of its own.
* stream.py: Don't checkout sources in the parent of the locationChandan Singh2019-07-191-2/+1
| | | | | | | | | It is incorrect to assume that BuildStream will have write access to the parent directory of the specified destination. Instead of that, use the temporary directory of the current context for checking out sources temporarily. Fixes #1083.
* app: Fix "earily" typoalexfazakas/fix-frontend-typoAlexandru Fazakas2019-07-191-1/+1
|
* _exceptions.py: Align LoadError() parameter orderingtpollard/loaderrorTom Pollard2019-07-1821-259/+208
| | | | | | All of the errors which subclass from BstError have their first positional argument as message, LoadError should follow this ordering for consistency.
* Fixing typos: comand corrected to commandRebecca Grayson2019-07-172-3/+3
|
* Store Platform reference in Context instance variableJürg Billeter2019-07-175-19/+18
| | | | | This allows us to remove the platform reset helpers in tests/conftest.py.
* _variables: Fix reporting of missing variableBenjamin Schubert2019-07-171-1/+1
| | | | | | | When the missing variable was not defined, we would get an exception as a string doesn't contain provenance information. - Add a test to prevent regression
* downloadablefilesource: Cache 'mirror_dir' and 'default_mirror_file'Benjamin Schubert2019-07-172-9/+17
| | | | | 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
* source: Cache mirror_directory instead of computing it everytimeBenjamin Schubert2019-07-171-5/+10
| | | | | This variable is accessed multiple times per run and can be slow on slow file systems.
* _utils: Refactor 'url_directory_name' for more efficient C operationsBenjamin Schubert2019-07-171-7/+17
| | | | This reduces further the runtime of he method by more than 50%
* utils: Extract 'url_directory_name' to a cython moduleBenjamin Schubert2019-07-172-18/+46
| | | | | `url_directory_name` is heavily called from any downloadable source plugin, and moving it to cython gives a more than 10x speedup
* node: Add 'get_str_list' on 'MappingNode'Benjamin Schubert2019-07-1711-16/+39
| | | | | | `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
* Allowing tar files to be compressedbecky/tar_compressionRebecca Grayson2019-07-163-21/+73
| | | | | | | Changes made to cli.py and _stream.py in order to support tar compression. Compression flag has been added, which overrides any file extensions given. Where no compression or file extension provided, default to uncompressed .tar.
* cli.py: change is/is not None checksRebecca Grayson2019-07-161-2/+6
|
* _context.py: Remove unused _cache_key and get_cache_key()Jürg Billeter2019-07-161-17/+0
|
* _project.py: Remove unused _cache_key and get_cache_key()Jürg Billeter2019-07-161-18/+0
|
* cli.py: Use Context as context managerJürg Billeter2019-07-161-23/+23
|
* app.py: Use Context as context managerJürg Billeter2019-07-161-126/+129
|
* _context.py: Make Context class a Python context managerJürg Billeter2019-07-161-0/+14
| | | | This will allow reliable cleanup.
* Checkout to default dir if no tar or directory:Rebecca Grayson2019-07-161-5/+6
| | | | | | | When neither --tar nor --directory are provided, bst artifact checkout will no longer error out. Defaults to a suitable directory, consistent with bst workspace open. Test for new feature has been added
* node.pyx: rm trailing whitespaceAngelos Evripiotis2019-07-161-53/+53
|
* element.py: Introduce __cached_successfullyJames Ennis2019-07-161-1/+13
| | | | | | | | Currently Element._cached_success() will call two functions to determine whether an Element is already cached. Now, we set __cached_successfully to True once we determine that the Element is cached for the first time. This will then short-circuit upon (very frequent) future calls.
* element.py: Cache whether we've resolved the initial stateJames Ennis2019-07-162-1/+5
|
* element.py: Call __update_strict_cache_key_of_rdeps() only if neededJürg Billeter2019-07-161-8/+8
| | | | | It's not required with strict build plans. Skip it to improve performance.
* element.py: Deduplicate _update_ready_for_runtime_and_cached() callsJürg Billeter2019-07-161-10/+5
|
* element.py: Remove update_state_recursively()James Ennis2019-07-162-78/+4
| | | | | | Now that __update_ready_for_runtime() and __update_strict_cache_key_of_rdeps() have been introduced, we no longer need to recursively update the state of elements
* element.py: Introduce __update_ready_for_runtime()James Ennis2019-07-161-1/+50
| | | | | | | | | | | An element becomes ready for runtime once it has a cache key and all of its transitive runtime dependencies have cache keys. This patch introduces the method __update_ready_for_runtime() which is called once the cache key of an Element is calculated. When called, we immediately notify reverse dependencies and, if appropriate, try to calculate their cache keys.
* element.py: Introduce __update_strict_cache_key_of_rdeps()James Ennis2019-07-162-2/+44
| | | | | | | | | | | | | | | | Once an Element's strict cache key is determined, we should attempt to update the strict cache key of it's reverse dependencies. The state of a reverse dependency will be updated once all of its dependencies have strict cache keys This patch introduces the potential for a RecursionError because _update_state() can now trigger further _update_state calls (on reverse dependencies). Therefore, the maximum recursion limit for our "test_max_recursion_depth" test has been lowered. If this becomes a problem, we can always consider setting a larger recursion limit, for now, this change has been tested with the Debian stack and works as expected.
* element.py: Remove needless function overheadJames Ennis2019-07-161-34/+13
| | | | | | | | This patch inlines the __on_{build,runtime}_dependency_ready_for_runtime_and_cached() functions. Their logic now exists within _update_ready_for_runtime_and_cached, thus the overhead of the extra functions have been removed.