Atom-ide-ui: Diagnostics messages changed with no update to atom-ide-diagnostics

Created on 24 Oct 2017  路  4Comments  路  Source: facebookarchive/atom-ide-ui

Description

It appears that the structure of the diagnostics messages coming from atom-ide-diagnostics has changed with no corresponding update to the version of the service published by atom-ide-diagnostics.

Expected Behavior

API behavior should stay the same unless a version change is made.

Actual Behavior

In [email protected] messages published by atom-ide-diagnostics had this structure:

{
 "scope": "file",
 "providerName": "ESLint",
 "type": "Error",
 "filePath": "C:\\Users\\abneyl\\Documents\\GitHub\\atom-minimap-linter\\lib\\helpers.js",
 "text": "Trailing spaces not allowed. (no-trailing-spaces)",
 "range": {
  "start": {
   "row": 24,
   "column": 24
  },
  "end": {
   "row": 24,
   "column": 26
  }
 },
 "fix": {
  "oldRange": {
   "start": {
    "row": 24,
    "column": 24
   },
   "end": {
    "row": 24,
    "column": 26
   }
  },
  "newText": ""
 }
}

[email protected] through [email protected] had the same structure.

[email protected] changed to the following structure:

{
 "providerName": "ESLint",
 "type": "Error",
 "filePath": "C:\\Users\\abneyl\\Documents\\GitHub\\atom-minimap-linter\\lib\\helpers.js",
 "text": "Trailing spaces not allowed. (no-trailing-spaces)",
 "range": {
  "start": {
   "row": 24,
   "column": 24
  },
  "end": {
   "row": 24,
   "column": 26
  }
 },
 "fix": {
  "oldRange": {
   "start": {
    "row": 24,
    "column": 24
   },
   "end": {
    "row": 24,
    "column": 26
   }
  },
  "newText": ""
 },
 "actions": []
}

Note the lack of the scope attribute which was used in https://github.com/AtomLinter/atom-minimap-linter/pull/23 to add support for atom-ide-ui. (All messages now show as invalid for the current editor, causing https://github.com/AtomLinter/atom-minimap-linter/issues/29.)

I'll be updating atom-minimap-linter to accommodate the new message structure, but in the future that service needs to be update to note the changes when attributes are removed.

Versions

  • Atom: v1.22.0-beta1
  • Client OS: Windows 10 x64
  • atom-ide-ui: v0.5.2

All 4 comments

Ah, my bad! Those messages aren't totally meant to be consumed externally so I forgot that it was being used by the linter minimap. Sorry! 馃檲

Will definitely keep this in mind, as we'll likely try to deprecate that particular message API format to use something more consistent with the other Linter messages internally as well.

Removing checking that actually allows me to use the exact same code for linter and atom-ide-ui, I filed the issue to bring it to your attention though 馃槈.

Fix published in [email protected] in case anyone comes here from searching 馃槈.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rianneogi picture rianneogi  路  6Comments

ghost picture ghost  路  3Comments

gregorygenova picture gregorygenova  路  3Comments

tiagonervis picture tiagonervis  路  4Comments

beriberikix picture beriberikix  路  3Comments