-
-
Notifications
You must be signed in to change notification settings - Fork 403
Hooks are recognized even when pattern property name uses string key in place of numeric index #2369
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
Comments
Hi @ArminJo. Thanks for your report. The specification is as intended. The ESP32 platform developers are unnecessarily abusing an incidental behavior where strings happen to be supported in addition to integers as the index in the build hook pattern properties: arduino-cli/arduino/builder/builder.go Line 401 in ef72bde
arduino-cli/arduino/builder/recipe.go Line 34 in ef72bde
arduino-cli/arduino/builder/recipe.go Line 64 in ef72bde
So this should be considered a bug in the ESP32 platform and we will not provide explicit support for this format of build hook pattern properties. I think your proposal that the Arduino CLI codebase be changed to drop support for this non-compliant usage is reasonable since otherwise we end up risking being forced to officially support this jankiness after it spreads to many other platforms due to cursory copy/pasting by platform authors who don't make the effort to understand what they are copying. The https://pkg.go.dev/github.com/arduino/go-properties-orderedmap#Map.ExtractSubIndexSets
|
Thank you very much for this analysis! 🥇 |
The Arduino Platform Specification requires that the recipe hooks are distinguished by a number and does not endorse using text labels. Fix all the usages of recipe hooks to use numbers. Closes arduino/arduino-cli#2369 .
The Arduino Platform Specification requires that the recipe hooks are distinguished by a number and does not endorse using text labels. Fix all the usages of recipe hooks to use numbers. Closes arduino/arduino-cli#2369 .
The Arduino Platform Specification requires that the recipe hooks are distinguished by a number and does not endorse using text labels. Fix all the usages of recipe hooks to use numbers. Closes arduino/arduino-cli#2369 .
The Arduino Platform Specification requires that the recipe hooks are distinguished by a number and does not endorse using text labels. Fix all the usages of recipe hooks to use numbers. Closes arduino/arduino-cli#2369 .
The Arduino Platform Specification requires that the recipe hooks are distinguished by a number and does not endorse using text labels. Fix all the usages of recipe hooks to use numbers. Closes arduino/arduino-cli#2369 .
Describe the problem
Here https://arduino.github.io/arduino-cli/0.34/platform-specification/#pre-and-post-build-hooks-since-arduino-ide-165
the hook
recipe.hooks.core.prebuild.set_core_build_flag
is not documented.But it is used By ESP32 platform.txt line 195 ff.
see also Sloeber/arduino-eclipse-plugin#1582
To reproduce
Compile any sketch with any ESP32 board:
see last line, where the recipe is executed.
Expected behavior
Please document it, or disable it if it is not officially supported.
Thanks
Arduino CLI version
2.2.0
Operating system
Windows
Operating system version
10
Additional context
Please document it, or disable it, if it is not officially supported.
Thanks
Issue checklist
The text was updated successfully, but these errors were encountered: