Arduino IDE 2.3.9 is now available

If you are using a recent version of the IDE, you will get an auto-update offer simply by starting the IDE.

Otherwise, the release is available for download here:

https://www.arduino.cc/en/software/#ide-download-section


This release provides some nice advancements and fixes.

Thanks so much to the forum community for all the valuable testing and feedback that has helped us greatly in identifying and investigating these bugs and enhancements!

Highlights

  • Avoid unnecessary recompilations of sketch source code

Update Arduino CLI dependency to 1.5.0

arduino/arduino-ide#2906

Much of the non-GUI functionality of Arduino IDE comes from the Arduino CLI tool.

In order to benefit from the ongoing development work in the Arduino CLI project, Arduino IDE has been updated to using Arduino CLI version 1.5.0.

Avoid recompiling sketch source code

arduino/arduino-ide#2906, arduino/arduino-cli#2961, arduino/arduino-cli#3112, arduino/arduino-cli#1996

When you compile a sketch in Arduino IDE, the compiled objects from libraries and the board's core are cached. On subsequent compilations, these objects are reused instead of recompiling those source code components when appropriate. This significantly reduces the duration of a compilation.

Previously, the compilation caching system was not applied to the source code from the .ino files of the sketch. That specific source code was instead recompiled every time. At first glance, it seems this inefficiency would be insignificant, since we would expect that a user would only trigger a new compilation after making changes to the sketch code (in which case it must be recompiled regardless). However, there are some use cases where a sketch may be recompiled without code changes:

  • The user is performing an upload operation after performed a compile operation to validate the sketch.
  • The user made changes to other translation units.

For this reason, the compilation caching system has now been extended to cover .ino files as well.

Support platform library dependencies

arduino/arduino-ide#2906, arduino/arduino-cli#3133, arduino/arduino-cli#3142, arduino/arduino-cli#3161, arduino/arduino-cli#3110

An Arduino boards platform may depend on external components. The obvious type of dependency is the toolchain used for operations like compilation and uploading. The platform developer can specify these dependencies in their package index and Boards Manager will automatically install them along with the platform.

Previously, the way for platform developers to install library dependencies along with the platform was bundling those libraries in the platform. That is an ideal approach in the case of a library that is tightly coupled to the architecture of the platform, and thus not usable for other boards. However, it is not ideal in the case where the developer would prefer to maintain the library as a standalone project.

It is now possible for platform developers to specify libraries registered in the Library Manager system as dependencies of their platform:

https://arduino.github.io/arduino-cli/latest/package_index_json-specification/#platforms-definitions

The library dependencies are automatically installed by Boards Manager along with the platform.

Fix missing line break on invalid library message

arduino/arduino-ide#2906, arduino/arduino-cli#3084, arduino/arduino-cli#3039

During sketch compilation, if Arduino CLI finds a folder in a libraries folder that does not contain a valid Arduino library it displays a message to notify the user in the verbose output:

loading library from C:\Users\per\Documents\Arduino\libraries\FooLib: invalid library: no header files found

Previously, if multiple such libraries were found, the messages were printed all on one line instead of a newline being added between each message.

(Thanks @xfpd)

Skip compilation of unused libraries listed in a sketch profile

arduino/arduino-ide#2906, arduino/arduino-cli#3144, arduino/arduino-cli#3085

The build profile system allows the precise management of sketch dependencies by compiling the sketch in an isolated environment which only contains the dependencies specified by metadata included in the sketch project.

Previously, for the sake of efficiency, all library dependencies listed in the profile were compiled, rather than first performing the relatively processing intensive "library discovery" process to determine which libraries are actually required by the sketch. This system turned out to be problematic because libraries directly referenced in the profile may specify their own dependencies, which are also installed into the sketch build environment. This could cause spurious compilation failures in the case where one of these transitive library dependencies which was unused by the sketch was compiled and turned out to be incompatible with the project. This problem is now avoided by pre-populating the list of discoveries with the libraries from the profile, performing the standard library discovery process (which is now much less processing intensive due to all dependencies being prepopulated), then finally skipping compilation of any libraries for which no reference was found in the sketch program by the discovery process.


ⓘ Build profile support is implemented in the Arduino CLI helper tool Arduino IDE uses to compile sketches. Handling of build profiles has not been officially added to the Arduino IDE GUI, so improvements to the build profile system is not relevant to the average Arduino IDE user. However, build profile support in Arduino IDE is available to users through the 3rd party Arduino Sketch Vault extension.


(Thanks @KurtE)


Full changelog here:

https://github.com/arduino/arduino-ide/releases/tag/2.3.9


If you have any questions or feedback please post here in the dedicated forum category for Arduino IDE 2.x:

https://forum.arduino.cc/c/software/ide-2-x/93

If you want to see the list of known issues, work in progress, submit a formal report, or contribute to development, the Arduino IDE 2.x source code is hosted in this public repository:

https://github.com/arduino/arduino-ide

1 Like