-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedNeed some help to be finishNeed some help to be finish
Description
now we have V2 migration linter (#11147), it's time to think about useful checks to add.
we definetely don't want to add too broad checks like replace "import conans" via "import conan"
, as it basically means "rewrite the whole recipe".
I personally guess we should start from small things, which are easy to check and fix.
a good candidates where should we start could be:
- V2 migration guide - it lists some useful things, but definetely, it still lacks a lot of things.
- learn from our own expirience. e.g. fmt migration highlights some major things to be done
from what I can currently recommend, we may try to implement the following pieces first:
- easy imports (existing in both v1 and v2), like
from conan.errors import ConanInvalidConfiguration
,from conan import ConanFile
, with higher granularty - replace
run_environment=True
viaenv="conanrun"
(VirtualRunEnv
generator) - use
self.info
inpackage_id
method instead of justself
- use
conan.tools
instead ofconan.tools
, with higher granularity - code changes are mostly to add firstself
argument, but they are in different namespaces now - replace
build_requires
viatool_requires
- enforce explicit
test_type
anything else?
uilianries, jgsogo and leha-botuilianries and jgsogojgsogo and danimtb
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedNeed some help to be finishNeed some help to be finish