diff --git a/HISTORY.rst b/HISTORY.rst index 52b2e407..6aa1832c 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -11,9 +11,10 @@ PlatformIO Core 5 5.2.3 (2021-??-??) ~~~~~~~~~~~~~~~~~~ +- Show human-readable message when infinite recursion is detected while processing `Interpolation of Values `__ (`issue #3883 `_) - Improved directory interpolation (``${platformio.***_dir}``) in `"platformio.ini" `__ configuration file (`issue #3934 `_) -- Disabled resolving of SCons variables (e.g., ``${SOURCE.get_abspath()}``) when preprocessing `Interpolation of Values `__ (`issue #3933 `_) -- Fixed an issue when the "$PROJECT_DIR" variable was not properly replaced in the ``debug_server`` option (`issue #4086 `_) +- Ignore resolving of SCons variables (e.g., ``${SOURCE.get_abspath()}``) when preprocessing interpolations (`issue #3933 `_) +- Fixed an issue when the "$PROJECT_DIR" variable was not properly replaced in the `debug_server `__ option (`issue #4086 `_) 5.2.2 (2021-10-20) diff --git a/platformio/project/config.py b/platformio/project/config.py index 124667e0..1ed6b4d3 100644 --- a/platformio/project/config.py +++ b/platformio/project/config.py @@ -294,7 +294,12 @@ class ProjectConfigBase(object): section, option = match.group(1), match.group(2) if section == "sysenv": return os.getenv(option) - value = self.getraw(section, option) + try: + value = self.getraw(section, option) + except RecursionError: + raise exception.ProjectOptionValueError( + "Infinite recursion has been detected", option, section + ) if isinstance(value, list): return "\n".join(value) return value