Straight.el: staright-use-package option to bypass cache

Created on 19 Dec 2020  路  3Comments  路  Source: raxod502/straight.el

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:

  • when pulling a package repository compare changed recipes to user's build-cache.el
  • notify the user of such changes (would probably be good to have an option to just accept latest changes without notice as well)
bug build cache modification detection recipe handling recipe repositories

All 3 comments

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).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aspiers picture aspiers  路  4Comments

enko picture enko  路  4Comments

parsoj picture parsoj  路  4Comments

raxod502 picture raxod502  路  3Comments

raxod502 picture raxod502  路  3Comments