Skip to content

Update EEP-47 to reflect non-centralized proposal#2

Open
garazdawi wants to merge 3 commits into
masterfrom
lukas/error-index
Open

Update EEP-47 to reflect non-centralized proposal#2
garazdawi wants to merge 3 commits into
masterfrom
lukas/error-index

Conversation

@garazdawi

@garazdawi garazdawi commented Apr 22, 2025

Copy link
Copy Markdown
Owner

This commit changes the error index to be non-centralized and also irons out a lot of the details on how it is expected to be used with various tools.

Summary by Sourcery

Update EEP-74 to introduce a non-centralized diagnostic index for the Erlang ecosystem, providing a standardized way to catalogue and reference errors, warnings, and information messages across different tools and applications.

New Features:

  • Introduce a non-centralized diagnostic index system for Erlang tools
  • Add new APIs like application:get_diagnostic/1,2 to fetch diagnostic information
  • Implement -explain CLI option for tools to provide detailed diagnostic explanations
  • Create a standardized diagnostic code format with namespace and numeric identifier

Enhancements:

  • Rename 'Erlang Error Index' to 'Erlang Diagnostic Index' to be more inclusive
  • Improve error reporting by adding unique diagnostic codes
  • Standardize diagnostic code format and documentation
  • Add support for generating diagnostic documentation in ExDoc

Documentation:

  • Update EEP-74 documentation to reflect new non-centralized diagnostic index approach
  • Add detailed explanation of diagnostic code structure and recommended usage
  • Include guidelines for creating diagnostic index files

@sourcery-ai

sourcery-ai Bot commented Apr 22, 2025

Copy link
Copy Markdown

Reviewer's Guide by Sourcery

This pull request updates EEP-74 to reflect a shift from a centralized error index to a decentralized diagnostic index. The changes include modifications to the index's structure, implementation details, and integration with various tools in the Erlang ecosystem. The pull request also introduces new APIs, application keys, and CLI arguments to facilitate the use of diagnostic indexes.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
The EEP has been updated to reflect a shift from a centralized error index to a non-centralized diagnostic index.
  • Renamed 'Erlang Error Index' to 'Erlang Diagnostic Index'.
  • Modified the abstract to reflect the inclusion of errors, warnings, and information messages.
  • Updated the rationale to emphasize the benefits of diagnostic codes for searchability and contextual help.
  • Revised the implementation details to describe the structure and location of diagnostic indexes within Erlang applications.
  • Added new APIs (application:get_diagnostic/1,2), application key (documentation_url), and CLI argument (-explain) to facilitate the use of diagnostic indexes.
  • Outlined additions to ExDoc and rebar3 to support diagnostic indexes.
  • Recommended a style for diagnostic code files.
  • Recommended a style for output from tools using diagnostic codes.
  • Discussed alternative solutions, including a centralized catalog and the scope of the index (errors vs. diagnostics).
eeps/eep-0074.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @garazdawi - I've reviewed your changes - here's some feedback:

Overall Comments:

  • It might be helpful to include a section on how to handle conflicts in diagnostic codes between different tools or organizations.
  • Consider adding a section about how this proposal interacts with existing error reporting mechanisms in Erlang/OTP.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread eeps/eep-0074.md Outdated
This commit changes the error index to be non-centralized and
also irons out a lot of the details on how it is expected to
be used with various tools.
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

Successfully merging this pull request may close these issues.

1 participant