conan-io / web

Conan website, including home and ConanCenter
MIT License
10 stars 10 forks source link

Optional dependency information not shown in dependencies tab #137

Open samuel-emrys opened 9 months ago

samuel-emrys commented 9 months ago

Using armadillo as an example:

image

You can see that there are no dependencies shown. My guess is that the solver you're using for this only shows unqualified dependencies - those that are always dependencies, irrespective of the value options have or some other conditional.

Armadillo has optional (but default) dependencies on hdf5 and openblas:

    def requirements(self):
        # Optional requirements
        # TODO: "atlas/3.10.3" # Pending https://github.com/conan-io/conan-center-index/issues/6757
        # TODO: "superlu/5.2.2" # Pending https://github.com/conan-io/conan-center-index/issues/6756
        # TODO: "arpack/1.0" # Pending https://github.com/conan-io/conan-center-index/issues/6755
        # TODO: "flexiblas/3.0.4" # Pending https://github.com/conan-io/conan-center-index/issues/6827

        # The armadillo library no longer takes any responsibility for linking hdf5 as of v12.x. This means
        # it will have to be linked manually by consumers if desired.
        # See https://gitlab.com/conradsnicta/armadillo-code/-/issues/227 for more information.
        if self.options.use_hdf5 and Version(self.version) < "12":
            # Use the conan dependency if the system lib isn't being used
            # Libraries not required to be propagated transitively when the armadillo run-time wrapper is used
            self.requires("hdf5/1.14.1", transitive_headers=True, transitive_libs=not self.options.use_wrapper)

        if self.options.use_blas == "openblas":
            # Libraries not required to be propagated transitively when the armadillo run-time wrapper is used
            self.requires("openblas/0.3.20", transitive_libs=not self.options.use_wrapper)
        if (
            self.options.use_blas == "intel_mkl"
            and self.options.use_lapack == "intel_mkl"
        ):
            # Consumers can override this requirement with their own
            # by using self.requires("intel-mkl/version@user/channel, override=True)
            # in their consumer conanfile.py
            if (
                self.options.use_blas == "intel_mkl"
                or self.options.use_lapack == "intel_mkl"
            ):
                self.output.warning(
                    "The intel-mkl package does not exist in CCI. To use an Intel MKL package, override this requirement with your own recipe."
                )
            self.requires("intel-mkl/2021.4")

I think it would be useful to show these as dependencies on this page, as they are dependencies in the default configuration. It would also be good to see which dependencies are optional, and how those options can be activated. Something like

openblas/0.3.25 (optional) >
    armadillo/*:use_blas="openblas"