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

[Improvement]: Improve compiler diagnostics #42124

Open
LakshanWeerasinghe opened this issue Feb 7, 2024 · 2 comments
Open

[Improvement]: Improve compiler diagnostics #42124

LakshanWeerasinghe opened this issue Feb 7, 2024 · 2 comments
Assignees
Labels
Area/Diagnostics Issues related Diagnostics reported by the Compiler. #Compiler Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Improvement

Comments

@LakshanWeerasinghe
Copy link
Contributor

Description

The current format of compiler error diagnostics in Ballerina could be enhanced to provide more helpful information to users. Currently, it outputs errors in the following format:

ERROR [filename:(startPosition, endPosition)] error message

This format lacks detailed information about the area of the error code, making it less user-friendly compared to other compilers like Rust. By enhancing the output to include the area of the error code, users will have a clearer understanding of where the error occurred, which can significantly improve the user experience.

Describe your problem(s)

No response

Describe your solution(s)

  • Modify the compiler error diagnostics format to include the area of the error code.

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Feb 7, 2024
@LakshanWeerasinghe LakshanWeerasinghe added Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Area/Diagnostics Issues related Diagnostics reported by the Compiler. #Compiler and removed needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Feb 7, 2024
@RadCod3 RadCod3 self-assigned this Feb 19, 2024
@RadCod3
Copy link

RadCod3 commented Feb 21, 2024

21/02/2024 Update

@RadCod3
Copy link

RadCod3 commented Feb 28, 2024

Tasks

  • Improve Diagnostic Rendering using Diagnostic API and Syntax API. Improved diagnostic rendering #42236
  • Add a bal explain <error_code> command to explain error codes.
  • Prepare Diagnostic structure guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Diagnostics Issues related Diagnostics reported by the Compiler. #Compiler Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Improvement
Projects
None yet
Development

No branches or pull requests

3 participants