Skip to content

Hoist Python compiler discovery and probe compile helpers #8122

@doublemover

Description

@doublemover

Parent inventory: #8108
Blocked by: #8119, #8120, #8113

Objective

Centralize compiler discovery and probe compile/run command construction for runtime acceptance and runnable e2e scripts.

Shared Module Specification

  • Add scripts/objc3c_tooling/probe_compile.py.
  • Expose Windows-aware find_clangxx behavior with LLVM_ROOT/PATH discovery where currently supported.
  • Expose compile command construction with production include root and explicit -I tests/tooling/runtime support include root.
  • Support extra object inputs, runtime shims, output executable path, and bounded diagnostics.
  • Reuse shared subprocess helpers for duration and failure reporting.

Migration Checklist

  • Migrate runnable find_clangxx copies.
  • Migrate scripts/check_objc3c_runtime_acceptance.py:1334 compiler discovery if dependency direction stays clean.
  • Migrate runnable compile_probe copies.
  • Migrate scripts/check_objc3c_runtime_acceptance.py:5173 compile helper if all special cases are preserved.
  • Keep compile behavior identical except for explicit support include root.

Complete Replacement Inventory

  • find_clangxx - 11 definition(s)/local occurrence(s) to replace or explicitly document as intentionally local if semantics differ.
    • scripts/check_objc3c_runnable_block_arc_end_to_end.py:97
    • scripts/check_objc3c_runnable_bonus_experience_end_to_end.py:80
    • scripts/check_objc3c_runnable_concurrency_end_to_end.py:108
    • scripts/check_objc3c_runnable_error_end_to_end.py:97
    • scripts/check_objc3c_runnable_interop_end_to_end.py:112
    • scripts/check_objc3c_runnable_metaprogramming_end_to_end.py:112
    • scripts/check_objc3c_runnable_object_model_end_to_end.py:97
    • scripts/check_objc3c_runnable_release_candidate_end_to_end.py:110
    • scripts/check_objc3c_runnable_showcase_end_to_end.py:80
    • scripts/check_objc3c_runnable_storage_reflection_end_to_end.py:97
    • scripts/check_objc3c_runtime_acceptance.py:1334
  • compile_probe - 5 definition(s)/local occurrence(s) to replace or explicitly document as intentionally local if semantics differ.
    • scripts/check_objc3c_runnable_concurrency_end_to_end.py:157
    • scripts/check_objc3c_runnable_interop_end_to_end.py:166
    • scripts/check_objc3c_runnable_metaprogramming_end_to_end.py:163
    • scripts/check_objc3c_runnable_release_candidate_end_to_end.py:122
    • scripts/check_objc3c_runtime_acceptance.py:5173

Performance And Reliability Requirements

  • Keep helper code small, dependency-light, and fast enough for normal development feedback.
  • Add focused tests for edge cases before broad migration.
  • Preserve existing output schemas and public behavior unless an intentional bug fix is validated.
  • Keep production helpers separated from test-only helpers.
  • Do not use tmp/ as durable source-of-truth; generated temporary files are allowed only as transient command inputs.

Fast Tests

  • Add tests for compiler discovery priority and missing compiler diagnostics.
  • Add tests for compile command construction including support include root and extra objects.
  • Run focused runnable e2e probes for concurrency, interop, metaprogramming, release candidate, and runtime acceptance probe cases.
  • Run python -m py_compile for changed modules/scripts.

End-To-End Completion Criteria

  • All semantically equivalent compiler discovery and probe compile helpers are shared.
  • Future include paths/warning flags/runtime object inputs can be adjusted in one place.
  • Probe compiles remain deterministic and fast to diagnose.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions