summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* _variables.pyx: Fast and slow paths now existtristan/variables-refactorTristan van Berkom2020-07-191-74/+235
|
* _variables.pyx: Restore the calling node context in _expand_value_expression()Tristan van Berkom2020-07-181-6/+7
| | | | | | This will be required in the slower algorithm with error reporting, and is already used to fix error reporting for references to undefined variables in toplevel variable substitutions.
* _variables.pyx: Try to improve fast path performanceTristan van Berkom2020-07-181-10/+7
| | | | | Try using enumerate() for look instead of repeatedly indexing the list throughout a while loop.
* _variables.pyx: Return to cpdef for Variables.subst() and Variables.expand()Tristan van Berkom2020-07-181-26/+12
| | | | | Seems to add a slight calling overhead to separate these implementations as cdef.
* _variables.pyx: Improve _fast_expand_var()Tristan van Berkom2020-07-181-4/+7
| | | | | | * Reduce typechecking using some typecasts * Reduce dictionary lookups by using a temporary variable
* _variables.pyx: Setting up code for split of fast/slow pathsTristan van Berkom2020-07-181-46/+70
| | | | | | | | | | Use _expand_var() and _expand_value_expression() as gateways for handling KeyError and RecursionError and still calling _check_variables() for now as a fallback. Moved implementations to _fast_expand_var() and _fast_expand_value_expression() and in a later commit we will fallback to the non-recursive algorithm, and remove _check_variables() completely as this will be obsoleted.
* _variables.pyx: Separate public/private APIs and improve consistency of doc ↵Tristan van Berkom2020-07-181-41/+90
| | | | | | | | comments Now the public facing APIs use `cpdef` and all implementations use `cdef`, this is a more explict approach for ensuring fast paths are used whenever invoking cython code from cython functions.
* element.py: Pass ScalarNode to Variable.subst() when substituting the whitelistsTristan van Berkom2020-07-171-2/+2
|
* _variables.pyx: Fixed provenance from Variables.subst()Tristan van Berkom2020-07-171-1/+2
| | | | | Report provenance of the input ScalarNode when it refers to an undefined variable.
* _variables.pyx: Some more renaming, make subst() take a ScalarNode.Tristan van Berkom2020-07-171-24/+35
|
* _variables.pyx: Make _expand_var() and _expand_variable_expression() methodsTristan van Berkom2020-07-171-71/+72
| | | | Instead of functions at the toplevel.
* exceptions.py: Add circular reference error for variablesTristan van Berkom2020-07-171-0/+3
|
* tests/frontend/overlaps.py: Test undefined variablesTristan van Berkom2020-07-172-1/+27
| | | | | Ensure that we get the expected provenance when expanding a variable included in an overlap whitelist entry.
* tests/format/variables.py: Added some new testsTristan van Berkom2020-07-175-16/+67
| | | | | | | | | | | | * Test scenarios where a junction needs to resolve variables in order to configure a subproject, but where some other variables may be derived from the same subproject. In this scenario we allow partial resolution of variables for junction elements. * Enhanced the undefined variables and circular reference tests to also check for the expected provenances.
* _variables.pyx: Renaming some things, and documenting for better readability.Tristan van Berkom2020-07-171-15/+35
|
* Do not check for all variables in junctionsValentin David2020-07-179-38/+82
| | | | | | | | | | | Junctions are loaded before all variables can loaded. So there should not be errors for unused variables that are defined using undefined variables. Also this checks for undefined variables in the same time as looking for cycles. This will allow to show more errors to the user when both type of errors happen in the same time. This also simplify error handling in `_variables.pyx`.
* Merge branch 'abderrahim/loader-workspace' into 'master'bst-marge-bot2020-07-162-3/+6
|\ | | | | | | | | loader.py: use the full name of the element when looking up a workspace See merge request BuildStream/buildstream!1971
| * loader.py: use the full name of the element when looking up a workspaceAbderrahim Kitouni2020-07-162-3/+6
|/ | | | | This fixes a bug where buildstream would ignore the opened workspace on a cross-junction element.
* Merge branch 'chandan/remove-outdated-comment' into 'master'bst-marge-bot2020-07-151-1/+0
|\ | | | | | | | | _platform/platform.py: Remove outdated comment See merge request BuildStream/buildstream!1995
| * _platform/platform.py: Remove outdated commentChandan Singh2020-07-151-1/+0
|/ | | | | | | | "Preferred" sandboxes used to be a thing when we had sandbox implementations in BuildStream Core. This should probably have been removed at the same time as dropping the notion of preferred sandboxes, but that was likely an oversight.
* Merge branch 'tristan/fix-juncle-include-link' into 'master'Tristan Van Berkom2020-07-1518-3/+79
|\ | | | | | | | | | | | | Fix including of files across linked junction boundaries Closes #1359 See merge request BuildStream/buildstream!1993
| * tests/format/link.py: Added test for including files across linked junction ↵tristan/fix-juncle-include-linkTristan van Berkom2020-07-1515-0/+62
| | | | | | | | boundaries
| * _loader: Treat `link` elements like junctionsTristan van Berkom2020-07-152-3/+3
| | | | | | | | | | | | | | link elements need to be treated the same way as junctions in the load process. This fixes issue #1359
| * _project.py: Documenting why ensure_fully_loaded() is reentrant.Tristan van Berkom2020-07-151-0/+14
|/
* Merge branch 'dwinship/overnight-freedesktop-sdk-buildstream2' into 'master'bst-marge-bot2020-07-151-1/+1
|\ | | | | | | | | | | | | Test freedesktop-sdk against buildstream2 in CI Closes celduin/bsps/bst-boardconsumption#21 and #1334 See merge request BuildStream/buildstream!1987
| * Update overnight tests for freedesktop-sdkdwinship/overnight-freedesktop-sdk-buildstream2Douglas Winship2020-07-141-1/+1
|/ | | | | | Use the current 'main' bst2 branch of freedesktop-sdk, and use tag 1.93.4 of bst-plugins-experimental (contains an important fix for flatpak_image.py)
* Merge branch 'chandan/minor-formatting-fix' into 'master'bst-marge-bot2020-07-141-2/+2
|\ | | | | | | | | doc/main_glossary.rst: Fix formatting of .bst file reference See merge request BuildStream/buildstream!1974
| * doc/main_glossary.rst: Fix formatting of .bst file referencechandan/minor-formatting-fixChandan Singh2020-07-141-2/+2
|/ | | | | One of the references to the "`.bst` file" term was formatted incorrectly, and was missing a period.
* Merge branch 'bschubert/update-plugins' into 'master'Chandan Singh2020-07-142-5/+5
|\ | | | | | | | | Update bst-plugins-experimental to 1.93.4 See merge request BuildStream/buildstream!1991
| * Update bst-plugins-experimental to 1.93.4bschubert/update-pluginsBenjamin Schubert2020-07-142-5/+5
|/ | | | This removes the 'ostree' extra and some build dependencies
* Merge branch 'dwinship/fix-tab-completion' into 'master'bst-marge-bot2020-07-141-13/+1
|\ | | | | | | | | fix tab-completion: hardcode default min version See merge request BuildStream/buildstream!1989
| * fix tab-completion: hardcode default min versiondwinship/fix-tab-completionDouglas Winship2020-07-141-13/+1
|/ | | | | | | Hardcodes the default min version as "2.0", instead of using a function. (The function was causing an ImportError during tab completion, because it attempts to import "__version__", which isn't available at tab completion time.)
* Merge branch 'dwinship/dont-strip-bst-from-user-supplied-checkout-dir' into ↵bst-marge-bot2020-07-101-2/+2
|\ | | | | | | | | | | | | | | | | 'master' Don't strip '.bst' from user-supplied checkout dir Closes #1361 See merge request BuildStream/buildstream!1992
| * Don't strip '.bst' from user-supplied checkout dirDouglas Winship2020-07-101-2/+2
|/ | | | | | | | Allows user to supply a directory name ending in '.bst' for "bst artifact checkout", without buildstream removing '.bst' from the end. (It's only supposed to remove '.bst' if the user didn't supply a directory name, and buildstream is auto-generating a name based on the target name.)
* Merge branch 'bschubert/mypy-docs' into 'master'bst-marge-bot2020-07-091-11/+21
|\ | | | | | | | | coding_guidelines.rst: Update documentation around type annotation See merge request BuildStream/buildstream!1988
| * coding_guidelines.rst: Update documentation around type annotationbschubert/mypy-docsBenjamin Schubert2020-07-091-11/+21
|/ | | | | | | | After https://lists.apache.org/thread.html/r99119ddf038b3baa63afa3edf82ca28104f02550e6424dc5f14cb360%40%3Cdev.buildstream.apache.org%3E, we now allow mypy in any part of the codebase. - Also update previous documentation about typing public API
* Merge branch 'bschubert/tar-filter-nondev' into 'master'bst-marge-bot2020-07-092-2/+13
|\ | | | | | | | | tar.py: Don't import 'dev' nodes See merge request BuildStream/buildstream!1990
| * tar.py: Don't import 'dev' nodesbschubert/tar-filter-nondevBenjamin Schubert2020-07-082-2/+13
|/ | | | | This filters out all the 'dev' nodes when extracting tar files since they are not supported by any of our backends anyways
* Merge branch 'bschubert/simplify-stream-interactions' into 'master'bst-marge-bot2020-07-068-217/+102
|\ | | | | | | | | simplify stream interactions (Remove Notifications) See merge request BuildStream/buildstream!1985
| * scheduler.py: Remove all usage of notificationsBenjamin Schubert2020-07-063-97/+20
| | | | | | | | Call directly the relevant methods from the stream to the scheduler
| * scheduler.py: Remove notifications from scheduler to streamBenjamin Schubert2020-07-062-27/+7
| | | | | | | | | | This removes all notifications left coming from the scheduler, and replaces them by callbacks
| * _stream.py: Stop using a 'RUNNING' event to know the state of the schedulerBenjamin Schubert2020-07-062-11/+4
| | | | | | | | | | The stream is itself calling the `run` method on the scheduler, we don't need another indirection
| * _stream.py: Stop using a 'TERMINATED' event to know the state of the schedulerBenjamin Schubert2020-07-062-6/+3
| | | | | | | | | | We are calling the scheduler, and it returning correctly already tells us this.
| * _stream.py: Stop using a 'SUSPENDED' event to know the state of the schedulerBenjamin Schubert2020-07-062-7/+4
| | | | | | | | | | We are calling the scheduler, and it returning correctly already tells us this.
| * scheduler.py: Pass all 'retry' operations through the stateBenjamin Schubert2020-07-063-8/+37
| | | | | | | | | | Stop using 'Notifications' for retries, the state is the one handling the callbacks required for every change in status of elements
| * _state.py: Only use a single place of truth for the start timeBenjamin Schubert2020-07-065-19/+19
| | | | | | | | | | This moves all implementations of 'start_time' into a single place for easier handling and removing roundtrips of notifications
| * scheduler.py: Remove task-based notifications and use the stateBenjamin Schubert2020-07-062-26/+5
| | | | | | | | | | The State is the interface between both, there is no need to do multiple round-trips to handle such notifications
| * scheduler.py: Remove 'Message' notification type, use the messengerBenjamin Schubert2020-07-064-22/+9
|/ | | | | The messenger should be the one receiving messages directly, we don't need this indirection
* Merge branch 'bschubert/cleanup' into 'master'bst-marge-bot2020-07-062-3/+2
|\ | | | | | | | | app.py: Remove unnecessary operation in _message() See merge request BuildStream/buildstream!1984
| * sandbox.py: Remove unused importBenjamin Schubert2020-07-061-1/+1
| |