conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
974 stars 1.79k forks source link

[package] gsl-lite/0.38.1: Contract violation usability issue #5521

Open atomicflag opened 3 years ago

atomicflag commented 3 years ago

Package and Environment Details

The version of the conanfile.py in this repo differs quite drastically from the upstream version, specifically we found that we can't use the conan-center version because it requires a user to choose a contract violation behavior upfront whereas the upstream version does not. Our build system needs to be able to decide the violation policy for itself at a later stage because we reuse conan dependencies for all submodules and some submodules require a different violation policy from the rest.

I propose we add None to the list of valid values for the on_contract_violation option and make it so that conanfile.py doesn't add any defines when on_contract_violation is None.

SpaceIm commented 3 years ago

This option should never have been added in the recipe. Actually it should be completly removed.

atomicflag commented 3 years ago

That would work for us too. In fact, as a workaround, we are packaging the upstream conanfile in our private repo and it works exactly as we hoped it would. I was quite puzzled when I discovered that conan-center's conanfile deviates so much from the upstream version to the point where we can't use it in our project.

atomicflag commented 3 years ago

Also, a minor nitpick: https://github.com/conan-io/conan-center-index/blob/a836ab2cad1e57719f31f132076182056393ac5a/recipes/gsl-lite/all/conanfile.py#L12

("GSL") is not a tuple, ("GSL",) is.

perseoGI commented 2 months ago

Hi there! Sorry to catch up so late. I've created a PR https://github.com/conan-io/conan-center-index/pull/25157 which aims to address your old request.