Motivation
mcpp currently writes a useful compile database only after a successful build. This creates a bootstrap problem for IDE users: clangd needs accurate project, dependency and module flags while the source is still incomplete, before the first build can succeed.
A compile database alone also cannot describe workspace members, selected configuration, artifact freshness or structured failures to IDE clients.
Proposed scope
- Add a versioned, machine-readable IDE snapshot for workspace/member discovery and diagnostics.
- Add a configure operation that resolves the real BuildPlan and publishes a fresh CDB before ordinary project compilation or linking.
- Include discovered test translation units and their development dependency context.
- Publish structured NDJSON lifecycle events and stable project/configuration/snapshot identities.
- Preserve the previous usable CDB when staging or publication fails.
- Keep a root compile_commands.json compatibility projection for existing clangd integrations.
- Document which lifecycle behavior belongs to IDE clients, including file watching, workspace fan-out, stale fallback and module-pending state.
Non-goals for the first version
- Building every uncached project or dependency BMI during IDE discovery.
- A persistent daemon, cancellation protocol or full workspace configure fan-out.
- Replacing clangd or promising cross-toolchain BMI compatibility.
Acceptance criteria
mcpp ide snapshot --format json is read-only and reports schema-versioned workspace/artifact state.
mcpp ide configure --format ndjson can publish a usable CDB before a successful normal build.
- Configure does not compile ordinary project translation units or link final targets.
- CDB generation covers normal and test sources and reports actionable structured failures.
- Publication behavior is covered by unit tests and macOS/Linux/Windows CI paths.
Motivation
mcpp currently writes a useful compile database only after a successful build. This creates a bootstrap problem for IDE users: clangd needs accurate project, dependency and module flags while the source is still incomplete, before the first build can succeed.
A compile database alone also cannot describe workspace members, selected configuration, artifact freshness or structured failures to IDE clients.
Proposed scope
Non-goals for the first version
Acceptance criteria
mcpp ide snapshot --format jsonis read-only and reports schema-versioned workspace/artifact state.mcpp ide configure --format ndjsoncan publish a usable CDB before a successful normal build.