Skip to content

IDE-Friendly Compile Error Paths from Local Header Files #965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ecorm opened this issue Sep 22, 2020 · 2 comments
Closed

IDE-Friendly Compile Error Paths from Local Header Files #965

ecorm opened this issue Sep 22, 2020 · 2 comments

Comments

@ecorm
Copy link

ecorm commented Sep 22, 2020

Bug Report

When arduino-cli compile prints compile errors from local header files, it displays the path from the temporary /tmp/arduino-sketch-FOO directory of the sketch being compiled. By "local header files", I mean header files that live alongside the foo.ino sketch file, as well as those under the src subdirectory.

My IDE (QtCreator) parses compiler errors and displays them in a user-friendly way. When I click on these parsed error messages, it conveniently takes me to the file and line that produced the error.

Unfortunately, arduino-cli defeats the convenience of these parsed error messages when they originate from local header files. When I click on them, it takes me to the header file that's been copied to the /tmp/arduino-sketch-FOO directory instead of the original header file directory.

Current behavior

arduino-ide compile
...
In file included from /home/me/myproject/myproject.ino:10:0:
/tmp/arduino-sketch-5AA431FD41D5B5DF00FF21C5123C1125/sketch/header.h:100:5: error: 'printeff' was not declared in this scope

Expected behavior

I would expect arduino-ide compile to substitute /tmp/arduino-sketch-5AA431FD41D5B5DF00FF21C5123C1125/sketch/header.h in the error message with the original path of the header file: /home/me/myproject/header.h

Environment

arduino-cli Version: 0.13.0 Commit: 693a045
Linux Mint 20 Cinnamon

@matthijskooijman
Copy link
Collaborator

Note that the Java IDE already has an output post-processing step that does pretty much this, though I couldn't find the code quickly just now (I think it's in a bit of an obscure place in the code, or maybe not even in the Java code but in Arduino-builder?).

@cmaglie
Copy link
Member

cmaglie commented Mar 17, 2021

Fixed by #1224

@cmaglie cmaglie closed this as completed Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants