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-tool] Add an option to build a minimal feature set based on "default-features": false #31298

Open
Thomas1664 opened this issue May 6, 2023 · 11 comments
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

@Thomas1664
Copy link
Contributor

Thomas1664 commented May 6, 2023

Over the years, there was a lot of confusion because "default-features": false is ignored in transitive dependencies: #26664 (comment) . Many users expect vcpkg to build a minimal set of features instead which does not include default features that were disabled by a port between the manifest of a user and the port declaring the default feature.

In summary, we don't need to pull in disabled features if they aren't enabled by something else that didn't specify "default-features": false.

@BillyONeal suggested to add an option to avoid unwanted features and to enable this behaviour by default in manifest mode: #11602 (comment)

Many people have fallen into this trap and the current behaviour might actually lead to longer builds rather than avoiding rebuilds.

All related issues: #31290, #31230, #30695, #26664, #24548, #17033, #11602

@autoantwort
Copy link
Contributor

Would be solved by microsoft/vcpkg-tool#538

@dg0yt
Copy link
Contributor

dg0yt commented May 7, 2023

Can you change the issue title to not say "ignore"? It is not ignored (as you have been told). It just means three different things.

@Thomas1664
Copy link
Contributor Author

Can you change the issue title to not say "ignore"? It is not ignored (as you have been told). It just means three different things.

I think "ignore" sufficient because it describes the observed effect. Do you have a better word in mind?

@dg0yt
Copy link
Contributor

dg0yt commented May 8, 2023

It has the effect it is designed to have. So I observe that it is not ignored

As I said, IMO the problem is that default-features has three different "overloads", two of them having even the same "signature":

  • as a feature list in port manifest. (A)
  • true/false in dependencies in a port manifest. (B)
  • true/false in dependencies in a user manifest. (C)

You expect the C behavior for B.

Apart from this it is a clear situation:

  • Only the author of an independent port decides about the default set of features to install if no more precise spec is given. (A)
  • Only the user (manifest) decides whether to not use the default set of features. (C)
  • For any port in the middle, authors must decide if they conveniently rely on default features (and reduce user choice) or if they fully specify the set of feature dependencies. (B)

@FrankXie05 FrankXie05 added the category:question This issue is a question label May 8, 2023
@Thomas1664
Copy link
Contributor Author

@dg0yt Can you suggest a better title?

@FrankXie05 This is not a question. My request is to implement the PR tagged by @autoantwort: microsoft/vcpkg-tool#538

@Thomas1664 Thomas1664 changed the title [vcpkg-tool] Add an option to not ignore "default-features": false [vcpkg-tool] Add an option to build a minimal feature set based on "default-features": false May 8, 2023
@FrankXie05 FrankXie05 added category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly and removed category:question This issue is a question labels May 8, 2023
@dg0yt
Copy link
Contributor

dg0yt commented May 8, 2023

I guess the best fit is:
"Add an option to install with minimum dependencies"

(I wouldn't use "minimum features" because vcpkg install gdal continues to mean installation of the default features of port gdal. You only want to trim the tree of dependencies.)

@JackBoosY
Copy link
Contributor

Should be vcpkg feature.

@FrankXie05 FrankXie05 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:tool-update The issue is with build tool or build script, which requires update or should be executed correctly labels Aug 8, 2023
Copy link

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.

@github-actions github-actions bot added the Stale label Mar 24, 2024
@Thomas1664
Copy link
Contributor Author

no stale

@github-actions github-actions bot removed the Stale label Mar 25, 2024
Copy link

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.

@github-actions github-actions bot added the Stale label Sep 21, 2024
@Thomas1664
Copy link
Contributor Author

no stale

@github-actions github-actions bot removed the Stale label Sep 22, 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

No branches or pull requests

5 participants