Skip to content

feat: generate compile database without building - #387

Open
wellwei wants to merge 9 commits into
mcpp-community:mainfrom
wellwei:codex/configure-only-cdb
Open

feat: generate compile database without building#387
wellwei wants to merge 9 commits into
mcpp-community:mainfrom
wellwei:codex/configure-only-cdb

Conversation

@wellwei

@wellwei wellwei commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

  • add mcpp build --configure-only, reusing the real build plan and existing build selectors while skipping ordinary compilation, linking, BMI cache population, and build-success cache writes
  • include tests/**/*.cpp, matching [build].flags, and test dev-dependencies in the generated CDB; stage only std and already-cached dependency BMIs needed by language tooling
  • publish compile_commands.json atomically across platforms, preserve last-known-good files and CDB symlinks, and keep normal build/test publication failures non-fatal
  • document the trust and side-effect boundary: configure-only may still execute build.mcpp, resolve/install dependencies or toolchains, and update lock/resolution metadata

This is the independently agreed A part from #379. It intentionally does not add JSON/NDJSON, ide subcommands, snapshots, mcpp.wire, invalidatedBy, or new selector semantics. It does not close the RFC.

Core impact

  • shared test target discovery is extracted from mcpp test; existing list/build/run behavior remains covered by unit and E2E tests
  • the Ninja backend gains an opt-in requireCompileDatabase flag; default build/test behavior remains warning-only
  • CDB publication changes from direct truncation to same-directory temporary write plus atomic replacement; concurrent writers remain documented last-writer-wins

Test plan

  • fresh self-hosted mcpp build --no-color --no-cache on macOS ARM64
  • fresh mcpp test --no-color: 70 passed, 0 failed
  • tests/e2e/202_configure_only_cdb.sh: syntax-error source, test/dev-dependency flags, workspace fan-out, -p, no build artifacts/cache, publication failure preservation
  • adjacent E2E: 01, 18, 35, 76, 77, 90, 157, 159
  • unit coverage for test discovery, configure prerequisites, atomic replacement, unchanged mtime, symlink preservation, unreadable/failed destinations

Refs #379
Refs mcpp-community/mcpp-vscode#5

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.

移动到 .agents/docs 下面

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.

2 participants