-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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|binarycache] don't use triplet file hash. Hash variables instead. #19984
Comments
This will also need to detect changes to environment variables and I'm not sure how to make set(ENV{PATH} "$ENV{PATH}:$ENV{SOME_BASE_DIR}/magic") machine independent without hashing the source code. |
I'm not sure if it is always desired to detect particular changes to environment variables. And even with hashing the source, you don't hash the contents of the How about a triplet revision variable (not replacing the hash, but as an input)? It might even be overridden per port... |
The question is if you always want this. Maybe one changes the env var |
@JackBoosY Why did you mark this as |
@Neumann-A If you use a selfcompiled vcpkg-tool you can now use microsoft/vcpkg-tool#596 |
Maybe teach VCPKG to also include |
Ran into this the other day, added a customization for a single port and was sad to see the world rebuild. Ended up copying the port to be an overlay port instead, which is a rather less ergonomic... |
I think nowadays you could solve it with an if checking if a per port customization file exists and VCPKG_HASH_ADDITIONAL_FILES. Of course inserting that logic requires a world rebuild once to introduce the logic. |
do you propose triplets to implicitly include per-port customisation files ? |
Yes and then explicitly add that file to the hash for that port. |
So I have a a custom triplet with per port customization and this is a problem for the binary cache since if I add a new customization everything will be invalidated, removed and rebuild although only one port was effectively changed.
I thus suggest: Instead of using the file hash of the triplet to determine the hash for the binary cache it would be better to get the variables set by the triplet and use those to define the triplet hash for a port. Since the triplet is already read numerous times for compiler hash checks it shouldn't add a lot of additional overhead.
This would greatly improve my workflow if I have to touch the triplet file.
The text was updated successfully, but these errors were encountered: