-
- Notifications
You must be signed in to change notification settings - Fork 427
Open
Labels
topic: build-processRelated to the sketch build processRelated to the sketch build processtopic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
Describe the problem
When -fdiagnostics-color=always
is added as part of the build extra flags, the library resolver/processor is unable to resolve any libraries.
This is because, if I copy the output to the clipboard, the resolver seems to include the ANSI escape code in the library name:

To reproduce
with an example sketch such as
#include <Arduino.h> #include <SPI.h> void setup(void){ Serial.begin(115200); Serial.println("HI!"); } void loop(void){ }
run
arduino-cli compile -v \ --build-property "compiler.c.extra_flags=-fdiagnostics-color=always" \ --build-property "compiler.cpp.extra_flags=-fdiagnostics-color=always" \ --fqbn ArduinoCore-avr:avr:uno \ testArduinoCliBug.ino
Expected behavior
The ANSI sequence should be escaped/removed from the library
Arduino CLI version
r2843.20e315c2f
Operating system
Linux
Operating system version
Arch Linux
Additional context
From initial code research the most likely candidate for the fault is in internal/arduino/builder/internal/detector/detector.go
, possibly in the function IncludesFinderWithRegExp
or the thing calling it.
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
Labels
topic: build-processRelated to the sketch build processRelated to the sketch build processtopic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project