lukehoban / atom-ide-flow

Atom IDE support for Flow
MIT License
87 stars 17 forks source link

Uncaught SyntaxError: Unexpected end of input #18

Closed shbm closed 9 years ago

shbm commented 9 years ago

[Enter steps to reproduce below:]

  1. open a project
/* @flow */

function foo(x) {
  return x*10;
}

// This is fine, because we're passing a number now
foo('shubham');

Atom Version: 0.188.0 System: linux 3.13.0-48-generic Thrown From: ide-flow package, v0.2.0

Stack Trace

Uncaught SyntaxError: Unexpected end of input

At file:///usr/share/atom/resources/app/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22%2Fhome%2Fshbm%22%7D%5D%2C%22bootstrapScript%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp%2Fsrc%2Fwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22appVersion%22%3A%220.188.0%22%2C%22shellLoadTime%22%3A1691%2C%22initialPaths%22%3A%5B%22%2Fhome%2Fshbm%22%5D%7D:0

SyntaxError: Unexpected end of input
  at Object.parse (native)
  at Object.module.exports.autocompleteSync (/home/shbm/.atom/packages/ide-flow/lib/util-flow-command.coffee:103:19)
  at Object.module.exports.requestHandler (/home/shbm/.atom/packages/ide-flow/lib/flow-autocomplete-provider.coffee:17:31)
  at /home/shbm/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:148:45
  at Array.forEach (native)
  at AutocompleteManager.module.exports.AutocompleteManager.getSuggestionsFromProviders (/home/shbm/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:131:15)
  at AutocompleteManager.getSuggestionsFromProviders (/home/shbm/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:1:1)
  at AutocompleteManager.module.exports.AutocompleteManager.findSuggestions (/home/shbm/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:125:6)
  at /home/shbm/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:1:1

Commands

  2x -30:50.6 ide-flow:check (atom-workspace.workspace.scrollbars-visible-always.theme-base16-tomorrow-dark-theme.theme-one-dark-ui)
     -30:42.4 core:save (atom-text-editor.editor.is-focused)
     -30:42.4 ide-flow:check (atom-workspace.workspace.scrollbars-visible-always.theme-base16-tomorrow-dark-theme.theme-one-dark-ui)
     -30:42.0 editor:newline (atom-text-editor.editor.is-focused)
     -30:40.3 core:save (atom-text-editor.editor.is-focused)
     -30:40.3 ide-flow:check (atom-workspace.workspace.scrollbars-visible-always.theme-base16-tomorrow-dark-theme.theme-one-dark-ui)
     -30:38.7 editor:newline (atom-text-editor.editor.is-focused)
     -30:38.2 core:save (atom-text-editor.editor.is-focused)
     -30:38.2 ide-flow:check (atom-workspace.workspace.scrollbars-visible-always.theme-base16-tomorrow-dark-theme.theme-one-dark-ui)
  2x -30:37.4 editor:newline (atom-text-editor.editor.is-focused)
     -30:36.9 core:save (atom-text-editor.editor.is-focused)
     -30:36.9 ide-flow:check (atom-workspace.workspace.scrollbars-visible-always.theme-base16-tomorrow-dark-theme.theme-one-dark-ui)
  2x -30:30.9 editor:newline (atom-text-editor.editor.is-focused)
  8x -30:27.8 core:backspace (atom-text-editor.editor.is-focused)
  3x -30:03.0 editor:newline (atom-text-editor.editor.is-focused)
  7x -30:01.2 core:backspace (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "base16-tomorrow-dark-theme"
    ],
    "audioBeep": false
  },
  "ide-flow": {
    "flowPath": "/home/shbm/Downloads/flow//flow\n"
  }
}

Installed Packages

# User
autocomplete-plus, v2.7.0
ide-flow, v0.2.0
minimap, v4.6.0

# Dev
No dev packages
lukehoban commented 9 years ago

I believe this should be fixed with c4b4ead.