Skip to content

[#1666] Extract warnings from scopes

Motivation and Context

Related Issue(s): #1666 (closed)

The new LIGO LSP was showing only errors to the user, but not diagnostics. This MR fixes this.

Description

The following steps were done:

  1. Diagnostics were moved to a new module to make it easier to maintain.
  2. A new simple_diagnostic type was added, which simplifies a bit all the data contained in a Diagnostic.t with things that are relevant to us. from_simple_diagnostic creates the actual type.
  3. get_diagnostics now contains extract_warning_information which creates a simple_diagnostic.
  4. Tests were added.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Performance improvement (non-breaking change that improves performance)
  • None (change with no changelog)

Changelog

For the LIGO LSP, only errors were being displayed and warnings were skipped. Users will now be able to see warnings as well as errors.

Checklist:

  • Changes follow the existing coding style (use dune @fmt to check).
  • Tests for the changes have been added (for bug fixes / feature).
  • Documentation has been updated.
  • Changelog description has been added (if appropriate).
  • Start titles under ## Changelog section with #### (if appropriate).
  • There is no image or uploaded file in changelog
  • Examples in changed behaviour have been added to the changelog (for breaking change / feature).

Merge request reports