How to generate/modify the default profile?
See original GitHub issueBefore version 0.25 the conan.conf file contained the default settings of conan. conan.conf was generated on the very first call to conan. So simply calling conan would generate the default settings.
In version 0.25/0.25.1 the default settings from conan.conf have been removed. The idea is to have different profiles under ~/.conan/profiles/ and use them according to the build environment/settings. I think this covers the major points.
The problem is that the default profile, ~/.conan/profiles/default is not generated unless I call conan install. On the other hand calling conan install without any arguments or paths to a recipe will fail and returns a non zero error code.
- I would like to know why the default profile is not generated during the very first call to
conan? - Is there a way to generate the default profile without getting a non zero error code from conan? During building of our docker/vagrant images I am failing the build process if any of the commands fail. This is causing all of docker/vagrant build pipelines to fail.
I used to create pseudo “profiles” before each build by calling conan config set arch/build_type/.... I assume since you have moved to profiles you don’t use the settings in conan.conf file any more.
- Is there a way to create a profile with a similar command? I know the profiles are simple text files but I prefer to create the profiles using a conan command rather than creating a text file under the profiles folder. Something like
conan profile create custom_profile -s arch=x86 -s build_type=Debugand any unspecified option is inherited from the default profile.
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (10 by maintainers)
Top Related StackOverflow Question
As the option is not mentionned here:
conan profile new foo --detectwill create a filled profile namedfoo.Sorry for breaking this. When we moved the [settings_defaults] to a default profile, we did the migration to not break, but we didn’t consider the usage of
conan configto set the default profile, because we mostly use it toconfigconan config variables, but not the [settings_defaults], cause the most recommended approach was already to use profiles.So if you were using
conan configto do it, it won’t be possible directly with conan 0.25.How are you calling
conan? Shell scripts? CI scripts? Don’t you have some way to capture the error code? Currently there is no way thatconan installwill not fail without a conanfile. You might install some existing package, withconan install Pkg/version@user/channelbut that would be slower and unnecessary.I think the best workaround at the moment would be running something like:
We will be adding the equivalent to
conan configfor profiles asap (0.26). We have to think about the UX, I am not sure that the default behavior taking unspecified options from the default would be the easiest to understand, as there should be an option to create totally new profiles, independent of the default. Maybe another different subcommand. I will post here any progress. Thanks very much for reporting this issue.