You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
'bob ls --all' does not show indirect dependencies #651
According to the documentation bob ls with option --all should "show indirect dependencies too". But it seems that bob ls --all shows the same results as bob ls, only direct dependencies.
Bob version: 0.25.1
Python version 3.13.3
AFAIKS in this code linepackage.items() only returns the direct dependencies. Therefore, child.direct is always True in the next code line, and self.showAll is useless.
I checked that with the recipe tree in bob/test/black-box/misc-ls instead and could not reproduce the problem there either.
It seems to be a special issue in my case, but it isn't related to #187.
Ok. Good.
I'd like to debug this problem. Could you give me some advice?
I think you could look first if there are more direct packages listed than expected. That would be a bug. If the package is listed explicitly in the depends section, it will always be a direct dependency, even if it is also provided as indirect dependency. On the other hand, if you miss certain indirect dependencies, check that these are correctly provided by provideDeps.
If you have a smoking gun, it would be nice if you could minimize it so that I can have a look.
I found the reason for my observation. The missing indirect dependencies are not shown because they are not provided upstream with the provideDeps keyword.
Is this intended behavior?
At least this is not obvious from the Bob documentation. Does bob ls --all always show indirect dependencies only if they are provided with the provideDeps keyword? The very brief documentation of the --all option only says "Show indirect dependencies too".
Right. I have to admit the naming is confusing. But fundamentally, this is working as intended.
The ls command shows all the packages that are available to a package at build time. To see all transitive dependencies, something like bob ls -d <package>//* will walk the whole dependency tree. The documentation is still from the early stages of the project and certainly needs some improvement.
I'm not yet sure how to name these things properly. We have the following things:
The dependencies of a recipe that are named in depends. -> shown by bob ls
The dependencies that a package sees at build time. This is comprised of the dependencies named in the recipe plus anything implicitly gained via provideDeps. This latter requires that deps is part of use, which is the default. -> shown by bob ls -a.
Transitive dependencies that are not available to the package build script because they have not been passed back via provideDeps.
Dependencies to tools and the sandbox. They are inherited from recipes that are above in the dependency tree. Those are currently invisible in bob ls.
The naming seems to be largely incoherent throughout the documentation. Currently, I can think of the following terms:
direct dependency - like now, the stuff that is in the recipe depends section
indirect dependency - dependencies of a package that were gained from its provideDeps
transitive dependency - the stuff that is reachable by recursively traversing the depends section
ambient dependency - The tools and sandbox that were inherited from recipes that are above in the dependency tree.
I thought about using "provided dependency" but it is unclear what this means. Is it what is named in provideDeps or is it what a package gathered from its direct dependencies by their provideDeps? But I'm still not convinced by "indirect dependency" either. Any suggestion is welcome.
I had a look on PR #718 and it looks mostly fine to me. Introducing the section Dependency terminology (configuration-principle-dependencies) is very helpful. The selected terms declared, provided, injected, transitive and ambient sound meaningful.
Only the term immediate dependencies is not that expressive. Perhaps build dependencies fits better, since these are the dependencies passed to the build script (BOB_DEP_PATHS). Alternatively, an additional term may not be necessary. The combination declared or injected may be sufficient.
Activity
jkloetzke commentedon Jun 4, 2025
Hmm, I cannot reproduce. For example, if I use the basement project:
Looking at the diff it shows the expected transitive
-tgtpackages that are provided transitive dependencies:There is also #187 which talks about tools that are indeed not shown with
--all. Is it that what you're missing by any chance?gruberchr commentedon Jun 5, 2025
What is the basement project?
I checked that with the recipe tree in bob/test/black-box/misc-ls instead and could not reproduce the problem there either.
It seems to be a special issue in my case, but it isn't related to #187.
I'd like to debug this problem. Could you give me some advice?
jkloetzke commentedon Jun 5, 2025
The basement project can be found here: https://github.com/BobBuildTool/basement
I think you could look first if there are more direct packages listed than expected. That would be a bug. If the package is listed explicitly in the depends section, it will always be a direct dependency, even if it is also provided as indirect dependency. On the other hand, if you miss certain indirect dependencies, check that these are correctly provided by provideDeps.
If you have a smoking gun, it would be nice if you could minimize it so that I can have a look.
gruberchr commentedon Jun 18, 2025
I found the reason for my observation. The missing indirect dependencies are not shown because they are not provided upstream with the
provideDepskeyword.Is this intended behavior?
At least this is not obvious from the Bob documentation. Does
bob ls --allalways show indirect dependencies only if they are provided with theprovideDepskeyword? The very brief documentation of the--alloption only says "Show indirect dependencies too".jkloetzke commentedon Jun 22, 2025
Right. I have to admit the naming is confusing. But fundamentally, this is working as intended.
The
lscommand shows all the packages that are available to a package at build time. To see all transitive dependencies, something likebob ls -d <package>//*will walk the whole dependency tree. The documentation is still from the early stages of the project and certainly needs some improvement.I'm not yet sure how to name these things properly. We have the following things:
depends. -> shown bybob lsprovideDeps. This latter requires thatdepsis part ofuse, which is the default. -> shown bybob ls -a.provideDeps.bob ls.The naming seems to be largely incoherent throughout the documentation. Currently, I can think of the following terms:
dependssectionprovideDepsdependssectionI thought about using "provided dependency" but it is unclear what this means. Is it what is named in
provideDepsor is it what a package gathered from its direct dependencies by theirprovideDeps? But I'm still not convinced by "indirect dependency" either. Any suggestion is welcome.jkloetzke commentedon Oct 6, 2026
So I've came up with the following terms:
I hope this clarifies the situation. IF you agree I'll merge #718 and close this issue.
gruberchr commentedon Oct 7, 2026
I had a look on PR #718 and it looks mostly fine to me. Introducing the section Dependency terminology (
configuration-principle-dependencies) is very helpful. The selected terms declared, provided, injected, transitive and ambient sound meaningful.Only the term immediate dependencies is not that expressive. Perhaps build dependencies fits better, since these are the dependencies passed to the build script (
BOB_DEP_PATHS). Alternatively, an additional term may not be necessary. The combination declared or injected may be sufficient.doc: unify dependency terminology
Fix dependency naming (#718)
jkloetzke commentedon Oct 8, 2026
Thanks. You're right. The "immediate dependencies" term was not used too much and I replaced it accordingly.
gruberchr commentedon Oct 9, 2026
AFAICS the term "immediate" is still used at two positions in the function descriptions:
Maybe this was not intended.
jkloetzke commentedon Oct 9, 2026
Thanks for the hint. Indeed, this was not intentional. Fixed in 93c141d.