-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
#608, #229 Reveal the error location after the failed verify #1064
Conversation
arduino-ide-extension/src/browser/contributions/compiler-errors.ts
Outdated
Show resolved
Hide resolved
arduino-ide-extension/src/browser/contributions/compiler-errors.ts
Outdated
Show resolved
Hide resolved
export const UploadUsingProgrammerFailed = create( | ||
Codes.UploadUsingProgrammer | ||
); | ||
export const BurnBootloaderFailed = create(Codes.BurnBootloader); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to have: burn bootloader is unrelated to the sketch content, IDE2 won't ever get a location, so consider having a different error type.
): ApplicationError.Constructor<number, ErrorInfo[]> { | ||
return ApplicationError.declare( | ||
code, | ||
(message: string, data: ErrorInfo[]) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to have: consider replacing message
with a ServiceError
instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ServiceError
object does not contain sufficient info about the error, so this won't fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be out of scope for this PR, but I think the color used for stderr in the output panel with the "Light (Arduino)" theme must be made lighter.
Here is how it looks in Arduino IDE 1.8.19:
Compare that to the color when using the build from this PR:
At one point, this color in Arduino IDE 1.x was changed to a similar darker red until it was restored to the current color after complaints about readability from the users:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UPDATE: resolved
More of a "nice to have" than something really essential, but I thought I would mention it since I did notice it by chance.
Would it be possible to still get selection highlighting on the text of the line with the error highlighting?
Notice how the selected text on the error line has a yellow background in Arduino IDE 1.8.19:
While there is no visual indication of the same selection on that line when using the build from this PR:
Thank you for trying it out!
I propose opening a follow-up for this. Currently, IDE2 uses the default
Nice catch! Sure. I look into it. |
14b71e4
to
3a17550
Compare
I fixed all outstanding issues and made the PR ready for review. Please verify. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is working great for me.
Thanks for this very valuable advancement Akos!
@davegarthsimpson please review e7ee861 for #1074. I verified it locally, but I would appreciate a double-check. Thank you! Update: here is the link to the module. |
Motivation
compiler_errors_01.mp4
compiler_errors_02.mp4
Experimental
You need to enable the experimental features from the
settings.json
if you want to see "more errors" 😉:Preferences: Open Settings (JSON)
and press Enter,"arduino.compile.experimental": true
to the JSON, save the file if you do not have auto-save enabled, and close thesettings.json
editor.Errors.zip
It should be possible to navigate between the errors.
compiler_errors_03.mp4
Expected behavior:
Next Error
and thePrevious Error
navigation depend on the order of the compiler errors,There is an issue when there are multiple errors in the same line or location. I am working on this. 🚧 #608, #229 Reveal the error location after the failed verify #1064 (comment)Fixed: 4f486cb)compiler_errors_04.mp4
Known issues:
compiler_errors_05.mp4
Open questions:
I will add a preference for this soon.I added a preference: 54e60f6Change description
Other information
Closes #608
Closes #229
Reviewer checklist