Skip to content

webrun-modules: orphaned ~deps proxies are never pruned #2

Description

@mkotelnikov

Since #1, each module root owns one ~deps/ folder and a proxy is written as a side-effect of resolution (ensureProxy), not by preprocessModule.

PRUNE_CELL in packages/webrun-modules-build/src/cells.ts only prunes emittedPath(toProjectId(uri)) and its sidecars — that is, artifacts derived from a source uri. A proxy id is never a source uri, so nothing prunes it.

Consequence: remove the last importer of react and ~/~deps/react/index.js (plus its .shape.json) stays in the cache forever. Combined with the monotone export set introduced in #1, the stale proxy also keeps re-exporting names nothing imports any more.

Not dangerous — the emitted tree carries dead files rather than wrong ones — but it grows without bound across a long-lived cache, and it makes "what does this build actually need" harder to answer.

🤖 Filed with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions