Skip to content

Missing line break on "invalid library" message #3039

@per1234

Description

@per1234

Describe the problem

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

🐛 If multiple such libraries are found, the messages are printed all on one line instead of a newline being added between each message.

To reproduce

$ export ARDUINO_DIRECTORIES_USER="/tmp/FooSketchbook"

$ arduino-cli core install arduino:avr

[...]

$ mkdir -p "$ARDUINO_DIRECTORIES_USER/libraries/FooLib"

$ mkdir "$ARDUINO_DIRECTORIES_USER/libraries/BarLib"

$ arduino-cli sketch new "$ARDUINO_DIRECTORIES_USER/FooSketch"

[...]

$ arduino-cli compile --fqbn arduino:avr:uno "$ARDUINO_DIRECTORIES_USER/FooSketch" --verbose

loading library from C:\Users\per\AppData\Local\Temp\FooSketchbook\libraries\BarLib: invalid library: no header files foundloading library from C:\Users\per\AppData\Local\Temp\FooSketchbook\libraries\FooLib: invalid library: no header files found

[...]

Expected behavior

Each of the "invalid library" messages are printed on a separate line.

For example:

loading library from C:\Users\per\AppData\Local\Temp\FooSketchbook\libraries\BarLib: invalid library: no header files found
loading library from C:\Users\per\AppData\Local\Temp\FooSketchbook\libraries\FooLib: invalid library: no header files found

Arduino CLI version

28dbc33

Operating system

Windows

Operating system version

Windows 11

Additional context

Originally reported at https://forum.arduino.cc/t/i-keep-getting-a-missing-file-compile-error/1412586/10?u=ptillisch

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: build-processRelated to the sketch build processtopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions