sphinx-needs
sphinx-needs copied to clipboard
Warnings on builds when dynamic functions are used with incremental and parallel build
Sphinx Needs creates warnings starting with second build when dynamic functions are used with incremental and parallel build. Now that's a tough one to crack :)
How to reproduce
- Create a need in rST
- Create a second need and have one option copied over from the first need
Example:
.. req-sw::
:id: NEED_01
:status: open
.. req-sw::
:id: NEED_02
:status: [[copy("status", "NEED_01")]]
- Create a validation for copied option
needs_warnings = {
'req_with_no_status': "(type == 'req-sw') and \
(status is not None and len(status) != 0) and \
(status not in ['open','done'])"
}
- Start Sphinx Build with parallel build (Make sure no warnings are present)
- Start Sphinx Build a second time with parallel build (Make sure the build was incremental)
- Warning raised for NEED_02
WARNING: req_with_no_status: failed
failed needs: 1 (NEED_02)
used filter: (type == 'req-sw') and (status is not None and len(status) != 0) and (status not in ['open','done'])
@danwos This one is getting more important now as the dynamic functions like tr_link from sphinx-test-reports extension does not work as well in this scenario
With all the debugging into sphinx and sphinx-needs that we did recently, it should be able to find a solution for this now I feel.
Maybe @Rubyfi can help. The issue is present in our internal sphinx-needs-basics example.