Skip to content
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

Provide a vcpkg argument to list the dependency tree of a package #17678

Closed
Firefly35 opened this issue May 5, 2021 · 10 comments · Fixed by microsoft/vcpkg-tool#74
Closed

Provide a vcpkg argument to list the dependency tree of a package #17678

Firefly35 opened this issue May 5, 2021 · 10 comments · Fixed by microsoft/vcpkg-tool#74
Assignees
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed requires:tool-release An issue that has been fixed in the microsoft/vcpkg-tool repo and is waiting for a release thereof

Comments

@Firefly35
Copy link

It would be useful to be able to get the full dependency tree for a package, in either a "flat" string list (such as brew does with brew deps [package_name]) or a "tree" view (such as brew does with brew deps --tree [package_name]).

@dg0yt
Copy link
Contributor

dg0yt commented May 5, 2021

Did you try vcpkg depend-info?
It even has a --dot option.

@JackBoosY JackBoosY self-assigned this May 5, 2021
@JackBoosY JackBoosY added the category:question This issue is a question label May 5, 2021
@JackBoosY
Copy link
Contributor

Please use ./vcpkg depend-info ${PORT_NAME} to show its dependency tree.

@Firefly35
Copy link
Author

Thanks a lot, I don't know why I didn't figure it out while using the help.

@Firefly35 Firefly35 reopened this May 5, 2021
@Firefly35
Copy link
Author

The depend-info shows either forward or backward dependencies. I expected the command to provide only dependencies the ${PORT_NAME} relies on (for instance, vcpkg depend-info grpc shoud list protobuf, abseil and so on, but not the ports that depend on grpc). I need a command to get the ${PORT_NAME} dependencies list, not the list of the ports depending on ${PORT_NAME}

@dg0yt
Copy link
Contributor

dg0yt commented May 5, 2021

for instance, vcpkg depend-info grpc shoud list protobuf, abseil and so on, but not the ports that depend on grpc

I don't see a single port which depends on grpc:

$ ./vcpkg depend-info grpc
abseil: 
c-ares: 
openssl: 
protobuf: 
re2: 
upb: 
zlib: 
grpc: abseil, c-ares, openssl, protobuf, re2, upb, zlib

@JackBoosY JackBoosY added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label May 6, 2021
@Firefly35
Copy link
Author

Firefly35 commented May 6, 2021

I used the grpc port as an example of the feature I expect. I could have used boost-detail for instance.
"depend-info" on boost-detail provides the dependencies in reverse order, with each sub-dependencies having its own dependency line and with some dependencies appearing twice or more (see boost-vcpkg-helpers below) :

./vcpkg depend-info boost-detail
boost-uninstall: 
boost-vcpkg-helpers: boost-uninstall
boost-compatibility: boost-vcpkg-helpers
boost-config: boost-compatibility, boost-vcpkg-helpers
boost-preprocessor: boost-vcpkg-helpers
boost-detail: boost-compatibility, boost-config, boost-preprocessor, boost-vcpkg-helpers

I expect to have the full flat dependency list with each dependency appearing only once for the package i.e. (an argument -flat to depend-info should be a good option) :

$ ./vcpkg depend-info -flat boost-detail
boost-compatibility, boost-config, boost-preprocessor, boost-vcpkg-helpers, boost-uninstall

A --tree argument could also output a text tree, such as the brew deps --tree does 👍🏻

brew deps --tree grpc
grpc
├── abseil
├── c-ares
├── [email protected]
├── protobuf
└── re2

@dg0yt
Copy link
Contributor

dg0yt commented May 6, 2021

Not a -flat option, but:

$ ./vcpkg depend-info --max-recurse=0 boost-detail
boost-detail: boost-compatibility, boost-config, boost-preprocessor, boost-vcpkg-helpers

(Missing recursion)

@dg0yt

This comment has been minimized.

@dg0yt
Copy link
Contributor

dg0yt commented May 6, 2021

$./vcpkg install --dry-run boost-detail
...
(Missing installed packages)

Or rather:

$ ./vcpkg install --dry-run --x-install-root=/tmp/empty boost-detail
Computing installation plan...
The following packages will be built and installed:
  * boost-compatibility[core]:x64-mingw-dynamic -> 1.75.0
  * boost-config[core]:x64-mingw-dynamic -> 1.75.0
    boost-detail[core]:x64-mingw-dynamic -> 1.75.0
  * boost-preprocessor[core]:x64-mingw-dynamic -> 1.75.0
  * boost-uninstall[core]:x64-mingw-dynamic -> 1.75.0
  * boost-vcpkg-helpers[core]:x64-mingw-dynamic -> 7#2
Additional packages (*) will be modified to complete this operation.

(including features, triplets and versions)

@JackBoosY JackBoosY removed the category:question This issue is a question label Aug 6, 2021
@JackBoosY JackBoosY reopened this Nov 15, 2021
@JackBoosY JackBoosY added the requires:tool-release An issue that has been fixed in the microsoft/vcpkg-tool repo and is waiting for a release thereof label Nov 15, 2021
@PhoebeHui
Copy link
Contributor

This issue should be fixed in latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed requires:tool-release An issue that has been fixed in the microsoft/vcpkg-tool repo and is waiting for a release thereof
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants