atom-ocaml / ocaml-merlin

Linting and autocompletion for Ocaml in Atom
MIT License
24 stars 3 forks source link

Uncaught SyntaxError: Unexpected token O in JSON at position 8 #47

Open MoOx opened 6 years ago

MoOx commented 6 years ago

[Enter steps to reproduce:]

  1. Ocaml merlin is running in infinite mode (spinner in the toolbar) - it's like that since a recent atom update
  2. I located ocaml via which ocaml and forced the bin path in this package config
  3. I disabled this plugin
  4. I re-enabled this plugin & boom

Atom: 1.23.3 x64 Electron: 1.6.15 OS: Mac OS X 10.13.2 Thrown From: ocaml-merlin package 0.14.4

Stack Trace

Uncaught SyntaxError: Unexpected token O in JSON at position 8

At file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.html:1

SyntaxError: Unexpected token O in JSON at position 8
    at JSON.parse (<anonymous>)
    at /packages/ocaml-merlin/lib/merlin.coffee:43:24
    at Interface._onLine (readline.js:245:5)
    at Interface.<anonymous> (readline.js:384:12)
    at Array.forEach (native)
    at Interface._normalWrite (readline.js:383:11)
    at Socket.ondata (readline.js:107:10)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:551:20)

Commands

     -0:35.8.0 settings-view:open (input.hidden-input)
     -0:17.5.0 core:paste (input.hidden-input)
     -0:16.8.0 core:select-all (input.hidden-input)
     -0:16.5.0 core:paste (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.9 
auto-update-packages 1.0.1 
color-picker 2.2.5 
docblockr 0.13.5 
duotone-dark-sea-syntax 2.1.0 
editorconfig 2.2.2 
file-icons 2.1.15 
haskell-grammar 0.4.0 
highlight-selected 0.13.1 
language-apache 1.8.0 
language-babel 2.81.1 
language-docker 1.1.8 
language-gradle 0.0.5 
language-graphql 0.9.0 
language-groovy 0.7.0 
language-haskell 1.17.3 
language-ini 1.19.0 
language-lua 0.9.11 
language-ocaml 1.9.5 
language-reason 0.0.4 
language-rust 0.4.12 
language-scala 1.1.9 
language-swift 0.5.0 
language-thrift 1.0.2 
line-length-break 0.4.0 
linter 2.2.0 
linter-docker 0.3.0 
linter-eslint 8.4.0 
linter-jsonlint 1.3.0 
MagicPython 1.0.12 
merge-conflicts 1.4.5 
multi-wrap-guide 1.1.0 
nuclide 0.275.0 
nuclide-format-js 0.0.43 
nuclide-test-runner-jest 0.3.0 
ocaml-merlin 0.14.4 
one-vibrancy 0.2.0 
package-sync 1.1.0 
pigments 0.40.2 
prettier-atom 0.47.2 
project-manager 3.3.5 
reason-refmt 0.3.3 
set-syntax 0.4.0 
smart-tab-name 1.0.5 
sort-lines 0.18.0 
teletype 0.6.0 
tester 1.4.0 
tester-jest 1.1.8 
tool-bar 1.1.4 
314eter commented 6 years ago

Which version of merlin do you have installed?

MoOx commented 6 years ago

I followed reason doc and ended up with this

$ ocamlmerlin -version 
The Merlin toolkit version 2.5.4, for Ocaml 4.02.3
MoOx commented 6 years ago

Note that I am not sure why but plugin don't work. I still have the infinite tiny spinner saying

Ocaml Merlin running on: *

This for each file open. In the console I use bsb -make-world and it's totally working. Not sure how to debug the state of this plugin :/