-
Notifications
You must be signed in to change notification settings - Fork 74
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
Clarify baseline versioning #427
base: main
Are you sure you want to change the base?
Conversation
@Filoppi : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
Learn Build status updates of commit 0b98d94: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rewrote the paragraph a bit further. Do you think that this makes it even clearer?
@@ -112,7 +112,7 @@ Examples: | |||
|
|||
### Baselines | |||
|
|||
Baselines define a global version floor for what versions will be considered. This enables top-level manifests to keep the entire graph of dependencies up-to-date without needing to individually specify direct [`"version>="`](#version-gte) constraints. | |||
Baselines define a global version floor for what versions will be considered (unless specified elsewhere, the version associated with that baseline will be used). This enables top-level manifests to keep the entire graph of dependencies up-to-date without needing to individually specify direct [`"version>="`](#version-gte) constraints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Baselines define a global version floor for what versions will be considered (unless specified elsewhere, the version associated with that baseline will be used). This enables top-level manifests to keep the entire graph of dependencies up-to-date without needing to individually specify direct [`"version>="`](#version-gte) constraints. | |
Baselines define a global version floor for every [port](../concepts/ports.md) in a [registry](../concepts/registries.md). In other words, ports have an implied `version>=` constraint on the version associated to the baseline; and unless a constraint is specified elsewhere, the version in the baseline gets installed. This enables top-level manifests to keep the entire graph of dependencies up to date without needing to specify [`"version>="`](#version-gte) constraints for each dependency. |
@vicroms as a newcomer to vcpkg, unfortunately I don't think that is clearer. My only interests was version locking the packages, and I wanted to understand how to do it, and I found the documentation to be too technical on that stuff when it should be readable by anybody. I don't know what a "port" is. Or what the graph of dependencies is. So what I make out of that is that it simply forbids older versions but keeps using the latest (which is not the case). |
Thanks for the feedback. I modified the suggestion further to include more of the language you proposed in your original change. Unfortunately, there are nuances to how versioning works that cannot be explained without going into at least a bit of technical detail.
A port is the term we use to describe the set of files that tell vcpkg how to download, build, and install a library/package.
When you install a library, it often has dependencies (direct dependencies), and those dependencies can have their own dependencies (we call these, transitive dependencies). The graph of dependencies is the set of libraries that need to be installed in the appropriate order so that everything builds correctly (transitive dependencies first, then direct dependencies, and finally the requested library). The problem with your original rewrite is that it suggests that if a constraint is added elsewhere, the baseline is ignored. But that is not actually the case, in reality, the baseline adds an "invisible" For example:
This creates two conditions vcpkg can be forced to select
|
@vicroms Just to further clarify. In the baseline case you mentioned above, if 1.3.0 came out, it wouldn't automatically be downloaded right? |
No, it wouldn't. You would need to use a newer baseline or upgrade the version constraint. The design principle is to never update versions without the users knowledge. |
Right. My point is that most users would simply be interested in learning how to do that. |
I think the wording here is a bit ambiguous and confusing for beginners. I had to spend quite a while browsing to get this information.
See my post here: microsoft/vcpkg#42075