Uploaded image for project: 'Swift'
  1. Swift
  2. SR-15280

Remove DiagnosticsEngine and report diagnostics via a callback closure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: SwiftSyntax
    • Labels:
      None

      Description

      As discussed here (https://github.com/apple/swift-format/pull/268#issuecomment-933617735):

      maybe the whole concept of a diagnostic engine/consumers shouldn't live in SwiftSyntax/SwiftSyntaxParser at all? If the parser is the only user of it, it could just take a callback function instead of a diagnostic engine reference, and pass its own lightweight Diagnostic value containing information relevant to a parse issue. Then, clients of SwiftSyntaxParser would translate those into whatever diagnostic engine they wanted to use (for example, swift-format could start using TSC instead).

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ahoppen Alex Hoppen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: