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

27249 Followup, re order preflight-checks.py #27285

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

ellensp
Copy link
Contributor

@ellensp ellensp commented Jul 17, 2024

Description

Followup to #27249

As it is currently preflight-checks.py does not correctly detect and fix "#if BOTH()" or "#if EITHER()"

At present it does this

Verbose mode can be enabled via `-v, --verbose` option
In file included from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre.h:39:0,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfig.h:28,
                 from buildroot/share/PlatformIO/scripts/common-dependencies.h:29:
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:74:9: error: missing binary operator before token "("
 #if BOTH()
         ^
Error: Failed to parse Marlin features. See previous error messages.

The cause is preflight-checks attempts to load all MARLIN_FEATURES before checking for the invalid MACROS

Reordering preflight-checks.py and it now warns and updated the macro as expected.

Verbose mode can be enabled via `-v, --verbose` option
In file included from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfigPre.h:39:0,
                 from buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/MarlinConfig.h:28,
                 from buildroot/share/PlatformIO/scripts/common-dependencies.h:29:
buildroot/share/PlatformIO/scripts/../../../../Marlin/src/inc/../../Configuration.h:74:9: error: missing binary operator before token "("
 #if BOTH()
         ^
WARNING: Configuration files needed an update to remove incompatible items. Try the build again to use the updated files.

Requirements

Old "#if BOTH()" or "#if EITHER()" in Configuration files.

Benefits

Works as expected

Related Issues

#27249

@thinkyhead thinkyhead merged commit c852e9c into MarlinFirmware:bugfix-2.1.x Jul 17, 2024
62 checks passed
@ellensp ellensp deleted the PR-27249-followup branch July 18, 2024 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants