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

Cache is not populated on first install #258

Closed
fredrb opened this issue Jul 5, 2024 · 2 comments · Fixed by #260
Closed

Cache is not populated on first install #258

fredrb opened this issue Jul 5, 2024 · 2 comments · Fixed by #260
Assignees
Labels
bug Reports or fixes associated with bugs in this project complexity::low Issues or ideas with a low implementation cost component::cli Everything related to the buffrs cli priority::medium This is not urgent, but we should do this.

Comments

@fredrb
Copy link
Contributor

fredrb commented Jul 5, 2024

Seems like cache is only persisted if the dependency is already in the lock file.

Here's how I reproduced the issue:

  1. Clean current buffrs cache (if any)
$ rm ~/.buffrs/cache/*
  1. In a fresh buffrs project (already initialized) add first dependency
  2. Run buffrs install
  3. Check cache contents:
$ ls -la ~/.buffrs/cache
total 0
drwxr-xr-x  2 user  staff   64 Jul  5 10:30 .
drwxr-xr-x  4 user  staff  128 Jul  4 10:45 ..
  1. Remove proto files from project but keep Proto.lock file
$ rm -rf ./proto
  1. Run buffrs install again
  2. Check that now cache has the installed proto packages
$ ls -la ~/.buffrs/cache
total 24
drwxr-xr-x  5 user  staff  160 Jul  5 10:31 .
drwxr-xr-x  4 user  staff  128 Jul  4 10:45 ..
-rw-r--r--@ 1 user  staff  341 Jul  5 10:31 my-proto.sha256.8d164e99fef50adc9737550c39c859be3ab6e4a1a81f74e4709a37461e912c59.tgz
@fredrb fredrb added the bug Reports or fixes associated with bugs in this project label Jul 5, 2024
@mara-schulke
Copy link
Contributor

Would you be interested in fixing this? This is definitely unintended behavior! Thank you for raising! 😊

@mara-schulke mara-schulke added complexity::low Issues or ideas with a low implementation cost component::cli Everything related to the buffrs cli priority::medium This is not urgent, but we should do this. labels Jul 5, 2024
@fredrb
Copy link
Contributor Author

fredrb commented Jul 5, 2024

@mara-schulke will do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reports or fixes associated with bugs in this project complexity::low Issues or ideas with a low implementation cost component::cli Everything related to the buffrs cli priority::medium This is not urgent, but we should do this.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants