Recently the spray recipe was updated in MELPA (see #645).
I straight-pull-package melpa and the new recipe is in the repository, but my build-cache.el still contains an entry for the old version of the recipe. Manually removing the "spray" entry from the build-cache and then evaluating straight-get-recipe spray returned the correct recipe, but this is not ideal. Perhaps we should have an option to bypass the cache during straight-get-recipe for such cases? This could be used to possibly automate the above process.
Rough idea:
There is logic to invalidate the recipe cache when a recipe repository has changes detected. It seems like there is a bug in this logic; I'd prefer to fix the bug rather than add a workaround at the user facing level. All the caches in straight.el are designed to be automatically self invalidating when necessary.
Sounds good. I'll see if I can come up with a reliable way to trigger the failure and look into it if I'm able to do so.
Now that I'm not on my phone... here's the logic that turns a modification on a recipe repository into an invalidation of the recipe repo cache: https://github.com/raxod502/straight.el/blob/949a0a70faebb289d430af709aa69afd684bd1de/straight.el#L5341-L5353
And here's the function that is used in various VC functions to register modifications to repositories that are updated via interactive operations: https://github.com/raxod502/straight.el/blob/949a0a70faebb289d430af709aa69afd684bd1de/straight.el#L3816-L3823
Modifications due to manual Git operations outside of Emacs should be detected by the filesystem watcher and translate into the same end result (invalidated recipe cache).