-
Notifications
You must be signed in to change notification settings - Fork 4
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
Use of defines in reproducible builds #9
Comments
Yep, this opens another can of worm :-) but we are definitely going to implement this one in a later revision of the profiles. The main issue here is that there isn't a common pattern in the |
Is this not already defined within the CLI as custom board options as a parameter of the FQBN? All of these parameters follow typical key->value format so it should be trivial to allow these within the platforms.txt i.e.
With strict YAML conventions, indenting makes these parameters a subset of the fqbn, so we do not need to define additional variables to store them in unless we need to access these parameters publicly.
using the above format is transparent to third party maintainers as it follows the current convention of adding parameter values to the fqbn. It also degrades nicely to the current system as using no platform.txt file just falls back to the current way of doing things. In addition to this, it should be possible to do the following in addition to the above,
Which is essentially the same as we currently have. It also make an easy interim solution and should be dead simple to implement |
This effort appears to be stalled? It's a quite commonly needed feature:
Major use cases include
Workarounds that are commonly offered, and why they're sad
(Notably, I have never met a build environment that doesn't let you set defines on a project level before. Admittedly Arduino is coming from a bit of a different perspective, prioritizing ease of getting started above all else. And people do find workarounds. But still it's pretty silly, feels like it should be as easy as adding an entry to And yes, this requires some way to add some consistent way for platform/build definitions to handle defines, with a consistent syntax. (arduino/arduino-cli#846 is about attacking this subproblem.) Other proposals have suggested "prepend this include file" instead of "define these symbols", which sidesteps some issues but creates others. |
Often builds have command line defines
As these defines are part of the build they must be includable in the profile. e.g.
If the user defines the define on the command line, it overrules the value in the profile
The text was updated successfully, but these errors were encountered: