Spurious "No such file or directory" errors printed in verbose compile output #2263
Closed
3 tasks done
Labels
conclusion: resolved
Issue was resolved
topic: build-process
Related to the sketch build process
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Milestone
Describe the problem
In order to save the user from the need to manually configure the compiler "search path" for the individual library dependencies of each sketch, Arduino CLI's
compile
command includes a "library discovery" step that automatically finds the paths of the library dependencies and passes them to the compilation command.The following procedure is used recursively for library discovery:
So error messages specific to missing header files are an expected and integral part of the library discovery process internally.
🐛 These expected error message are printed in the verbose output of the
compile
command. Since the users don't know how the library discovery system works internally, these error messages might give them the impression that something went wrong during the compilation process.To reproduce
🐛 A confusing error message appeared in the output even though the compilation was successful and completely normal:
Expected behavior
The expected error messages generated by the
recipe.preproc.macros
command invocations during library discovery are not printed in thecompile
command output.Unexpected error messages generated by the
recipe.preproc.macros
command should still be printed to the command output in order to facilitate troubleshooting.Arduino CLI version
e9c7d86
Operating system
Windows
Operating system version
Windows 11
Additional context
I bisected the regression to 0585435 (does not occur when using the build from the previous commit 9ce2904).
0585435 is described as a refactoring that is not expected to change behavior (#2194), which leads me to believe this was unintentional.
Issue checklist
The text was updated successfully, but these errors were encountered: