Skip to content
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

The user is not guided to the error line when an error is encountered after verifying/uploading the sketch #608

Closed
91volt opened this issue Nov 15, 2021 · 2 comments · Fixed by #1064
Assignees
Labels
conclusion: resolved Issue was resolved criticality: highest Of highest impact phase: implementation Work is in the implementation phase type: imperfection Perceived defect in any part of project

Comments

@91volt
Copy link

91volt commented Nov 15, 2021

Describe the bug
If an error is encountered when trying to compile or upload, in code editor the user is not guided to the line of code where the first encountered error is located. This is annoying especially when dealing with long code or multiple .ino tab, because the user is not sure on where the error is located, making it difficult to spot and troubleshoot it.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'File'
  2. Go to 'Examples > Strings'
  3. Open 'StringReplace' sketch
  4. Go to line 46
  5. Delete the semicolon ";" at the end of line
  6. Scroll on top of code
  7. Click Verify (or Upload) button on top bar of IDE GUI

Expected behavior
When an error is encountered trying to compile or upload In code editor I expect to be brought with the cursor to the first error found in the workspace.

Screenshots
Actual behaviour - IDE 2 beta12
IDE2_error_highlight_cursor.gif

Expected (Java IDE legacy behaviour)
JAVA_Ide_error_cursor.gif

Desktop (please complete the following information):

  • OS: All
  • Version: 2.0.0 beta12

Additional context
This behavior was consolidated in Java IDE.

@91volt 91volt added phase: implementation Work is in the implementation phase type: imperfection Perceived defect in any part of project labels Nov 15, 2021
@91volt 91volt added priority: high Resolution is a high priority criticality: highest Of highest impact and removed priority: high Resolution is a high priority labels Nov 15, 2021
@91volt 91volt added the topic: language server Related to the Arduino Language Server label Nov 23, 2021
@cmaglie
Copy link
Member

cmaglie commented Dec 9, 2021

The Java IDE parses the output of the compiler to get the line number:
https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/Compiler.java#L499-L621

The most valuable parts are:

  1. the filter to remove the build path from the file paths:
    https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/Compiler.java#L509-L513
    this will transform the ugly:
    /var/folders/3v/64328736489326472384762843762347/T/arduino_sketch/Blink.ino:15
    to a better:
    Blink.ino:15

  2. the regexp to catch the errors and column/lines:

https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/Compiler.java#L137
https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/Compiler.java#L509-L513
https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/Compiler.java#L580-L595

@fstasi fstasi modified the milestones: arduino-ide rc5, arduino-ide rc6 Jan 25, 2022
@fstasi fstasi removed their assignment Jan 25, 2022
@fstasi fstasi assigned kittaakos and unassigned AlbyIanna Jun 8, 2022
@kittaakos kittaakos removed the topic: language server Related to the Arduino Language Server label Jun 9, 2022
@kittaakos
Copy link
Contributor

Upstream issue: eclipse-theia/theia#11284.

@fstasi fstasi removed this from the arduino-ide rc6 milestone Jun 14, 2022
kittaakos pushed a commit that referenced this issue Jun 15, 2022
Closes #608

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jun 15, 2022
Closes #608

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jun 17, 2022
Closes #608
Closes #229

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jun 17, 2022
Closes #608
Closes #229

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jun 17, 2022
Closes #608
Closes #229

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jun 21, 2022
Closes #608
Closes #229

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jun 21, 2022
Closes #608
Closes #229

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved criticality: highest Of highest impact phase: implementation Work is in the implementation phase type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants