conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.24k stars 980 forks source link

[question] Is get_gnu_triplet private in 2.x? #14230

Open jens-ghc opened 1 year ago

jens-ghc commented 1 year ago

What is your question?

We had used the function get_gnu_triplet quite often in Conan 1.x recipes in order to deal with libraries that are packaged using the triplet. The code is here: https://github.com/conan-io/conan/blob/release/1.60/conans/client/tools/oss.py#L513

In Conan 2.x, the method is now called _get_gnu_triplet, implying this is a private method. We can still call it but since it appears to be private we worry it can be moved/removed at any point, breaking our recipes. Was there a reason to limit use of it?

Have you read the CONTRIBUTING guide?

memsharded commented 1 year ago

Hi @jens-totemic

Yes, its use case in recipes was not very clear, so at the moment is private and not recommended for usage. We typically measure the usage on conan-center-index repo, and at the moment it is only in 2 recipes that haven't been ported yet to Conan 2.0, so those might be legacy.

We are willing to learn about potential use cases, so if you can elaborate a bit more why do you want to use it and how do you want to use it, that would be useful.

jens-ghc commented 1 year ago

We are dealing with a number of 3rd party binary dependencies for different platforms that have internal directory structures which contain the gnu triplets. We are exposing these dependencies with Conan. Handling them during the packaging process requires us to "generate" the proper gnu triplets and then use them during further directory manipulation and also to set proper package_info settings.

samuel-emrys commented 1 year ago

This would be useful for the gcc recipe as well (https://github.com/conan-io/conan-center-index/pull/15128), noting that the proposed functionality that would require this function is still in limbo. There's more related discussion in https://github.com/conan-io/conan/issues/12789