MCPcopy Create free account
hub / github.com/FastLED/FastLED / stream_compile_only

Function stream_compile_only

ci/meson/streaming.py:68–544  ·  view source on GitHub ↗

Stream compilation only - collect all compiled test paths without running them. Monitors Ninja output to detect when test executables finish linking, collecting them for later execution. Args: build_dir: Meson build directory target: Specific target to build (None

(
    build_dir: Path,
    target: Optional[str] = None,
    verbose: bool = False,
    compile_timeout: int = 600,
    build_optimizer: Optional[BuildOptimizer] = None,
    build_timer=None,
    on_test_compiled: Optional[Callable[[Path], None]] = None,
)

Source from the content-addressed store, hash-verified

66
67
68def stream_compile_only(
69 build_dir: Path,
70 target: Optional[str] = None,
71 verbose: bool = False,
72 compile_timeout: int = 600,
73 build_optimizer: Optional[BuildOptimizer] = None,
74 build_timer=None,
75 on_test_compiled: Optional[Callable[[Path], None]] = None,
76) -> CompileOnlyResult:
77 """
78 Stream compilation only - collect all compiled test paths without running them.
79
80 Monitors Ninja output to detect when test executables finish linking,
81 collecting them for later execution.
82
83 Args:
84 build_dir: Meson build directory
85 target: Specific target to build (None = all)
86 verbose: Show detailed progress messages (default: False)
87 compile_timeout: Timeout in seconds for compilation (default: 600)
88 build_optimizer: Optional BuildOptimizer for DLL relink suppression.
89 build_timer: Optional BuildTimer for recording compile_done checkpoint.
90 """
91 cmd = [get_meson_executable(), "compile", "-C", str(build_dir)]
92
93 # Determine build mode from build directory name
94 build_mode = "unknown"
95 if "meson-quick" in str(build_dir):
96 build_mode = "quick"
97 elif "meson-debug" in str(build_dir):
98 build_mode = "debug"
99 elif "meson-release" in str(build_dir):
100 build_mode = "release"
101
102 # Initialize phase tracker for error diagnostics
103 phase_tracker = PhaseTracker(build_dir, build_mode)
104 phase_tracker.set_phase("COMPILE", target=target, path="streaming")
105
106 # Create compile-errors directory for error logging
107 compile_errors_dir = build_dir.parent / "compile-errors"
108 compile_errors_dir.mkdir(exist_ok=True)
109
110 # Generate log filename
111 test_name_slug = target.replace("/", "_") if target else "all"
112 error_log_path = compile_errors_dir / f"{test_name_slug}.log"
113
114 # Show build stage banner
115 _ts_print(f"[BUILD] Building FastLED engine ({build_mode} mode)...")
116
117 if target:
118 cmd.append(target)
119 if verbose:
120 _ts_print(f"[MESON] Streaming compilation of target: {target}")
121 else:
122 if verbose:
123 _ts_print(f"[MESON] Streaming compilation of all test targets...")
124
125 # Pre-link safeguard (#2268): on Windows, kill any stale runner.exe /

Callers 1

Calls 13

set_phaseMethod · 0.95
get_meson_executableFunction · 0.90
PhaseTrackerClass · 0.90
stabilize_dll_mtimesFunction · 0.90
CompileOnlyResultClass · 0.85
compileMethod · 0.80
EventMethod · 0.80
timeMethod · 0.80
checkpointMethod · 0.80
appendMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected