crystal-lang-tools / sublime-crystal

Crystal syntax highlighting for Sublime Text
Other
86 stars 18 forks source link

Crystal 0.27.1 does not work #63

Closed ghost closed 5 years ago

ghost commented 5 years ago

Description

This problem causes all features of the plugin to be unavailable. This problem occurs in 0.27.1 version and higher.

Version Info

Sublime:
  Version 3.1.1, Build 3176
---
Crystal:
  Crystal 0.27.1 (2019-02-01)
  LLVM: 6.0.1
  Default target: x86_64-apple-macosx

Console Log

Traceback (most recent call last):
  File "./python3.3/json/decoder.py", line 367, in raw_decode
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/Sublime.app/Contents/MacOS/sublime_plugin.py", line 1072, in run_
    return self.run(edit)
  File "/Users/User/Library/Application Support/Sublime Text 3/Installed Packages/Crystal.sublime-package/crystal_format.py", line 62, in run
  File "./python3.3/json/__init__.py", line 316, in loads
  File "./python3.3/json/decoder.py", line 351, in decode
  File "./python3.3/json/decoder.py", line 369, in raw_decode
ValueError: No JSON object could be decoded

Screenshot

vladfaust commented 5 years ago

I bet it's related to #64

ghost commented 5 years ago

Downgrade

I think we should downgrade the version before the problem is solved. If anyone has encountered this problem, you can refer to my solution.

macOS Brew

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/9d209d6522202badece0143f6fa9d6ef2a1770d4/Formula/crystal.rb
ghost commented 5 years ago

Thanks!