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
Add 'CONAN_V2_MODE' to start testing Conan v2 deprecated features #6490
Conversation
@memsharded, wdyt about this approach? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, keep going!
I think this is enough for the first iteration. Docs are pending: probably we need a dedicated section in the docs to explain the roadmap to v2 and this environment variable, deprecated features, new defaults,... agree? |
Co-Authored-By: Carlos Zoido <mrgalleta@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. the only thing is maybe the name conan_v2_behavior
is not that descriptive and too generic. maybe something like check_v2_compatibility
would be the better naming?
I'll keep the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, great job. A couple of things:
- The
test_proper_usage
tests reads as highly redundant - Always skipped tests, better to keep them for later
- The
conan_v2_property
should be no-op without CONAN_V2_MODE env-var, I see that you want to print warnings for v1, but it has a risk that it is not worth it.
A comment about the two last points:
|
Ok, agree.
The thing is that users will certainly not read those warnings, and they will not take action to remove those warnings. It is a nice to have, but I think the real effect on awareness will be very little. The risk here is users doing unusual things with python, like adding class members inside methods, or weird things over the attribute itself. I really think there is a non small risk of breaking, and given that we are starting to plan for Conan 2.0, these nice to have, informational warnings are not worth. |
Waiting for the CI, but I'll start with the docs |
Changelog: Feature: Add environment variable 'CONAN_V2_MODE' to enable Conan v2 behavior.
Docs: conan-io/docs#1578
If the environment variable
CONAN_V2_MODE
is defined, Conan will work as Conan v2 (still to provide a roadmap/deprecation summary in a public webpage).This PR takes care of this breaking changes:
settings.yml
:cppstd
is removedconan.conf
:revisions_enabled=1
(we need to write it into the file until [feature] 'conan config get' should return the default value even if it is not initialized #6537)scm_to_conandata
activated by defaultlibstdc++11
self.cpp_info
inconanfile::package_id()
conanfile::config()
python_requires
syntax (error raises if it is used, not only if it is imported)self.info
inconanfile::package()
default_options
required to be a dictionary typescopes
in profilecppstd
in recipeself.settings
andself.options
inconanfile::source()
methodtools.msvc_build_command
tools.build_sln_command
cpp_info.cppflags
CONAN_USERNAME
andCONAN_CHANNEL
It adds several tests to check that the previous errors are actually being raised.
The idea is to inherit these tests from
ConanV2ModeTestCase
class which is setting the proper variable in the environment. Also, tools likeTestClient
will be created by this class (for these tests) to ensure that the defaults for v2 are being set.#REVISIONS: 1