Warn for overrides that are not having any effect#17822
Warn for overrides that are not having any effect#17822AbrilRBS wants to merge 2 commits intoconan-io:develop2from
Conversation
memsharded
left a comment
There was a problem hiding this comment.
As the broken tests reflect, this change is more risky than it appears.
It would be ok if something could be done just by inspecting the results, but no functional changes.
f68ce8a to
fe059bb
Compare
|
Please re-recheck if this approach would be better |
memsharded
left a comment
There was a problem hiding this comment.
Yes, this approach looks better and safer.
And it should return any false positives, I think?
Everything I come up with is, maybe there's an optional dependency of your dependencies that your current configuration does not trigger, but that you want to override its version in the configurations that do pull it in? That's a valid use-case, and the more I think about it, the more I think then this should not warn there, and as there's no way to detect that false-positive, we might want to withdraw this PR. Let me know what you think @memsharded |
I really appreciate the value of warning about useless overrides, but yes, even if not frequent, such false positives could be a problem, so probably not worth the extra complexity and false positive risks. |
Changelog: Feature: Warn for overrides that are not having any effect
Docs: Omit
This warns when you have an override that has no affect upstream. This would lead to unexpeceted issues:
force=True, there's now a missing direct requirement and trying to build will most likely result in a missing dependency in your build systemoverride, what's the use-case here? An optional dependency of your dependencies that your current configuration does not trigger?Added to 2.22, but might not be moved forward if we are not comfortable with the possible false positives