-
Notifications
You must be signed in to change notification settings - Fork 991
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
Explore improved error message for missing component requirements #17319
base: develop2
Are you sure you want to change the base?
Explore improved error message for missing component requirements #17319
Conversation
# Then split the names | ||
ret = [r.split("::") if "::" in r else (None, r) for r in ret] | ||
ret = [(*r[0].split("::"), r[1]) if "::" in r[0] else (None, *r) for r in ret] |
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.
This is the main change - required_components
now returns a 3-tuple. This is a draft because as far as I can see, this might be breaking behaviour as this function is public, so not too sure on the best approach.
Also note that as far as I can tell, the unpacking operator *
was implemented in Python 3.5 so we're good to use it
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.
Public, but not documented apparently.
Still, it reads a bit risky, yes, not fully sure if worth the risk. Maybe a different approach like re-computing things when the check fails for better error messages (making it exclusively local to the error handling)?
# Then split the names | ||
ret = [r.split("::") if "::" in r else (None, r) for r in ret] | ||
ret = [(*r[0].split("::"), r[1]) if "::" in r[0] else (None, *r) for r in ret] |
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.
Public, but not documented apparently.
Still, it reads a bit risky, yes, not fully sure if worth the risk. Maybe a different approach like re-computing things when the check fails for better error messages (making it exclusively local to the error handling)?
Changelog: (Feature | Fix | Bugfix): Describe here your pull request
Docs: https://github.com/conan-io/docs/pull/XXXX
The idea is to have the faulty component be reported too, for cases where finding it is a bit hard, see #17312 for example.