mirror of
https://github.com/esphome/esphome.git
synced 2026-10-06 10:56:43 +00:00
Resolve the ccache path on every call, matching the espidf backend
functools.cache froze the ESPHOME_CCACHE_ENABLE/PATH decision for the process lifetime, which a long-lived host like device-builder never restarts, and forced a cache_clear fixture in the tests. The docstring and test now pin the uncached delegation.
This commit is contained in:
@@ -18,7 +18,6 @@ toolchain has always used, so the bits are identical); the
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import functools
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import NamedTuple
|
||||
@@ -155,9 +154,13 @@ def get_build_env(toolchain_path: Path) -> dict[str, str]:
|
||||
return env
|
||||
|
||||
|
||||
@functools.cache
|
||||
def ccache_path() -> str | None:
|
||||
"""The ccache binary to prefix compiles with, or None when disabled."""
|
||||
"""The ccache binary to prefix compiles with, or None when disabled.
|
||||
|
||||
Deliberately uncached (matching espidf): the decision reads
|
||||
ESPHOME_CCACHE_ENABLE and PATH, which can change between builds in a
|
||||
long-lived host process.
|
||||
"""
|
||||
return resolve_ccache_path()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user