vcpkg install Auto update sha512#166
Conversation
19a9b90 to
9fe3bc3
Compare
|
Also, this is an awesome idea and I'd love to see it be further worked on. This is such a nice feature for our users. |
e1d384c to
0ddd7f0
Compare
4d7a6a6 to
ca4ba55
Compare
…y a warning instead of an error is emitted when there is a sha512 mismatch
…a512 hashes through new ones
db215f7 to
78fe686
Compare
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
78fe686 to
9282cfe
Compare
|
The maintainers looked at this in person today and have the following feedback:
|
I first also planned to do that. But I have not found a way to get a stacktrace in cmake except with |
It was my impression that this was intended to update SHAs, not for authoring new ports; and for an update plain grepping the old SHA and replacing it with the new one should work. It's a risky business attempting to machine parse output that was never intended for machine consumption as the tools in question don't treat it as contractual. CMake stack traces certainly qualify as "never intended for machine consumption" as far as I know. |
ask the meson guys ;) |
When I create a new port I also have to update SHAs, so this was definitive a target use case.
Not always. For example when I create a new port, I normally just copy an existing port and rename stuff. If I then run vcpkg with
Probably true, but this is only a convenience feature under an experimental flag. So if it would break one day that would be not the end of the world. (I personally don't expect that and even if I expect that it should be possible to change the parsing code without a big effort) |
# Conflicts: # src/vcpkg/install.cpp
|
@BillyONeal @autoantwort any chances of this being eventually merged? It helps tremendously when collectively updating the KF5 frameworks. |
I think the concern about relying contractually on something that doesn't appear to be a contractual thing remains. |
|
@BillyONeal When I use a separate file should the hash mismatch message still displayed? I think we should remove the message then to avoid confusion. |
I don't have any opinion on this one. |
|
Is this still planned for inclusion? It saves tremendous amount of time when mass-updating ports, like I do for KF5 frameworks. |
I believe the status on this is that we would still love the feature but are still concerned about (1) reading intended-for-humans output in a way that makes it machine-contractual, and (2) arbitrarily interspersing that output in stdout. Or are those concerns addressed now? |
|
@markle11m @valeriaconde @ras0219-msft @vicroms @dan-shaw @JavierMatosD and I discussed this again today and affirmed that we aren't comfortable building commands that mutate the sources based on non-machine-readable output such as the CMake stack trace. @ras0219-msft observes that you can build similar behavior outside of vcpkg by inspecting our standard out since these messages are printed there. Please feel free to reopen or start a new PR should CMake add a contractually machine readable way to get what is needed here. (We aren't making a statement that in the future that that is the only issue; for example grepping in the source file of the portfile in the first place is a bit concerning.) |
|
https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html#codemodel-version-2-backtrace-graph Possible machine readable way to get to the SHA location... |
|
My goal now would be to directly put the downloads directives in the vcpkg.json or a new file next to it. |
Add an option so that sha512 hashes are automatically updated when they are wrong.
When being a port maintainer updating the hashes can be one of the most annoying and time consuming parts.
Depends on microsoft/vcpkg#19679