Skip to content

Failure to create ignore fix #4455

Closed
Closed

Description

@DanTup

Split from #4421:

console.ts:137 [Extension Host] Failed to build Ignore fix for diagnostics. Please report the information below in the Dart-Code/Dart-Code repo on GitHub.
T @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
N @ rpcProtocol.ts:455
M @ rpcProtocol.ts:440
H @ rpcProtocol.ts:370
G @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:161
invoke @ event.ts:718
deliver @ event.ts:926
fire @ event.ts:887
fire @ ipc.net.ts:671
ne.onmessage @ localProcessExtensionHost.ts:615
console.ts:137 [Extension Host] Original diagnostics:
[
  {
    "severity": "Error",
    "message": "Classes can only extend other classes.\nTry specifying a different superclass, or removing the extends clause.",
    "range": [
      {
        "line": 88,
        "character": 44
      },
      {
        "line": 88,
        "character": 55
      }
    ],
    "source": "dart",
    "code": {
      "value": "extends_non_class",
      "target": {
        "$mid": 1,
        "fsPath": "/diagnostics/extends_non_class",
        "path": "/diagnostics/extends_non_class",
        "scheme": "https",
        "authority": "dart.dev"
      }
    }
  },
  {
    "severity": "Information",
    "message": "Missing a newline at the end of the file.\nTry adding a newline at the end of the file.",
    "range": [
      {
        "line": 89,
        "character": 1
      },
      {
        "line": 89,
        "character": 2
      }
    ],
    "source": "dart",
    "code": {
      "value": "eol_at_end_of_file",
      "target": {
        "$mid": 1,
        "fsPath": "/linter/lints/eol_at_end_of_file.html",
        "path": "/linter/lints/eol_at_end_of_file.html",
        "scheme": "https",
        "authority": "dart-lang.github.io"
      }
    }
  },
  {
    "severity": "Warning",
    "message": "Avoid using dynamic type.\n",
    "range": [
      {
        "line": 88,
        "character": 36
      },
      {
        "line": 88,
        "character": 55
      }
    ],
    "source": "dart",
    "code": {
      "value": "avoid-dynamic",
      "target": {
        "$mid": 1,
        "fsPath": "/docs/individuals/rules/common/avoid-dynamic",
        "path": "/docs/individuals/rules/common/avoid-dynamic",
        "scheme": "https",
        "authority": "dcm.dev"
      }
    }
  },
  {
    "severity": "Warning",
    "message": "File name does not match with first class name.\n",
    "range": [
      {
        "line": 88,
        "character": 6
      },
      {
        "line": 88,
        "character": 35
      }
    ],
    "source": "dart",
    "code": {
      "value": "prefer-match-file-name",
      "target": {
        "$mid": 1,
        "fsPath": "/docs/individuals/rules/common/prefer-match-file-name",
        "path": "/docs/individuals/rules/common/prefer-match-file-name",
        "scheme": "https",
        "authority": "dcm.dev"
      }
    }
  }
]

Document has 90 lines
T @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
N @ rpcProtocol.ts:455
M @ rpcProtocol.ts:440
H @ rpcProtocol.ts:370
G @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:161
invoke @ event.ts:718
deliver @ event.ts:926
fire @ event.ts:887
fire @ ipc.net.ts:671
ne.onmessage @ localProcessExtensionHost.ts:615
console.ts:137 [Extension Host] After CodeAction request diagnostics:
[
  {
    "severity": "Error",
    "message": "Classes can only extend other classes.\nTry specifying a different superclass, or removing the extends clause.",
    "range": [
      {
        "line": 88,
        "character": 44
      },
      {
        "line": 88,
        "character": 55
      }
    ],
    "source": "dart",
    "code": {
      "value": "extends_non_class",
      "target": {
        "$mid": 1,
        "fsPath": "/diagnostics/extends_non_class",
        "path": "/diagnostics/extends_non_class",
        "scheme": "https",
        "authority": "dart.dev"
      }
    }
  },
  {
    "severity": "Information",
    "message": "Missing a newline at the end of the file.\nTry adding a newline at the end of the file.",
    "range": [
      {
        "line": 89,
        "character": 1
      },
      {
        "line": 89,
        "character": 2
      }
    ],
    "source": "dart",
    "code": {
      "value": "eol_at_end_of_file",
      "target": {
        "$mid": 1,
        "fsPath": "/linter/lints/eol_at_end_of_file.html",
        "path": "/linter/lints/eol_at_end_of_file.html",
        "scheme": "https",
        "authority": "dart-lang.github.io"
      }
    }
  },
  {
    "severity": "Warning",
    "message": "Avoid using dynamic type.\n",
    "range": [
      {
        "line": 88,
        "character": 36
      },
      {
        "line": 88,
        "character": 55
      }
    ],
    "source": "dart",
    "code": {
      "value": "avoid-dynamic",
      "target": {
        "$mid": 1,
        "fsPath": "/docs/individuals/rules/common/avoid-dynamic",
        "path": "/docs/individuals/rules/common/avoid-dynamic",
        "scheme": "https",
        "authority": "dcm.dev"
      }
    }
  },
  {
    "severity": "Warning",
    "message": "File name does not match with first class name.\n",
    "range": [
      {
        "line": 88,
        "character": 6
      },
      {
        "line": 88,
        "character": 35
      }
    ],
    "source": "dart",
    "code": {
      "value": "prefer-match-file-name",
      "target": {
        "$mid": 1,
        "fsPath": "/docs/individuals/rules/common/prefer-match-file-name",
        "path": "/docs/individuals/rules/common/prefer-match-file-name",
        "scheme": "https",
        "authority": "dcm.dev"
      }
    }
  }
]

Document has 88 lines: Error: Illegal value for `line`
T @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
N @ rpcProtocol.ts:455
M @ rpcProtocol.ts:440
H @ rpcProtocol.ts:370
G @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:161
invoke @ event.ts:718
deliver @ event.ts:926
fire @ event.ts:887
fire @ ipc.net.ts:671
ne.onmessage @ localProcessExtensionHost.ts:615
console.ts:137 [Extension Host] Attempt to build Ignore fixes was after cancellation

Activity

  1. added this to the v3.62.0 milestone on Mar 23, 2023
  2. DanTup commented on Mar 23, 2023

    @DanTup
    MemberAuthor

    Document has 90 lines
    Document has 88 lines

    The document was modified during the request (I deleted the last few lines), which meant we were trying to map with a stale number. We could just check the doc was not updated during this period, but given the server is providing these I think it's better to just remove this functionality (it'll only affect very old SDKs and is a minor feature) instead.

  3. added a commit that references this issue on Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions