Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of complex extends in platformio.ini #21191

Merged
merged 2 commits into from
Feb 27, 2021

Conversation

kad
Copy link
Contributor

@kad kad commented Feb 25, 2021

Description

This is minor follow-up for PR #21068.

This PR fixes corner case when custom PlatformIO env section is referencing
a non-env section via 'extends' directive. In that case PlatformIO Config APIs will return single string instead of array, which needs to be handled differently.

It also fixes some of the Python formatting conventions (tabs vs spaces mix in single file).

Requirements

Benefits

Fixes corner case for advanced users.

Configurations

example platformio.ini:

[melzi_custom_flags]
extends = env:melzi
build_flags = ${env:melzi.build_flags} -ffast-math

[env:my_custom_build_env]
extends = melzi_custom_flags
extra_scripts  = pre:buildroot/share/PlatformIO/scripts/custom_pre_hook.py
                 ${melzi_custom_flags.extra_scripts}

Related Issues

kad and others added 2 commits February 25, 2021 19:56
Fixed corner case when custom PlatformIO env section is referencing
a non-env section via 'extends' directive.
@thinkyhead thinkyhead merged commit 24623d3 into MarlinFirmware:bugfix-2.0.x Feb 27, 2021
vyacheslav-shubin pushed a commit to vyacheslav-shubin/Marlin that referenced this pull request Mar 10, 2021
vyacheslav-shubin pushed a commit to vyacheslav-shubin/Marlin that referenced this pull request Mar 10, 2021
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants