[Notes] [Git][BuildStream/buildstream][chandan/junction-dependency-format] Document how to refer to cross-junction dependencies inline



Title: GitLab

Chandan Singh pushed to branch chandan/junction-dependency-format at BuildStream / buildstream

Commits:

2 changed files:

Changes:

  • buildstream/plugins/elements/junction.py
    ... ... @@ -109,6 +109,8 @@ Junctions can configure options of the linked project. Options are never
    109 109
     implicitly inherited across junctions, however, variables can be used to
    
    110 110
     explicitly assign the same value to a subproject option.
    
    111 111
     
    
    112
    +.. _core_junction_nested:
    
    113
    +
    
    112 114
     Nested Junctions
    
    113 115
     ----------------
    
    114 116
     Junctions can be nested. That is, subprojects are allowed to have junctions on
    

  • doc/source/format_declaring.rst
    ... ... @@ -401,6 +401,41 @@ Attributes:
    401 401
          The ``junction`` attribute is available since :ref:`format version 1 <project_format_version>`
    
    402 402
     
    
    403 403
     
    
    404
    +Cross-junction dependencies
    
    405
    +~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    406
    +As mentioned above, cross-junction dependencies can be specified using the
    
    407
    +``junction`` attribute. They can also be expressed as simple strings as a
    
    408
    +convenience shorthand. You can refer to cross-junction elements using the
    
    409
    +syntax ``{junction-name}:{element-name}``.
    
    410
    +
    
    411
    +For example, the following is logically same as the example above:
    
    412
    +
    
    413
    +.. code:: yaml
    
    414
    +
    
    415
    +   build-depends:
    
    416
    +     - baseproject.bst:foo.bst
    
    417
    +
    
    418
    +Similarly, you can also refer to cross-junction elements via the ``filename``
    
    419
    +attribute, like so:
    
    420
    +
    
    421
    +.. code:: yaml
    
    422
    +
    
    423
    +   depends:
    
    424
    +     - filename: baseproject.bst:foo.bst
    
    425
    +       type: build
    
    426
    +
    
    427
    +.. note::
    
    428
    +
    
    429
    +   BuildStream does not allow recursice lookups for junction elements. If a
    
    430
    +   filename contains more than one ``:`` (colon) character, an error will be
    
    431
    +   raised. See :ref:`nested junctions <core_junction_nested>` for more details
    
    432
    +   on nested junctions.
    
    433
    +
    
    434
    +.. note::
    
    435
    +
    
    436
    +   This shorthand is available since :ref:`format version 22 <project_format_version>`
    
    437
    +
    
    438
    +
    
    404 439
     .. _format_dependencies_types:
    
    405 440
     
    
    406 441
     Dependency types
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]