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

vcpkg depend-info always uses default-features even default-features: false #36604

Closed
recsater opened this issue Feb 6, 2024 · 3 comments · Fixed by microsoft/vcpkg-tool#1370
Assignees
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Comments

@recsater
Copy link
Contributor

recsater commented Feb 6, 2024

curl vcpkg.json

{
  "name": "curl",
  "version": "8.5.0",
  "port-version": 1,
  "description": "A library for transferring data with URLs",
  "homepage": "https://curl.se/",
  "license": "curl AND ISC AND BSD-3-Clause",
  "dependencies": [
    {
      "name": "vcpkg-cmake",
      "host": true
    },
    {
      "name": "vcpkg-cmake-config",
      "host": true
    },
    "zlib"
  ],
  "default-features": [
    "non-http",
    "ssl"
  ],
  "features": {
    "brotli": {
      "description": "brotli support (brotli)",
      "dependencies": [
        "brotli"
      ]
    },
    "c-ares": {
      "description": "c-ares support",
      "dependencies": [
        "c-ares"
      ]
    },
#......

custom port(default-features: false)

{
  "name": "multiport",
  "version": "0.0.1",
  "port-version": 0,
  "description": "Helper port.",
  "dependencies": [
    {
      "name": "curl",
      "features": [],
      "default-features": false
    }
  ]
}

vcpkg depend-info multiport result
image

So, even if the default-features is set to false on ports that have default-features, depend-info always outputs results that include default-features for those ports.

image

@dg0yt
Copy link
Contributor

dg0yt commented Feb 6, 2024

Default features cannot be disabled by a PORT manifest - i.e. by maintainers.
They can be disabled by command line (classic mode) or APP manifest (manifest mode) - i.e. by users.
Related: #35694 and others.

But depend-info cannot handle multiple args. Alternative:

vcpkg install --dry-run multiport curl[core]

(Instead of multiport, this can be tested with curlpp.)

@JonLiu1993 JonLiu1993 added the category:question This issue is a question label Feb 6, 2024
@JonLiu1993
Copy link
Member

We hope your question was answered to your satisfaction; if it wasn't, you can reopen with more info.

@dg0yt
Copy link
Contributor

dg0yt commented Feb 22, 2024

We hope your question was answered to your satisfaction; if it wasn't, you can reopen with more info.

It would be more satisfying if depend-info could handle multiple arguments, just as install does.

@JonLiu1993 JonLiu1993 reopened this Feb 23, 2024
@JonLiu1993 JonLiu1993 added category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed and removed category:question This issue is a question labels Feb 23, 2024
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants