New deps output format #366
Replies: 4 comments 2 replies
-
Okay for me. It could be even better to give packages that occur multiple times a special mark (
|
Beta Was this translation helpful? Give feedback.
-
Notice also that
We could also maybe print such dependencies in red or highlight them some other way |
Beta Was this translation helpful? Give feedback.
-
Opened a PR where I am working on this: #376 |
Beta Was this translation helpful? Give feedback.
-
This has been implemented. |
Beta Was this translation helpful? Give feedback.
-
Currently, when printing package dependencies, they get printed all at once, in a non-obvious order and it is not possible to tell what is a direct or indirect dependency. For example, the output for
openupm deps com.unity.xr.interaction.toolkit
isIt is not obvious here what is a dependency of what, just that
com.unity.xr.interaction.toolkit
depends on all of these in some way.I propose that we adopt a similar output pattern to the npm package
npm-remote-ls
. This package prints the full dependency tree. Here is a small example:My worry with this approach was that as the tree gets deeper we might run out of horizontal space in the terminal, as more and more indent gets added. This does not seem to be a problem though. Even a very large tree does not take that much space and upm package dependencies are usually not that deep anyway.
Large dependency tree
A point to discuss is how to handle packages which occur multiple times in the tree. Print them every time? Print them only once?
npm-remote-ls
went with the second approach, as can be seen in the above output. Multiple packages depend onglob@7.2.3
but it's dependency tree is only printed once. I would also suggest the same for openupm.What are the thoughts on this.
Beta Was this translation helpful? Give feedback.
All reactions