Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] Is it safe to use "build_mode" recipe attribute? #17980

Open
1 task done
vdavitiani opened this issue Mar 18, 2025 · 4 comments · May be fixed by conan-io/docs#4025
Open
1 task done

[question] Is it safe to use "build_mode" recipe attribute? #17980

vdavitiani opened this issue Mar 18, 2025 · 4 comments · May be fixed by conan-io/docs#4025
Assignees

Comments

@vdavitiani
Copy link

vdavitiani commented Mar 18, 2025

What is your question?

We have a SDK package that can bring incompatibilities in built binaries especially during major version update. For this reason I wanted to introduce package_id_mode="semver_mode" for this package only (modifying global.conf affects every package).

But the problem was that this SDK package is included not in each consumer package directly (we have more than 100) but through [tool_requires] section of a specific profile where I can't specify package_id_mode.

From the conan2 code I found that there is undocumented build_mode attribute though other similar attributes are documented - https://docs.conan.io/2/reference/conanfile/attributes.html#reference-conanfile-attributes-package-id-modes. The attribute perfectly suits my needs, I intend to use it but I want to be sure that this is safe and will not change in future and probably documentation is just missing for it. Is it correct assumption?

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@memsharded memsharded self-assigned this Mar 18, 2025
@memsharded
Copy link
Member

Hi @vdavitiani

Thanks for your question.

Yes, it is relatively safe to use it, it won't be removed. I thought that it had been recently documented, but I'll double check, and if it gets documented, it might be labeled as "experimental" or "preview". But it will be documented and allowed to be used, it is not an internal implementation detail.

@memsharded memsharded linked a pull request Mar 18, 2025 that will close this issue
@memsharded
Copy link
Member

PR open to close this ticket in conan-io/docs#4025, for next 2.15

@vdavitiani
Copy link
Author

Hi @memsharded. Thanks for reply and for quick PR! This is exactly what we needed

@memsharded
Copy link
Member

Happy to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants