Most build/make/compile/upload systems have an option to "clean" previously compiled libraries.
I can not find such an option in the IDE
Most build/make/compile/upload systems have an option to "clean" previously compiled libraries.
I can not find such an option in the IDE
What would be the benefit?
Sounds good to me. If not all changes to dependencies are detected which could render a cached copy stale, then a fresh start, at least as a trouble shooting measure, is a good idea.
In Sloeber, the Eclipse version of the IDE, there is such an option for a clean build.
So you can clear the cache if that is necessary so you're sure that it compiles the correct files from scratch. I'm reasonably sure that I've advised in the past to delete the cache directory to solve problems.
Been programming for over 50 years, never encountered that. Libraries are not yours in any case.
I used in the past make clean o get rid of all the binary files etc and have lighter directory to transport or send (at the time storage space or bandwidth was an issue), I must say it has been long since I had to do it.
It would not hurt, but is it a priority ?
I been programming over 50 years. "C" programming since 1982. Used it all the time.
I write libraries. I write device drivers. I write applications. When using someone else's library, I had say because I was the project lead. Many times I was the designer.
For these SBC/SOC/Dev boards libraries are "mine". They are compiled on my machine. If I want to trigger a recompile, I want to trigger a recompile. Period.
Hi @fseaman_js. Thanks for taking the time to submit a feature request.
There is, and never will be, such an option because no such option is needed. Arduino IDE is designed to be friendly to beginners and this is done by not cluttering up the UI with unnecessary components.
It is unnecessary Arduino IDE is smart enough to automatically recompile when necessary. It is true that there are some rarely encountered bugs that cause it to not do that, but it would be silly to add an option as a workaround for a bug. The development resources would be better spent on fixing the bug.
If you need this type of advanced functionality, I recommend using Arduino CLI:
https://arduino.github.io/arduino-cli/
You can add the --clean
flag to the [arduino-cli compile
command](Redirecting if you want to clear the cache.
Dear Arduino Team member(s),
Thank you for your reply, that makes sense.
I did not know of Arduino CLI.
From Arduino CLI documentation "The compile step is skipped if the .o and .d files exist and have timestamps newer than the source and all the dependent files. If the source or any dependent file has been modified, or any error occurs verifying the files"
I wanted it for chasing warnings that do not reappear if the .o/.d file exists and is newer than source. I don't like warnings. Make/build logic standardized on "if .o/.d is newer than source, do not compile" long ago. It's fine for normal situations. Sometimes for us "advanced and experienced" long time coders using someone else's library requires chasing these warnings.
I will try the CLI but may find it easier to either "touch" the source or delete the .o/.d
I rescind my request.
Thank you again.
Yes, this is a very good point. The Arduino CLI developers are tracking the need to display the warnings that were produced by the compilation of the cached objects here:
(Arduino CLI is used under the hood by Arduino IDE to compile sketches, so any such fix implemented in Arduino CLI will also apply to Arduino IDE)
That's a Fair requirement.
This is often an issue with open source libraries that are poorly coded (or coded in the past when compiler's options were not as stringent and that went unnoticed at the time).
I usually fix them on my system if the warning is important enough and sometimes would report to GitHub if it's a library I use often so the the author fixes it for everyone.
Yup. Same here. I have the current issue of having to switch between 2.0.14, 2.0.17 and current 3.0.4 under the ESP32 board definitions. With that, library fixes for more stringent rules are "difficult" as fixing for one breaks other.
I try to contribute back to the master but sometimes the CO (Code Originator) is no longer available. Then what?
I could branch the library after fixing it but how to get the news to the community that there is a new branch with a maintainer actively working it?
Some sort of "clean" command is "nice to have" when you are uncertain whether all of the dependencies are getting calculated correctly.
I'm pretty sure I've run into situations where this has been the case. Not in the course of "ordinary" Arduino usage, but perhaps when doing edge stuff like modifying compiler flags in platform.txt. It doesn't help that the cached versions are so hard to find, and persist over occurrences that used to remove them (like restarting the IDE.)
And I don't really want Arduino to make the IDE (or Arduino-cli) so complex that it can actually detect every possible dependencies in every questionably-written 3rd party package or implementation. A "Make clean" equivalent may be a crude hammer, but it would be ... sufficient.
I just ran into this issue myself. I was compiling the LVGL demo, and made a change to the configuration file. This change was never noticed by the Arduino compilation system, so I was constantly getting compile errors.
The only fix was to manually clear the cache, which really should be an option on the IDE.
To say it is not required is a sign of the problem. You could easily add this option to the advanced menu options. Not having this option continues to cause pain and suffering and even confusion to people without the experience using your product.
I have also been a software engineer since the mid 1980's and really liked your system to bring embedded programing to the masses. It's just frustrating to have to manually fix a the issue, after first spending the time to find out what the darn problem is.
A basic full clean option should be added to your IDE.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.