Let's say I have some library "foo" and I have it listed as dependency of my project. For example in Python I have requirements file saying
foo==1.0
foo library needs "bar" library and it lists it as dependency. At one point I realize "bar" can be useful for my project too, and I have an idea of calling some function of "bar" directly. So I add
import bar
somewhere in my project code.
Should I now add bar library to my project dependencies? If I don't add it my build system will not complain about missing bar because bar is already required and installed by foo. What is recommended practice in case like this?