If you were using a 0.X conan version, there are some things to consider while upgrading. They are reflected in the :ref:`changelog<changelog>`., but this section summarizes the most important changes here:
There has been a few things that will break existing usage (compared to 0.30). Most of them are in command line arguments, so they are relatively easy to fix. The most important one is that now most commands require the path to the conanfile folder or file, instead of using --path
and --file
arguments. Specifically, $ conan install
, $ conan export
and $ conan create
will be the ones most affected:
# instead of --path=myfolder --file=myconanfile.py, now you can do:
$ conan install . # Note the "." is now compulsory
$ conan install folder/myconanfile.txt
$ conan install ../myconanfile.py
$ conan info .
$ conan create . user/channel
$ conan create . Pkg/0.1@user/channel
$ conan create mypkgconanfile.py Pkg/0.1@user/channel
$ conan export . user/channel
$ conan export . Pkg/0.1@user/channel
$ conan export myfolder/myconanfile.py Pkg/0.1@user/channel
This behavior aligns with the conan source
, conan build
, conan package
commands, that all use the same arguments to locate the “conanfile.py” containing the logic to be run.
Now all commands read: command <origin-conanfile> …
Also, all arguments to command line now use dash instead of underscore:
$ conan build .. --source-folder=../src # not --source_folder
- scopes were completely removed in conan 0.30.X
self.conanfile_directory
has been removed. Useself.source_folder
,self.build_folder
, etc. insteadself.cpp_info
,self.env_info
andself.user_info
scope has been reduced to only thepackage_info()
methodgcc
andConfigureEnvironment
were already removed in conan 0.30.1werror
doesn't exist anymore. Now it is the builtin behavior.- Command
test_package
has been removed. Use$ conan create
and$ conan test
instead. CMake
helper only allows now (from conan 0.29). theCMake(self)
syntax$ conan package_files
command was replaced in conan 0.28 by$ conan export-pkg
command.
- Cross-compilation support with new default settings in settings.yml:
os_build
,arch_build
,os_target
,arch_target
. They are automatically removed from thepackage_id
computation, or kept if they are the only ones defined (as it happens usually with dev-tools packages). It is possible to keep them too with theself.info.include_build_settings()
method (call it in yourpackage_id()
method).
Important
Please don't use cross-build settings os_build
, arch_build
for standard packages and libraries.
They are only useful for packages that are used via build_requires
, like cmake_installer
or mingw_installer
.
- Model and utilities for Windows subsystems
os:
Windows:
subsystem: [None, cygwin, msys, msys2, wsl]
This subsetting can be used by build helpers as CMake
, to act accordingly.