-
Notifications
You must be signed in to change notification settings - Fork 287
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
Raise errors for malformed overlay port manifests #1435
Conversation
ffb3c86
to
00aab4d
Compare
4a78439
to
3073540
Compare
What exactly is the behavior here? It shouldn't break on |
The effect on |
In particular, you cannot determine correct dependencies of |
I fully agree with that.
that would mean overlayB is used. I am only interested in the case that overlayB is not used by anything and just exists. Overlays are for me working directories and erroring on incomplete and yet unused work is just annoying. A warning would be ok. Just don't straight out error for stuff which isn't required. |
I understand the WIP nature of overlay port directories. However, silently ignoring (or just issueing a warning for) a potential overlay port just because @Neumann-A forgot to add a required comma isn't acceptable even for |
"e2e-ports/overlays" is in common vcpkg test args. It must not contain ports with broken manifests where the the tool is expected to report the error. The tests which need these broken ports already passed an explicit "--overlay-ports" argument which duplicated the one in @commonArgs. That is why this commit only changes the value of the explicit argument.
d9bd929
to
01d5402
Compare
I think the correct behavior is that "if a port in an overlay directory would be considered, then errors therein need to be surfaced". The |
Hm, I don't think the problems exposed by the
Unnoticed even in presence of
The point is: ATM it will never explode "because Imagine it wasn't |
AS far as I know it is not silent since vcpkg prints the location where something is taken from. If it is from an external registry you would have to run |
IMO any overlay port modification which introduces a syntax error must lead to an immediate full error. Anything else, such as using a regular registry port, counts as "silent". Yes, this change can cause interruption. That's why I tried to explicitly mention the effects in the top post. I still don't see the real benefit of broken manifest being silent ignored which justifies keeping that behavior. That's like keeping bugs unfixed because the it was always broken. |
To
IMO this is a different bug but should also be fixed. If there's =pass but, for instance, the
Do I misunderstand what this PR does then? It looks like this PR will make that explode even if the contents of that
In that case, the name My point is that names which never participate in the plan at all should not result in failures. For |
In the interest of making sure that this horse is dead, what I mean is that, given the following:
vcpkg install --overlay-ports=overlays curl[openssl] # should succeed
# should fail because a broken openssl overlay-port exists; I believe your PR fixes this
vcpkg install --overlay-ports=overlays --overlay-ports=broken-overlays curl[openssl]
vcpkg install --overlay-ports=broken-overlays curl[openssl]
# should succeed, there's no reason to ever have loaded the openssl overlay-port
# I believe your PR breaks this
vcpkg install --overlay-ports=broken-overlays vcpkg-cmake
# should fail because a broken openssl overlay-port was referenced
vcpkg ci --overlay-ports=broken-overlays
# should fail because a broken vcpkg-ci-openimageio overlay-port was referenced
# I believe your PR fixes this
vcpkg ci --overlay-ports=uniquely-broken-overlays |
I think it's reasonable to have directories in a directory passed to |
That's still possible. They are just not allowed to have malformed
My point is that vcpkg doesn't know if it participates in the plan at the time it loads the manifests. |
I believe that it does know that; the dependency planner doesn't read and parse every vcpkg.json or CONTROL in the repo before doing an install. Maybe this change is fine and that tests needed to change suggests some other bug. I'm taking a look... |
Indeed I tested this and |
I tested and indeed this already works. I added an explicit test that this didn't break. Thanks for the fix! |
For microsoft/vcpkg#39276.
This PR will make
vcpkg
no longer tolerate broken overlay port manifests. Initially meant forvcpkg ci
, the change also affects commands likeinstall
andsearch
. This is acceptable: As long as broken ports are ignored, installation plans and results of "search" must be considered invalid.Errors are raised for:
broken-manifests/malformed
)broken-manifests/broken-no-name
)broken-manifests/broken-no-version
)Note that errors were already raised before this change when
--overlay-ports
pointed directly to a single broken port.No errors are raised for the remaining cases in
ci/*
(unchanged), including the test for missing dependencies of inactive features (new:ci/feature-missing-dep
).