Skip to content
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

Miss-use of the local cache when switching upstream URL. #10

Open
Yamakaky opened this issue Aug 2, 2021 · 2 comments
Open

Miss-use of the local cache when switching upstream URL. #10

Yamakaky opened this issue Aug 2, 2021 · 2 comments

Comments

@Yamakaky
Copy link

Yamakaky commented Aug 2, 2021

With this modification and caching enabled, cargo vcpkg build seems to build with the new branch but on the old remote. I think the cache should be invalidated when either of them change.

From https://github.com/microsoft/vcpkg
   fa1bbe097..261c458af  master     -> origin/master
    Checkout rev sdl-hidapi
error: pathspec 'sdl-hidapi' did not match any file(s) known to git
@kornelski
Copy link
Collaborator

Does it work if you use branch = "sdl-hidapi" instead of rev?

@waych
Copy link
Collaborator

waych commented Aug 2, 2021

@kornelski is right in that branch must be used instead of rev if you intend to track a branch instead of pinning to a specific commit revision.

If "caching enabled" here refers to using actions/cache@v2 then I don't think there is a good way to generate the key for the cache such that the key gets updated when the branch being tracked moves, as the file the key is based off of (Cargo.toml in this case) isn't touched when the branch changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants