microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23k stars 6.35k forks source link

Regression: vcpkg does not add default features when a dependency is already installed #36781

Open dg0yt opened 8 months ago

dg0yt commented 8 months ago

Port pango depends (by manifest) on the default features of harfbuzz, including harfbuzz[freetype].

$ vcpkg remove --recurse harfbuzz pango
The following packages are not installed:
    harfbuzz:x64-linux
    pango:x64-linux
$ vcpkg install --dry-run pango
Computing installation plan...
The following packages will be built and installed:
  * harfbuzz[core,freetype]:x64-linux -> 8.3.0#3
    pango:x64-linux -> 1.50.14#4
Additional packages (*) will be modified to complete this operation.
$ vcpkg install --dry-run pango harfbuzz[core]
Computing installation plan...
The following packages will be built and installed:
    harfbuzz[core,freetype]:x64-linux -> 8.3.0#3
    pango:x64-linux -> 1.50.14#4

Actual behavior

When harfbuzz[core] is already installed, harfbuzz[freetype] is not added to the installed set:

$ vcpkg remove --recurse harfbuzz pango
The following packages are not installed:
    harfbuzz:x64-linux
    pango:x64-linux
$ vcpkg install harfbuzz[core] >/dev/null 2>&1
$ vcpkg install --dry-run pango
Computing installation plan...
The following packages will be built and installed:
    pango:x64-linux -> 1.50.14#4
$ vcpkg install --dry-run pango harfbuzz[core]
Computing installation plan...
The following packages are already installed:
    harfbuzz:x64-linux -> 8.3.0#3
The following packages will be built and installed:
    pango:x64-linux -> 1.50.14#4

If not a dry run, this leads to a build error because pango needs hb_ft.h.

Similar, no change when only requesting harfbuzz without specifying [core]:

$ vcpkg remove --recurse harfbuzz pango
The following packages are not installed:
    harfbuzz:x64-linux
    pango:x64-linux
$ vcpkg install harfbuzz[core] >/dev/null 2>&1
$ vcpkg install --dry-run harfbuzz
Computing installation plan...
The following packages are already installed:
    harfbuzz:x64-linux -> 8.3.0#3

Expected behavior

After installing harfbuzz[core]:

FrankXie05 commented 7 months ago

@BillyONeal @vicroms

github-actions[bot] commented 1 month ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.