Skip to content

test: read a build program's output directory from resolution.json - #45

Merged
Sunrisepeak merged 2 commits into
mainfrom
fix/out-dir-from-resolution
Oct 10, 2026
Merged

Sunrisepeak merged 2 commits into
mainfrom
fix/out-dir-from-resolution

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

mcpp 2026.10.10.1 gives each configuration and package its own build-program output directory (target/.build-mcpp/out/<configuration>/<package>) and records it as the root package's outDir in resolution.json (mcpp-community/mcpp#778). The checks that named target/.build-mcpp/out read it through tests/out-dir.sh, which falls back to that path for an engine that records none, so the collection measures the same on 2026.10.1.3. Cross-validated against the mcpp release branch with the mcpp_source_ref dispatch.

mcpp 2026.10.10.1 gives each configuration and package its own build-program
output directory (`target/.build-mcpp/out/<configuration>/<package>`) and
records it as the root package's `outDir` in resolution.json (mcpp#778,
design 2026-10-10 §4). The checks that named `target/.build-mcpp/out` read it
through tests/out-dir.sh, which falls back to that path for an engine that
records none, so the collection measures the same on 2026.10.1.3.
…t built

--no-accel is another configuration with its own output directory, so the
output directory is read after each build.
@Sunrisepeak
Sunrisepeak merged commit caf136b into main Oct 10, 2026
8 checks passed
Sunrisepeak added a commit to mcpp-community/mcpp that referenced this pull request Oct 10, 2026
…r action output, module roles from declarations, Termux (#792)

Release 2026.10.10.1. Design: `.agents/docs/2026-10-10-one-source-one-meaning-design.md` (revision 6).

## Workspace: the prefix carries the meaning (#785, #786)
- `[workspace.toolchain]`, `[workspace.indices]`, `[workspace.profile.<name>]`, `[workspace.target.<selector>]` (with `.build`, `.abi`, `.runtime`, `.xlings.workspace`) and `[workspace.xlings]` mirror the tables of the same name and are read by the same reader (`parse_document` over the document under `workspace.`). A table without the prefix describes its own package.
- Merge rule by key (W3): declared scalars stay the member's, lists put the workspace first, named tables merge key by key, conditional rows are inherited ahead of the member's. Package-only keys and unknown `[workspace]` tables are refused.
- The root's own tables still reach members by position, unchanged, in `mcpp.pm.compat.workspace_position`, with a `manifest/workspace-position` warning naming the canonical spelling (removed in 1.0.0). W7 warns about package tables on a root without `[package]` (`--strict`: error). A note asks for the `mcpp` floor when the layer is used.
- Members are grouped by their configuration as it evaluates for the target; the virtual root carries a member's conditional `dialect_cxxflags`/`.abi` rows (R1b: `DIAL=0` → `DIAL=2`).
- `mcpp.manifest.key_registry`: the class of each key; the parser's `[build]` and conditional-build known keys, the shared conditional keys and W7's package tables are derived from it.
- `mcpp publish` writes the layer into the member's own tables (W6).

## Action outputs have one writer (#778)
- Prepare writes no placeholder; a generated unit enters the plan from its action's declaration. A generated module interface without `.provides()` is `degraded`.
- `mcpp::out_dir()` is per configuration and package (`target/.build-mcpp/out/<configuration>/<package>`), recorded as `outDir` in `resolution.json`.

## Module role from the declaration (#790)
- A C++ unit that provides a module takes the module rule whatever its extension; cl.exe implementation partitions get `/internalPartition` (measured in probe #791).

## Toolchains, Windows, Android
- `--toolchain` replacing a declared toolchain warns (D11).
- Windows SDK from `KitsRoot10` and `%ProgramFiles%`; `vswhere` from `%ProgramFiles(x86)%`; the MSVC probe names the missing half for the first-run notice and for the refusal of a specified toolchain (D15–D18).
- Android host recognised (`self env` → `android`), same default toolchain (D21); argv shell resolved (D28); the managed toolchain's library path no longer reaches ninja's environment (D29); install hints by failure class and xlings extract/hook progress shown (D22, D23).
- xlings pinned to 2026.10.10.2 (openxlings/xlings#651: hard-link fallback, error classes, progress); bootstrap mcpp 2026.10.8.1.
- Termux fresh-install jobs (termux-docker aarch64, Android 14 emulator app sandbox) in `ci-fresh-install.yml`.

## Late fixes from CI
- A workspace member's build program keeps its out dir beside its cache, so `emit build-database` reuses the build's run (e2e 839 B4).
- `mcpp index list` reads the same effective indices as resolution (e2e 44).
- A failed install names the first address's failure ahead of the `compat` retries.
- Tests read a tool binding from `build.ninja` as a command line (`env LD_LIBRARY_PATH=...` prefix, D29); the graphics checks read `outDir` (`.github/tools/out_dir.sh`).
- The Linux and macOS e2e jobs install the `mcpplibs.cmdline` payloads e2e 32/33/40 link, which a warm cache used to hold.

## Tests
- e2e 893–901, each failing on 2026.10.8.1: workspace layer, compat reading, conditional rows, one writer, per-configuration out_dir, module units in `.cpp` (llvm and gcc), `--toolchain` note, publish write-back, the tools' library path.
- Unit: `test_key_registry` (registry vs `kWorkspaceBuildKeys` and the grouping key, layer parsing and refusals, W7, W3 merges, grouping), `MsvcProbe` description.
- e2e 12, 44, 210 moved to `[workspace.indices]`; 120 and 773 keep the position reading as its coverage; 111 reads the new output place.

## Ecosystem
- openxlings/xlings#651 (released 2026.10.10.2), openxlings/xim-pkgindex#947 (glibc 2.44.3 r4, payload hard-link check), mcpp-community/mcpp-plugins#45 (tests read `outDir`).

Closes #785, closes #786, closes #778, closes #790.
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.

1 participant