38 lines
2.9 KiB
Markdown
38 lines
2.9 KiB
Markdown
# 05 — Shared build contexts and profile/target selection
|
|
|
|
Status: PLANNED; no implementation claim
|
|
Requirements: R-008,R-009,R-010,R-015
|
|
Dependencies: 03,04; freeze model before parallel06/07 implementation.
|
|
|
|
## Ownership and boundaries
|
|
Proposed Astra: NEW include/vls/build/model.hpp, src/build/model.cpp and model tests. Root serializes this shared model.
|
|
Future assignments must verify the then-current baseline and exact disjoint paths;
|
|
these proposed scopes do not authorize work in another repository.
|
|
|
|
## Contracts and data flow
|
|
BuildContext identifies provider/workspace, profile, target/alternative, language, semantic argv/cwd, toolchain/stdlib, environment identity, source mappings and readiness. AnalysisRevision joins document/context/generation/dependencies/backend. Unknown native metadata is represented explicitly, not as empty authoritative data.
|
|
|
|
## Implementation sequence
|
|
1. Separate selected context from all available contexts. Follow VBS's editor selection unless overridden; retain persistent per-file target overrides and preserve alternatives.
|
|
2. Normalize only understood typed arguments/path operands. Keep original command provenance and explain unsupported semantic operands rather than silently drop them.
|
|
3. Associate headers with known owning translation units/include relationships; surface unresolved ownership. Do not merge incompatible macro/options sets to invent a header command.
|
|
4. Bind active requests and index results to immutable context generations. Switching profile/target cancels or demotes obsolete work and never permits late publication as current.
|
|
|
|
## Failure behavior and constraints
|
|
Ambiguous contexts require a visible deterministic selection plus override, not merged flags. Invalidated overrides are reported and cleared only by explicit policy. Incomplete toolchain/generated metadata blocks authoritative analysis and rename.
|
|
|
|
## Acceptance scenarios
|
|
1. Use one source/header under incompatible defines, debug/release and two targets; verify distinct identities and visible selection.
|
|
2. Complete old-profile work after new-profile work and prove stale results cannot publish.
|
|
3. Test removed targets, missing overrides, host build-description versus target contexts, header ownership and relevant environment changes.
|
|
|
|
## Verification and integration
|
|
Proposed NEW CTest label: `build-model`. Once implemented, register a nonzero suite and run:
|
|
```sh
|
|
dev cpp-gcc -c ctest --test-dir build/bootstrap -L build-model --output-on-failure
|
|
```
|
|
This future command is not evidence that the label/tests exist now. Before dispatch,
|
|
bind the fixtures above to actual targets and record prerequisites/side effects.
|
|
Require fresh independent review of the implemented contract and affected integrations.
|
|
Schema/backend identity changes rebuild derived state in a new generation. Preserve original provider records and last-good status for read-only diagnosis; never mark a stale generation current.
|