Replies: 4 comments
-
from https://learn.microsoft.com/en-us/vcpkg/concepts/overlay-ports Basic rule: overlay > overrides > min version constrain > baseline |
Beta Was this translation helpful? Give feedback.
-
@Neumann-A I don't agree that mentioning priority rule for package name resolution would be read by users as "when you have both |
Beta Was this translation helpful? Give feedback.
-
You need to first resolve the name before you can even think about version resolution. Since overlays only provide one version that version will be selected. |
Beta Was this translation helpful? Give feedback.
-
I still think the existence of "Versions and custom ports" section in the blog speaks in favour of my argument. I also think that a warning should be issued by the tool, since people might be reading the manifest without consulting the documentation. That being said, I am not here to insist on anything. Feel free to close this issue. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
The overlay ports documentation lacks description of their behaviour when used in combination with overrides, which in its turn does not refer to overlay ports either.
The aforementioned behaviour is the following. When
![vcpkg-overlay-with-overrides](https://private-user-images.githubusercontent.com/4153521/313163027-bd7f848c-dd1f-4735-b976-cec30f895233.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkxNjA1ODMsIm5iZiI6MTcxOTE2MDI4MywicGF0aCI6Ii80MTUzNTIxLzMxMzE2MzAyNy1iZDdmODQ4Yy1kZDFmLTQ3MzUtYjk3Ni1jZWMzMGY4OTUyMzMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjNUMTYzMTIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzM1MjJhNGExNTI4NDI5NjBlZDUyMWFkNjZjMGQ1YjY3ZTYwMjg2ZTFhZGYzMWY3YTZjMjViY2M3Zjg2OWJlYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.Tcxhl-uME0jEd20E3vAyPCwhmRUCDHrg31Z3Cp6Fhc0)
overlay-ports
field is used, the information stated inoverrides
field is ignored.This turns out to be documented in the Microsoft blog post:
What this paragraph entails is that when one has a manifest file with
overrides
field stating that versionx.y.z
of the package is used, that may not at all be the case, because only the version stated in thevcpkg.json
file of the package underports
is considered.I reckon it is a bug in the documentation as it is not reasonable to expect from a user of VCPKG reading the docs to stumble upon that blog post, so they would have to find out about this behaviour the hard way. And I believe that people reading the
vcpkg.json
might misunderstand which version will actually be installed under these circumstances.It would be useful if VCPKG warned the user that they have an
overrides
field, but that it will be ignored because of the presence ofoverlay-ports
. This way, even people not reading the documentation carefully, would have the means of inferring knowledge about this behaviour.Environment
To Reproduce
overrides
field tovcpkg.json
:overlay-ports
field tovcpkg-configuration.json
:some-package
under<path/to/ports>
with the package version different fromx.y.z
x.y.z
Expected behavior
During the installation a warning is issued by VCPKG reporting that the version installed might be different from the expected.
Failure logs
N/A
Beta Was this translation helpful? Give feedback.
All reactions