68 lines
5.0 KiB
Markdown
68 lines
5.0 KiB
Markdown
# 13 — CMake, Meson and Conan providers
|
|
|
|
Implementation status: IMPLEMENTED & VERIFIED (2026-11-26). See
|
|
[STATE](../agent-workflow/STATE.md) and [VERIFICATION](../agent-workflow/VERIFICATION.md)
|
|
for implemented files and observed checks (Conan2 adapter fails explicitly when `conan` is absent from PATH).
|
|
|
|
## Requirements and ownership
|
|
|
|
- Requirements: R-008, R-009, R-010, R-014.
|
|
- Delivery phase: Foreign dependency interoperability.
|
|
- Intended configured role: sol_implementer at XHigh; fresh astra_reviewer acceptance.
|
|
- Dependencies: 04 toolchains; 05/07 source identities/state; 06 processes; 11/12 resolved dependencies; 03 ImportedTarget contract.
|
|
- Proposed exclusive implementation scope: src/providers/cmake/, src/providers/meson/, src/providers/conan/, tests/providers/; common provider interface root-owned.
|
|
|
|
Before dispatch, reconcile these paths with the real HEAD, write a full task spec,
|
|
lint it, and transfer shared-file ownership explicitly. Paths that do not yet exist
|
|
are NEW. Source-disjoint work still coordinates shared state, ports and build directories.
|
|
|
|
## Design and interfaces
|
|
|
|
- Initially run foreign tools in isolated source/profile/toolchain contexts and import artifacts plus complete consumer requirements. Do not translate their build graph into native actions in this milestone.
|
|
- ImportedTarget includes public/system include paths, definitions/options, ordered link requirements, static implementation dependencies, runtime artifacts, generated prerequisites, configuration mapping and module capabilities.
|
|
- Use CMake>=4.2 File API for configured target/artifact facts plus evaluated consumer-interface probes/exports. File API target/build dependencies are not automatically complete transitive public link metadata.
|
|
- Use configured Meson introspection for targets/build options and exported pkg-config or explicit interface data for consumers. Use Conan2 component-aware generated metadata and separate build/host contexts; do not flatten components indiscriminately.
|
|
- Where complete interface data is unavailable, require an explicit typed interface description and diagnose the missing fields. Never guess usage requirements from filenames or scrape compile_commands as a complete graph.
|
|
- Provider input identity includes source contents, build definitions, tool versions, options, toolchain and dependencies. Changed immutable source identities use invalidated/fresh managed build state so foreign timestamp shortcuts cannot retain wrong binaries.
|
|
- Define metadata-only operations as reads of validated cached exports/introspection. Never invoke CMake configure, Meson setup, Conan install, nested generators or builds from compdb watch.
|
|
|
|
## Implementation sequence
|
|
|
|
1. Freeze provider requests, imported interfaces, freshness guards and metadata-only capability contract.
|
|
2. Implement CMake build/import with representative target/interface fixtures.
|
|
3. Implement Meson and Conan2 adapters with their own availability/version probes and fixtures.
|
|
4. Add imported target graph integration, explicit overrides, compdb merging/projection where valid and cancellation/recovery.
|
|
|
|
## Failure behavior and boundaries
|
|
|
|
- Missing executable/provider version is a prerequisite diagnostic; Conan absence is not a successful empty import.
|
|
- Unknown metadata semantics require explicit support or a clear unsupported result.
|
|
- Do not expose mutable provider build paths as immutable shared artifacts until publication validates them.
|
|
- Nested bridge/provider operations must not deadlock on project/package locks.
|
|
|
|
## Acceptance scenarios
|
|
|
|
1. Public/private/interface requirements, static transitive links, generated headers and ordered link flags.
|
|
2. Debug/release and GCC/Clang imports remain isolated; ABI mismatch fails.
|
|
3. Edit foreign source with preserved timestamp/size and verify changed output.
|
|
4. Provider errors/cancellation/reconfiguration failures never publish partial imports.
|
|
5. Metadata-only fixture cannot execute configure side effects; stale status is explicit.
|
|
|
|
## Verification and integration gate
|
|
|
|
NEW tiny CMake/Meson/Conan fixture projects build and link a native consumer. Test real supported versions and record their identities. Add the first VoidLibrary provider fixture, but do not edit its checkout.
|
|
|
|
Acceptance requires observed results for these scenarios, the affected regression
|
|
suite, reviewed cross-component contracts, and a fresh independent review. Record
|
|
unrun checks and environment limitations; tests passing alone do not waive an invariant.
|
|
No merge, push or deployment is authorized by a review verdict.
|
|
|
|
## VoidLibrary reuse and upstream candidates
|
|
|
|
Void process/path/data facilities. Official references: CMake File API, Meson IDE-integration/introspection docs and Conan2 CppInfo/custom-generator docs; keep adapter version contracts explicit.
|
|
|
|
Shared invariants and input/publication policies are defined in
|
|
[ARCHITECTURE](ARCHITECTURE.md); requirement authority is
|
|
[REQUIREMENTS](REQUIREMENTS.md). Return implementation evidence to
|
|
[VERIFICATION](../agent-workflow/VERIFICATION.md).
|