#LegacyCodeProblems

Jesper Stemann Andersenstemann
2025-05-03

I imagine it went down like this at the design meeting:

> Microsoft engineer: We should store the MD5 of the content in the blob storage database.

> Senior Microsoft engineer: Let's use (!), and interpret the hexadecimal MD5 (with a newline!) as binary, and then base64 encode it!

They might have saved a couple of bytes... ...👏 ...😬

Jesper Stemann Andersenstemann
2025-05-02
Jesper Stemann Andersenstemann
2025-05-02

Obvious sources of a package ABI hash:

✅ vcpkg tool/binary
✅ The microsoft/vcpkg repo root in use (due to the `scripts` directory containing CMake definitions etc.)
✅ Compiler(s) (version) (something like a hash of the compiler binary similar to the approach used by ccache, and sccache)
❓ vcpkg triplet. Is the content of the vcpkg triplet file in play or is it just the triplet name?
❓ vcpkg overlay triplets
✅ portfile and/or hash of the port directory

Jesper Stemann Andersenstemann
2025-05-02

I still don't get the algorithm that determines whether re-uses a cached binary or re-builds from source.

I get that it is determined by the ABI checksum/hash that vcpkg calculates, I just utterly do not understand the set of factors that might influence the ABI hash calculation.

Jesper Stemann Andersenstemann
2025-05-02

@horenmar It certainly features a "unique" design! 😊

> vcpkg has a unique way of handling package versions

learn.microsoft.com/en-us/vcpk

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst