Skip to content
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 config variable 'general.error_on_override' (CONAN_ERROR_ON_OVERRIDE) #4771

Merged
merged 5 commits into from
Mar 25, 2019

Conversation

jgsogo
Copy link
Contributor

@jgsogo jgsogo commented Mar 19, 2019

Changelog: Feature: Add config variable general.error_on_override and environment variable CONAN_ERROR_ON_OVERRIDE (defaulting to False) to configure if an overridden requirement should raise an error when overridden from downstream consumers.
Docs: conan-io/docs#1128

closes #4473
closes #2800

If a consumer wants to depend on a package (self.requires("package")) and declare ALSO that it is overriding a dependency (self.requires("package", override=True)) to avoid the error on override exception (implemented here), Conan will raise a Duplicated requirement error. That use case is not handled in this PR. <- Issue opened: #4779

@ghost ghost assigned jgsogo Mar 19, 2019
@ghost ghost added the stage: review label Mar 19, 2019
conans/model/requires.py Outdated Show resolved Hide resolved
@jgsogo jgsogo added this to the 1.14 milestone Mar 19, 2019
@jgsogo jgsogo changed the title Add config variable 'general.raise_on_override' (CONAN_RAISE_ON_OVERR… Add config variable 'general.raise_on_override' (CONAN_RAISE_ON_OVERRIDE) Mar 19, 2019
@jgsogo jgsogo changed the title Add config variable 'general.raise_on_override' (CONAN_RAISE_ON_OVERRIDE) Add config variable 'general.error_on_override' (CONAN_ERROR_ON_OVERRIDE) Mar 20, 2019
@jgsogo jgsogo marked this pull request as ready for review March 20, 2019 09:46
@jgsogo jgsogo requested a review from danimtb March 20, 2019 09:46
conans/model/requires.py Outdated Show resolved Hide resolved
@ghost ghost assigned jgsogo Mar 25, 2019
@jgsogo jgsogo merged commit ee1fcdf into conan-io:develop Mar 25, 2019
@ghost ghost removed the stage: review label Mar 25, 2019
@jgsogo jgsogo deleted the issue/4473-override-fail branch March 25, 2019 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent overriding dependency versions Downstream version override caused problems
3 participants