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

feat: cache choices #83

Merged
merged 2 commits into from
Sep 5, 2024
Merged

Conversation

diniamo
Copy link
Contributor

@diniamo diniamo commented Aug 7, 2024

I chose bitcode because it scored the highest on the https://github.com/djkoloski/rust_serialization_benchmark, and doesn't have any dependencies.

Rust makes me unsure about everything, so feel free to point anything out. The worst part is probably that there are 3 checks for whether the cache is available in main, but it's either that or some unreadable nesting.

I probably didn't test enough either, so I'd appreciate some help with that as well.

Closes #77
Closes #76
Partly completes #69

@SuperSandro2000
Copy link
Member

Should we add an option to ignore the cache for one command and update the result? This would be useful if you choose a wrong result for a command.

@diniamo
Copy link
Contributor Author

diniamo commented Aug 9, 2024

The remove one already does that, since the program doesn't exit after the removal.

@diniamo
Copy link
Contributor Author

diniamo commented Aug 22, 2024

I realized that the previous approach was complicated and annoying to use, for example, you would have had to type , -d hello hello to overwrite the cache entry for hello. Instead of 1, there are now 2 options, 1 for emptying the entire cache, and 1 for deleting the command from the cache before running the rest of the application logic.

@diniamo
Copy link
Contributor Author

diniamo commented Sep 3, 2024

@Artturin not sure if you missed this, but I think most people would like to see this merged. Any chance you could take a look?

@Artturin
Copy link
Member

Artturin commented Sep 5, 2024

Awesome, thank you.

@Artturin Artturin merged commit 79cbf38 into nix-community:master Sep 5, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

Cache package per executable Is there any way to make this faster; there is a noticable startup delay
3 participants