How to force vpckg to not cache a specific dependency #32103
Replies: 4 comments 7 replies
-
If you create 100 files in your portfile dir the binary cache will not be used for that port, but that is not a behavior I would rely on :D |
Beta Was this translation helpful? Give feedback.
-
Did you try to redirect this port to an overlay port? Instead of repeatedly touching the portfile, I would use another file to hold nothing but the timestamp (as content, not as metadata). It would still trigger the rebuild because the content takes part in ABI hashing. This can be automated from the main project. |
Beta Was this translation helpful? Give feedback.
-
Ended up using @dg0yt's suggestion to write a file with the timestamp into the portfile directory to force vcpkg to rebuild it each time. |
Beta Was this translation helpful? Give feedback.
-
Here's a solution that doesn't require changing the port directory:
The environment variable can be set to anything per-build like your CURRENT_TIME value. I think it should work if you set it within your CMakeLists, as long as it's before the
|
Beta Was this translation helpful? Give feedback.
-
I'm using vcpkg in manifest mode to manage a set of dependencies.
For one of the dependencies, I actively work on the repo with the dependency code. I'd like to develop both repos side by side. As such, I have a custom portfile written. When I want a tight inner loop while making changes in both repositories, I edit the portfile for the dependency to remove the call to 'vcpkg_from_git' and manually set the SOURCE_PATH to my local clone of the repository I'm depending on.
I'd like to make changes in the the repository I depend on and have them apply every time I run 'vcpkg install'. What I find is that without a manual change to the portfile, vcpkg can't detect if the source code I'm using changed and so won't rebuild it every time.
Is there a flag or strategy I can use to get vcpkg to rebuild this one dependency every time without having to edit the portfile or delete the built artifacts? Or perhaps what I'm doing is an anti-pattern and I should consider another approach? I don't want to have to rebuild every dependency every time. Just the one.
Thanks in advance for suggestions!
Beta Was this translation helpful? Give feedback.
All reactions