Files
Build-System/docs/roadmap/20-future-translation-platforms.md
T
2026-11-27 07:50:54 +03:00

5.7 KiB

20 — Later native foreign execution and platform ports

Implementation status: Slices 1, 2A, 2B, & 2C implemented & verified (bounded single-config C & C++ / multi-compile-group CMake File API codemodel-v2 and Meson intro-targets.json + build.ninja audits, bounded hermetic build.ninja CUSTOM_COMMAND / UTILITY / custom_target lowering with strict rejection of console pools / .util-only side-effects / out-of-tree writes, foreign CMake C++20 CXX_MODULES fileSets lowering onto P1689 + cross-target module_bmis, native Graph::BuildGraph execution, unified resolve_foreign_with_translation, CLI vbs build|test --native-foreign, equivalence & restored-mtime mutation tests, and explicit RequireNative / FallbackToForeignBuild policy in Translator.hpp and Translator.cpp); Slice 3 (Windows/MSVC & macOS/Apple Clang ports, remote execution workers, plus live conan CLI verification) remains planned scope — see 21-expansion-roadmap.md, STATE, and VERIFICATION.

Requirements and ownership

  • Requirements: R-010, R-015.
  • Delivery phase: After full-v1 foundations.
  • Intended configured role: astra_planner at XHigh; fresh astra_reviewer acceptance.
  • Dependencies: Stable 03-08 action/toolchain contracts and proven 13 adapters; separate implementation approval/task contracts for each supported slice.
  • Proposed exclusive implementation scope: Future src/providers/translation/, platform-specific driver/backend directories and compatibility fixtures; planning read-only until precise implementation ownership is assigned.

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

  • Native graph translation is a later goal, distinct from v1 run-and-import. Initially retain foreign tools for configuration/evaluation while translating only a documented complete subset of resulting actions for native execution.
  • Do not treat CMake codemodel, Meson introspection or compile_commands as a complete action graph. Custom commands, depfiles, generated files, pools, response files, dynamic module edges, environments and ordering need explicit evidence.
  • Prototype a bounded configured-generator export/import route and prove semantic equivalence against the original tool. Unsupported graph constructs cause a diagnostic or explicit foreign-provider fallback, never silent omission.
  • Conan is a package/recipe system; native execution concerns supported underlying builder actions or reusable binary packages. Do not promise arbitrary Python recipe translation.
  • Add Windows/MSVC and macOS/Apple Clang through platform/toolchain interfaces after Linux correctness is stable. Cover process lifecycle, path/case semantics, watcher loss, loader/install behavior and module/debug formats.
  • Remote action caching and distributed workers remain deferred options, not registry binary distribution. They require separate trust, transport, platform execution and complete-input contracts before adoption.

Implementation sequence

  1. Inventory foreign metadata coverage with small official-tool fixtures and record unsupported constructs.
  2. Choose one bounded translation subset and freeze its completeness/compatibility contract before implementation dispatch.
  3. Compare native and original execution under source/generator/environment/module mutations.
  4. Port platform primitives and compiler drivers with native CI evidence, preserving shared invariants rather than conditional approximations.

Failure behavior and boundaries

  • No marketing claim of replacing arbitrary CMake/Meson logic without a tested compatibility boundary.
  • Unknown actions or incomplete dependencies cannot be dropped to make a build appear successful.
  • No cross-platform support inferred from compilation alone; lifecycle/filesystem behavior needs real hosts.
  • No remote service deployment, credentials or expanded source exposure assumed.

Acceptance scenarios

  1. Supported subset yields equivalent outputs and rebuild decisions under adversarial mutations.
  2. Unsupported custom/dynamic rule produces an explicit result or selected fallback.
  3. Foreign generated headers, response files and module actions preserve order.
  4. Windows/macOS native process cancellation, paths, watcher recovery, installation and compiler feature matrix.
  5. No regression in Linux/context isolation when platform backends are introduced.

Verification and integration gate

This is a planned research/implementation sequence. No translator or platform test command exists yet. Each slice needs discovered original-tool commands, native equivalence fixtures, planner preflight and independent final review before claims.

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 platform capabilities may expand before these ports; re-inspect the pinned version then. Generic process/watch/path improvements should be considered for upstream use rather than duplicated blindly.

Shared invariants and input/publication policies are defined in ARCHITECTURE; requirement authority is REQUIREMENTS. Return implementation evidence to VERIFICATION.