There are several things that might require reviewing in conan 2.0:
-s *:build_type=Release -s build_type=Debug.self.settings["MyDep"].build_typeconfig= for empty stringI think it would be good to have some method to check the current version of Conan being used so that during the transition it would be possible to write recipes that are both compatible with 1.x and 2.0.
Also, it would be nice to specify in the recipe the minimum required version of Conan, something like cmake_minimum_required( VERSION ) within CMake. Thus, it would be possible to restrict some recipes to only Conan 1.7+ or Conan 2.0+.
I am not sure if this is the main thread tracking all wishes for Conan v2.0, but if it is, I would also like to add Issue #3573.
I think I might need conditional setting of default options for my requirements: conan-community/community#168
@Lawrencemm, you can do that even in conan v1.x (see #3519):
consider this package:
class SomethingConan(ConanFile):
...
options = { use_some_feature: [True, False] }
def config_options(self):
if self.options.use_some_feature == None: # i.e. not specified on the command line
if self.settings.os == 'Android':
self.options.use_some_feature = True
else:
self.options.use_some_feature = False
It works with all kind of options (string options, enum options, boolean options). I use that pattern in my projects all over the place.
Just note that you must compare with == None and not with is None as some linters suggest. Checking with is will not work, as the option actually exists in the dictionary, but is not set yet (it's current value is None).
Also adding #4038 to the wishlist for Conan v2.0 (although I argue it should be possible to implement that feature even in v1.x, without breaking, as I described in the issue description).
@memsharded I would like you to put in common these topics. This sounds like something we could start doing before 2.0 (if we consider it).
Most helpful comment
I think it would be good to have some method to check the current version of Conan being used so that during the transition it would be possible to write recipes that are both compatible with 1.x and 2.0.
Also, it would be nice to specify in the recipe the minimum required version of Conan, something like
cmake_minimum_required( VERSION )within CMake. Thus, it would be possible to restrict some recipes to only Conan 1.7+ or Conan 2.0+.