summaryrefslogtreecommitdiff
path: root/buildstream/_loader/loader.py
Commit message (Collapse)AuthorAgeFilesLines
* Pass element directly to collect_elementbschubert/loaderBenjamin Schubert2019-01-311-13/+9
| | | | This simplifies the loading
* Add LoadElement in dependency list for LoadElement idrectlyBenjamin Schubert2019-01-311-102/+59
| | | | | | This removes the need for the 'Dependency' list to then be matched with the corresponding LoadElement and will allow iterating the graph more easily
* Fixup refs to 'bst fetch'Angelos Evripiotis2019-01-281-1/+1
| | | | | Now that 'bst fetch' is obsolete, change guidance to refer to the replacement 'bst source fetch' instead.
* Fixup refs to 'bst track'Angelos Evripiotis2019-01-281-1/+1
| | | | | Now that 'bst track' is obsolete, change guidance to refer to the replacement 'bst source track' instead.
* _loader/loader.py: Add warnings about invalid characters in filenameChandan Singh2018-12-311-0/+37
| | | | | See https://mail.gnome.org/archives/buildstream-list/2018-December/msg00061.html for some related discussion.
* _loader/loader.py: Refactor warnings about element names in one methodChandan Singh2018-12-311-18/+33
| | | | | | | Currently we some duplication in the way we check for invalid filenames. To make it more robust and allow room for adding more warnings, refactor it into a separate method `_warn_invalid_elements()` that handles just this.
* types.py: Moving CoreWarnings to the types.py moduleTristan Van Berkom2018-12-061-1/+1
| | | | | | This also ensures it is exposed via the main buildstream __init__.py file, fixes the imports of CoreWarnings, and adjusts the documentation links to point to the right place.
* loader: Added file suffix check and helper functionPhillip Smyth2018-11-301-0/+40
| | | | _loader/loader.py: Added Suffix check and warning for named elements and add helper function
* _loader.py: Use Source._get_local_path() for subprojectsJürg Billeter2018-11-271-5/+11
| | | | | This eliminates unneeded copies of the project directory for junctions with a single local source.
* element.py: Remove unused artifacts parameter from _new_from_meta()Jürg Billeter2018-11-051-1/+1
|
* Fix python warnings: Use collections.abc instead collectionsjjardon/warnings_collectionsJavier Jardón2018-10-181-1/+2
| | | | | | | | Since python 3.3, collections has been moved to collections.abc module. For backwards compatibility, they continue to be visible in this module through Python 3.7. Subsequently, they will be removed entirely. See https://docs.python.org/3/library/collections.html
* _loader/loader.py: Be more explanatory in CircDep exceptionDaniel Silverstone2018-10-181-4/+14
| | | | | | | | | When a circular dependency is detected, the reported error hilights only one part of the loop in question. This change ensures that the entire loop is listed so that the user has a greater chance of easily determining the correct fix. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* yaml: Add a cache of parsed and provenanced yamlJonathan Maw2018-10-151-11/+20
| | | | | | Note that the ProvenanceFile's names will be incorrect after loading from the cache, but this is currently only used for writeback, which isn't used in junctions.
* _loader: Migrate to Context.artifactcacheJürg Billeter2018-09-271-3/+1
|
* Fix broken indentation after tracking.Valentin David2018-08-211-1/+1
| | | | | | | | | Issue was introduced by 171e803f (include directive) and the fix was found courtesy of @Qinusty. This fixes also the include feature. Because elements are to be serialized, the included fragments need to use copy_tree when loaded. Related to #470.
* Allow source plugins to access previous sourcesChandan Singh2018-08-151-2/+3
| | | | | | | | | | | | | Source plugin implementations can now specify that they need access to previously staged sources by specifying `BST_REQUIRES_PREVIOUS_SOURCES_TRACK` and/or `BST_REQUIRES_PREVIOUS_SOURCES_FETCH`, corresponding to access at `track` and `fetch` times respectively. Fixes #381. Replaces !505. For relevant discussion, see this discussion: https://gitlab.com/BuildStream/buildstream/merge_requests/505#note_83780747
* Add support for include '(@)' in project.conf and .bst filesValentin David2018-08-021-3/+16
| | | | Fixes #331.
* Make Project owner of Loader.Valentin David2018-08-021-25/+29
|
* Pass targets to Loader.load() instead of its constructor.Valentin David2018-08-021-17/+16
| | | | | This is required to be able to build a Loader before the list of targets is known.
* source: When fetching, try to fetch from mirrors firstJonathan Maw2018-07-271-1/+1
| | | | | | | | | | | **KLUDGE WARNING**: This involves making the source store its "meta" object so that it's possible to create a copy of the source inside the fetch queue, instead of back when the pipeline was being loaded. This adds the SourceFetcher class, which is intended for sources that fetch from multiple URLs (e.g. the git source and its submodules) Fix when fetching
* loader.py: Check whether the dir specified is also a <dir>.bst fileJames Ennis2018-06-291-0/+10
| | | | | - Slight modification to the wording of existing error message. - Closes #446
* Remove shebangs from python filesGökçen Nurlu2018-06-191-1/+0
| | | | Fixes #424
* Interpret names as colon separated junction path in loader.Valentin David2018-06-081-6/+41
| | | | | | 'a.bst:b.bst' gets interpreted as 'b.bst' from junction 'a.bst'. Part of #359.
* _loader/loader.py: Report element-path when failing to load elementsChandan Singh2018-06-061-1/+17
| | | | | | | | | | | | | | | | | It can be confusing, especially to new BuildStream users, that the CLI expects targets to be specified relative to element-path and not the current directory. Previously, the CLI would give a generic message stating that the file could not be found but it was not obvious that it was looking in the `element-path` directory. Explicitly print the element-path in the summary. Also, try to check if the specified element exists in the elements directory and print a hint to use the element-path relative paths if that's the case. Fixes #396. This is is also related to #341. This commit aims to tackle that issue by trying to educate users about element-path.
* Moving 'fetch_subprojects' configuration to stream <--> loaderTristan Van Berkom2018-05-081-3/+8
| | | | | | | | | This was previously decided in CLI, but knowledge of what to initialize has been moved to Stream(). Now there is no more point to store this configuration in the Context, we just have the Stream() decide it when asking the Pipeline() to invoke the Loader().
* _loader.py: Removing special case error for junctions depending on elementsTristan Van Berkom2018-04-261-4/+0
| | | | | | Leave this error to be handled by preflight. Updated test case to expect the new ElementError instead of a LoadError
* _loader: Give the loaded MetaSource objects the kind of the owning elementTristan Van Berkom2018-04-251-4/+4
| | | | | | This is needed so that Sources can derive whether they belong to a junction or not, which is needed for separating where junction refs are stored.
* buildstream/_loader/loader.py: Fixing unused variablesTristan Van Berkom2018-04-191-2/+1
|
* _context.py: Make `fetch_subprojects` public.Tristan Van Berkom2018-04-171-1/+1
| | | | | | This is actually used by the Loader and is not private. This is a part of #285
* _loader package: Splitting up the loader code into separate piecesTristan Van Berkom2018-04-171-360/+259
| | | | | | | This also refactors the loader code to honor private symbol naming policy. This is a part of issue #285
* _loader package: Creating a new sub package to hold the loader related things.Tristan Van Berkom2018-04-171-0/+641