Skip to content

The work directories of emit build-database are never collected: 3.4 GB in one home #969

Open

Description

@Sunrisepeak

What happens

mcpp emit build-database plans each project in a work directory of the home, <home>/cache/build-database/<hash of the project root and member>/ (build_database_work_dir, src/cli/cmd_build.cppm). Nothing removes one: mcpp cache gc, prune and clean collect the package and host-tool entries of the build cache and do not read this directory, and the directory of a project that no longer exists stays for ever.

Measured on a developer machine on 2026-11-19: 626 work directories, 3.4 GB, 520 of them unused for more than a day; nearly all belonged to the temporary projects of e2e runs that share the home (s::home::inherited). <home>/cache/pack-formats held another 1.9 GB.

Expected

A cache the engine writes is one the engine collects: mcpp cache gc (by age, and within its size budget) and mcpp cache clean cover the work directories of emit build-database and of the pack formats, and mcpp cache list shows them.

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