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

completions/zsh: Improve caching behaviour #5842

Merged
merged 1 commit into from
Mar 6, 2019

Conversation

okdana
Copy link
Contributor

@okdana okdana commented Mar 5, 2019

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

This addresses #5839 and a few related issues:

  • Eliminate reliance on external utility calls for cache invalidation
  • Update cache policy to also invalidate if cache file is >=2 weeks old or if tap indexes are non-existent
  • Do not override any cache policy the user might already have set
  • Handle default cache policy determination as early as possible to ensure that a default is set appropriately for all helpers (this will mostly be useful if other helpers need caching in the future)

It's notoriously hard to test zsh completion functions, so if anyone feels like double-checking my work that would be pretty cool.

I noticed some other issues with this function too; i'll try to get around to making separate PRs for them

Fixes Homebrew#5839

- Eliminate reliance on external utility calls for cache invalidation
- Update cache policy to also invalidate if cache file is >=2 weeks old or if
  tap indexes are non-existent
- Do not override any cache policy the user might already have set
- Handle default cache policy determination as early as possible to ensure that
  a default is set appropriately for all helpers (this will mostly be useful if
  other helpers need caching in the future)
@MikeMcQuaid
Copy link
Member

Thanks so much for your first contribution! Without people like you submitting PRs we couldn't run this project. You rock, @okdana!

@MikeMcQuaid MikeMcQuaid merged commit 01bd14b into Homebrew:master Mar 6, 2019
@lock lock bot added the outdated PR was locked due to age label Apr 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants