Initialize the PlatformIO build directory once with the first example.
(self, example: str)
| 354 | self.executor = ThreadPoolExecutor(max_workers=1) |
| 355 | |
| 356 | def _internal_init_build_no_lock(self, example: str) -> InitResult: |
| 357 | """Initialize the PlatformIO build directory once with the first example.""" |
| 358 | if self.initialized: |
| 359 | return InitResult( |
| 360 | success=True, output="Already initialized", build_dir=self.build_dir |
| 361 | ) |
| 362 | |
| 363 | # Initialize with the actual first example being built |
| 364 | result = _init_platformio_build( |
| 365 | self.board, |
| 366 | self.verbose, |
| 367 | example, |
| 368 | self.paths, |
| 369 | build_dir=self.build_dir, |
| 370 | additional_defines=self.additional_defines, |
| 371 | additional_include_dirs=self.additional_include_dirs, |
| 372 | additional_libs=self.additional_libs, |
| 373 | use_fbuild=self.use_fbuild, |
| 374 | ) |
| 375 | if result.success: |
| 376 | self.initialized = True |
| 377 | return result |
| 378 | |
| 379 | def cancel_all(self) -> None: |
| 380 | """Cancel all builds.""" |
no test coverage detected