question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Defer completely to vcpkg to determine whether a cache is outdated

See original GitHub issue

Currently, run-vcpkg tries to detect when the cache needs to be recompiled. It does so by doing a couple of approximations: OS runner version, vcpkg.json hash and vcpkg/ version hash. This isn’t perfect of course, and causes a lot of redundant cache misses that require building every dependency again. There’s also the problem using overlay ports that aren’t part of the hash and don’t trigger rebuilds (when they’re modified) at all.

It seems like we could defer to vcpkg completely instead (this assumes manifest mode):

  • Restore binary cache, always (using a cache key without any restore keys of a simplified runner version: win22, ubuntu22, macos12, etc.).
  • Ask vcpkg if any ports need to be rebuilt with the triplet specified as input to the action => if yes, at the end of the job we will upload the cache
  • At the end ask vcpkg for a list of installed ports and check if it differs from the one in cache => if yes, a port was removed and we need to reupload the cache.
  • When uploading the cache we ask vcpkg which ports were installed, and we only cache those (so that ports that have been removed aren’t uploaded)

This basically guarantees a working build (through vcpkg’s ABI detection) with as few rebuilds as possible I believe.

Thoughts? I would be willing to help out as much as I can (given my limited TS experience probably not a lot but 🤷). Thanks!

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rcoupcommented, Dec 14, 2022

@lukka the vcpkg team seem fairly responsive to GitHub issues, maybe open a discussion there and ask for a recommended approach or decide on the best changes to vcpkg to support this use-case?

1reaction
lukkacommented, Dec 1, 2022

@quyykk i am taking my time to follow up on this, I won’t forget!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[CURL] build failure · Issue #14524 · microsoft/vcpkg - GitHub
I have had no issues building it from source on Windows 10 x64. It took a few mins on an old laptop. Most...
Read more >
Binary Caching - vcpkg
Binary caching is a vcpkg feature that saves copies of library binaries in a shared location that can be accessed by vcpkg for...
Read more >
vcpkg: Accelerate your team development environment with ...
Binary caching allows you to share the compiled libraries you consume locally with your development team and continuous integration system, ...
Read more >
SIMD Extension to C++ OpenMP in Visual Studio
If you see an OpenMP SIMD loop that you expect to be vectorized, ... The extension will now cache header information to improve...
Read more >
Frequently Asked Questions - vcpkg - Read the Docs
Alternatively, if your goal is to preserve binaries produced by vcpkg install operations for later re-use, see the Binary Caching feature ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found