-
Notifications
You must be signed in to change notification settings - Fork 982
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
[feature] Default profile/settings/options/binary configuration in .conanrc #17308
Comments
Hi @aander80 Thanks for the feedback.
There are other ways for this. If you manage your configuration with For things like defining a default profile for a workspace, we have already started to consider this, yes, but not as part of the |
This is not something I knew, thank you for pointing it out, I will have a look at this and come back to you when I have managed to test it out!
This is a very real problem, but hopefully |
Sounds good. It is a pity, we wanted to do a blog post for the |
I have had some time to test
What are your opinions on this? |
Happy to hear that!
Indeed, this could be a good addition, lets give it a try
This can also be interesting, yes. We have been holding these kind of improvements so far, we would like to get first a larger user base of this feature and more extended feedback in production, to be able to get right those new functionalities. And you introduce these in your next paragraphs, like This is exactly the kind of thing that often is about user expectations and UX, not easy to get this right without enough feedback. I am going to assign this to next-next (2.11) release, to try to consider some of these ideas. Thanks for the feedback! |
What is your suggestion?
Hello!
I am trying to figure out a good way to manage profiles over time. Let's assume you have multiple projects that is continuously developed over 2, 3, 5 years or more. During that time the binary configuration such as compiler version might change. To trace these changes and to be able to easily go back to old releases and make bugfixes, it would greatly simplify if the intended profile/settings+options to build with were committed to those projects' repositories and be automatically picked up by conan.
The most simple example I can think of right now is to have clang configured as compiler, but the clang version is incremented over time. If I check out a commit for a year ago, I will probably not know which version of clang was used for this release, but I want to use the same version. In my opinion, this should be committed to the repositories together with the source code since they are heavily tied together; at least it should be possible to source control this configuration.
My suggestion so far is to put this in
.conanrc
, but there could potentially be more suitable alternatives? I realize this could be used with.conanrc
and using aconan_home
configuration where you have defined default profiles, but I imagine it would be very tedious to have an isolated conan cache per repository so that you cannot share packages between repositories. Moreover, we might have some library which is used in multiple applications which are using different compiler versions, so if we were to use a "master".conanrc
file it would need to contain multiple profiles and configurations anyway and be synchronized, and at that point I guess we are back to my original problem that I most likely want this configured for each repository.I have looked a bit at config.toml in Cargo. I am thinking that this could be a useful file to shamelessly steal from into Conan. In my specific question regarding profiles, you could define profiles here (similar to targets in
config.toml
) and simply build your library for-pr appa
orpr appb
.I expect that this could also be used for workspaces (#15992). However, I expect that in my case we are likely to have one conan package per repository, so a workspace configuration/
conan.rc
will need to encompass multiple projectsindividual files. Perhaps this could be aggregated in a workspace, and allow the workspace to select which configuration to use (e.g. only
appb`)?Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: