From ca4c0b97ecf13b4a9c9007bb7ff4912cddae820c Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 21 Apr 2020 14:22:30 -0700 Subject: Doc: Conflict Msg Pkg Guide (#16201) Document the nice `msg=` argument in conflicts. Super useful for less generic conflict guidance. --- lib/spack/docs/packaging_guide.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 26f843aa0e..7abadaac82 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -2169,13 +2169,17 @@ Adding the following to a package: .. code-block:: python - conflicts('%intel', when='@1.2') + conflicts('%intel', when='@:1.2', + msg=' <= v1.2 cannot be built with Intel ICC, ' + 'please use a newer release.') we express the fact that the current package *cannot be built* with the Intel -compiler when we are trying to install version "1.2". The ``when`` argument can -be omitted, in which case the conflict will always be active. +compiler when we are trying to install a version "<=1.2". The ``when`` argument +can be omitted, in which case the conflict will always be active. Conflicts are always evaluated after the concretization step has been performed, and if any match is found a detailed error message is shown to the user. +You can add an additional message via the ``msg=`` parameter to a conflict that +provideds more specific instructions for users. .. _packaging_extensions: -- cgit v1.2.3-60-g2f50