Spheroman / Spheroman/newgit

Allow sub-path exclusions in `[identity] produces`

Open
#91 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
0
Forks
0
Avg merge
1h 58m
Merged PRs (30d)
48

Description

In React Native / Expo projects, native build output is written into node_modules and dwarfs the dependencies:

path size
node_modules/react-native-reanimated/android 4.7 G
node_modules/react-native-worklets/android 3.0 G
node_modules/expo-modules-core/android 2.3 G
whole tree from a fresh npm ci 1.3 G

A tree that starts at 1.3 G grows to ~9 G after expo run:android, and ~85% of that is derived output no other instance wants. The reference is upfront that copy-on-write forks on write and explicitly cites native builds as the reason it isn't hardlinks — that is the right call and it works. But it means the ecosystem where installs are most expensive is the one where the store helps least after the first native build.

An exclusion list would keep the stored entry close to the install:

[identity]
produces = ["node_modules"]
produces_exclude = ["node_modules/*/android/.cxx", "node_modules/*/android/build"]

This fights a stated rule — a prepare must be the tree's whole output — and the same logic says a partial tree isn't a faithful entry. So this may well be a "no, and here's why." Filing because the ecosystem impact is large and the tension seems worth recording either way.

Measured context: with a clean tree, a third instance cost 163 MB marginal disk against 1.4 GB apparent, so the store works exactly as advertised right up until a native build runs.


Environment: newgit 0.3.0 (fba8fa7090e2), macOS 15 (Darwin 25.6.0), APFS. npm-workspaces monorepo (Expo/React Native + Next.js + Supabase); local stack is Supabase CLI 2.107.0 (12 containers, Docker Desktop 28.2.2), Metro, and a Dockerised routing service. 4 instances spawned over one session; resources deps (install), expo (process), supabase (command-snapshot-migrations), r5 (project-owned).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names the [identity] produces configuration and proposes produces_exclude patterns for node_modules native-build output. Start by locating the configuration handling for [identity] produces, then determine whether excluded subtrees can be supported without violating the whole-output rule. Done means either implementing and validating the exclusion semantics or documenting why partial trees cannot be supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native, rust
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.