Skip to content

use standard .cache for build disk cache - #18

Open
subtleGradient wants to merge 1 commit into
nkzw-tech:mainfrom
subtleGradient:patch-1
Open

subtleGradient wants to merge 1 commit into
nkzw-tech:mainfrom
subtleGradient:patch-1

Conversation

@subtleGradient

Copy link
Copy Markdown
Contributor

PROBLEM:
the default options totally disable the disk cache
under some circumstances. e.g. when using flake.nix instead of homebrew

ALTERNATIVE:
instead of the standard node_modules/.cache, maybe ~/.cache
to allow sharing the build cache across many git worktrees

Copilot AI review requested due to automatic review settings September 8, 2025 15:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds explicit configuration options for the Expo build disk cache to ensure it remains enabled in all environments, particularly when using alternative package managers like flake.nix instead of homebrew.

  • Adds explicit cache directory configuration pointing to node_modules/.cache/expo-build-disk-cache
  • Configures cache garbage collection to run every 7 days
  • Explicitly enables the cache and sets debug mode to false

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread app.json
Comment on lines +32 to +34
"cacheGcTimeDays": 7,
"debug": false,
"enable": true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These three options are the default values, why did you add them here?

@cpojer

cpojer commented Sep 8, 2025

Copy link
Copy Markdown
Member

Why is /tmp/ not good enough as a default?

cc @WookieFPV

@WookieFPV

Copy link
Copy Markdown
Contributor

The default cache directory is a os specific temp directory (/tmp/).
The default options should be fine for most projects.

I am not sure how and why flake.nix breaks caching.
If you only get cache misses there is usually some files that change all the time and you have to use a custom expo fingerprint config.

@subtleGradient could you provide more info/repro?

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.

4 participants