(coro_factory, label: str)
| 424 | |
| 425 | |
| 426 | def _run_compile_with_retry(coro_factory, label: str) -> None: |
| 427 | click.echo(f" {label}...") |
| 428 | for attempt in range(2): |
| 429 | try: |
| 430 | asyncio.run(coro_factory()) |
| 431 | return |
| 432 | except Exception as exc: |
| 433 | if attempt == 0: |
| 434 | click.echo(" Retrying compilation in 2s...") |
| 435 | time.sleep(2) |
| 436 | else: |
| 437 | click.echo(f" [ERROR] Compilation failed: {exc}") |
| 438 | logger.debug("Compilation traceback:", exc_info=True) |
| 439 | raise |
| 440 | |
| 441 | |
| 442 | def add_single_file( |
no test coverage detected