Skip to content

Find and Show next error (or warning) #818

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
KurtE opened this issue Feb 8, 2022 · 5 comments · Fixed by #1064
Closed

Find and Show next error (or warning) #818

KurtE opened this issue Feb 8, 2022 · 5 comments · Fixed by #1064
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@KurtE
Copy link

KurtE commented Feb 8, 2022

Is your feature request related to a problem? Please describe.
Lets say I am building a reasonably complex sketch, which often includes multiple files. Either within the same sketch folder and/or
using libraries or core code that I am often working on.

And my build generates some errors or warnings. How do I find the messages within the build window, and then how do I navigate the source files to get to each error?

I know there are some different issues already open on parts of this like:
#229 to display the error lines in red
#118 Which directly related as to maybe click on error and it positions.

Describe the solution you'd like
I would like some User Interface mechanism, such as button and/or menu item and/or hotkey that navigates through the build output and finds the next message (and scrolls it to make it visible) and it locates the source file and likewise makes that line visible in the editor.

Describe alternatives you've considered

These days I do most of my serious development using sublime text. For the Teensy boards on Windows, some of us have a setup (https://github.com/Defragster/Tset) that integrates with sublimetxt's build system. We generate batch files, with settings for which Teensy, and different options, like what type of usb... Then we can do builds. And if there are any compile errors or warnings, I can hit the F4 key to navigate through these errors, which includes both the files of the sketch as well as core or library files.

Additional context
Here shows an example, that I did deliberately. Also shows sublime project that allows me easy quick access to several libraries.
Which is great, but outside of this request.
image

Again not sure if this might be considered a duplicate of others like #118 if so feel free to close, I mainly opened this one as I did not see one that tied the pieces to each other.

@KurtE KurtE added the type: enhancement Proposed improvement label Feb 8, 2022
@per1234 per1234 added the topic: code Related to content of the project itself label Feb 8, 2022
@Lorandil
Copy link

+1 for this feature!

@KurtE
Copy link
Author

KurtE commented Feb 14, 2022

Side note: I believe some of this is related to #608

Hopefully when that one is worked on, the solution will be extended to allow the user to the next error.

@kittaakos
Copy link
Contributor

and then how do I navigate the source files to get to each error?

Unfortunately, when the CLI compiles, it will fail with the first error. The CLI does not provide multiple errors, but the first one; hence the IDE2 team cannot do much at this point.

I will remove the topic: code label (CC: @per1234)


However, if a board was selected and the LS is running, the error navigation is possible like this:

navigate.mp4

Or use the Problems view:

  • Open the Command Paletter with F1,
  • See the errors and click on them if you want to navigate to the error location.
navigate2.mp4

I hope one of them is valuable 👆, and #608 will be avail via the nightly in a couple of days.

@kittaakos kittaakos removed the topic: code Related to content of the project itself label Jun 10, 2022
@kittaakos
Copy link
Contributor

it will fail with the first error. The CLI does not provide multiple errors, but the first one;

No, I was wrong.

sketch_jun1b:6:1: error: 'voisssd' does not name a type; did you mean 'void'?
       voisssd  foo() {
 ^     ~
 void
sketch_jun1b:35:1: error: 'sssvoid' does not name a type; did you mean 'void'?
 sssvoid loop() {
 ^~~~~~~
 void
sketch_jun1b:6:7: error: 'voisssd' does not name a type; did you mean 'void'?
       voisssd  foo() {
       ^~~~~~~
       void
sketch_jun1b:35:1: error: 'sssvoid' does not name a type; did you mean 'void'?
 sssvoid loop() {
 ^~~~~~~
 void
sketch_jun1b:56:1: error: expected unqualified-id before 'this'
 this is also trash
 ^~~~
exit status 1
'voisssd' does not name a type; did you mean 'void'?

It's doable on the IDE2 side.

@kittaakos kittaakos added the topic: code Related to content of the project itself label Jun 10, 2022
@kittaakos kittaakos assigned kittaakos and unassigned 91volt Jun 10, 2022
@kittaakos
Copy link
Contributor

I implemented it as part of #1064. Please try it out, and help us with your feedback. If you have any questions about how to get the build artifacts from GitHub, please ask your questions on the PR.

@per1234 per1234 linked a pull request Jun 19, 2022 that will close this issue
4 tasks
@per1234 per1234 added the conclusion: resolved Issue was resolved label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants