crystal-lang-tools / scry Goto Github PK
View Code? Open in Web Editor NEWScry is a code analysis server for https://crystal-lang.org
License: MIT License
Scry is a code analysis server for https://crystal-lang.org
License: MIT License
When I try to see a diagnostic for an untitled file I get this:
Unable to open 'Untitled-1': Invalid file resource (file://untitled-1).
So, I think scry is using URI in a wrong place here
sh darwin_build.sh
Error in ./src/scry.cr:1: while requiring "./scry/*"
require "./scry/*"
^
in ./src/scry/analyzer.cr:4: while requiring "compiler/crystal/**"
require "compiler/crystal/**"
^
in /usr/local/Cellar/crystal-lang/0.19.4_1/src/compiler/crystal/program.cr:1: while requiring "llvm"
require "llvm"
^
in /usr/local/Cellar/crystal-lang/0.19.4_1/src/llvm.cr:1: while requiring "./llvm/**"
require "./llvm/**"
^
in /usr/local/Cellar/crystal-lang/0.19.4_1/src/llvm/di_builder.cr:1: while requiring "./lib_llvm"
require "./lib_llvm"
^
in /usr/local/Cellar/crystal-lang/0.19.4_1/src/llvm/lib_llvm.cr:3: expanding macro
{% begin %}
^
in /usr/local/Cellar/crystal-lang/0.19.4_1/src/llvm/lib_llvm.cr:6: error executing command: [ -n "$LLVM_CONFIG" ] && command -v "$LLVM_CONFIG" || command -v llvm-config-3.9 || command -v llvm-config39 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.9*) command -v llvm-config;; *) false;; esac)) || command -v llvm-config-3.8 || command -v llvm-config38 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.8*) command -v llvm-config;; *) false;; esac)) || command -v llvm-config-3.6 || command -v llvm-config36 || command -v llvm-config-3.5 || command -v llvm-config35 || command -v llvm-config
, got exit status 1
`[ -n "$LLVM_CONFIG" ] && command -v "$LLVM_CONFIG" || \
^
Currently Scry uses a huge amout of memory because the crystal compiler is embedded on it.
Scry analyze files every time a file is saved without checking if the file have been truly changed increasing even more the footprint (aprox. over 300 MB RAM on Linux)
Also maybe we can use external crystal
processes instead of using require "compiler/crystal/**"
('cause, compiler is very heavy) I think using processes will free memory easier and improve Scry performance.
Also new features as types on hover and refactoring could be easier to implement.
Currently the master branch shows build error
.
TravisCI ouputs:
/home/travis/.rvm/gems/ruby-2.2.7/gems/octokit-4.6.2/lib/octokit/client/releases.rb:86:in `initialize': No such file or directory @ rb_sysopen - bin/linux/scry (Errno::ENOENT)
from /home/travis/.rvm/gems/ruby-2.2.7/gems/octokit-4.6.2/lib/octokit/client/releases.rb:86:in `new'
from /home/travis/.rvm/gems/ruby-2.2.7/gems/octokit-4.6.2/lib/octokit/client/releases.rb:86:in `upload_asset'
from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.8.40/lib/dpl/provider/releases.rb:135:in `upload_file'
from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.8.40/lib/dpl/provider/releases.rb:116:in `block in push_app'
from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.8.40/lib/dpl/provider/releases.rb:107:in `each'
from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.8.40/lib/dpl/provider/releases.rb:107:in `push_app'
from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.8.40/lib/dpl/provider.rb:154:in `block in deploy'
from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.8.40/lib/dpl/cli.rb:41:in `fold'
from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.8.40/lib/dpl/provider.rb:154:in `deploy'
from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.8.40/lib/dpl/cli.rb:32:in `run'
from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.8.40/lib/dpl/cli.rb:7:in `run'
from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.8.40/bin/dpl:5:in `<top (required)>'
from /home/travis/.rvm/gems/ruby-2.2.7/bin/dpl:22:in `load'
from /home/travis/.rvm/gems/ruby-2.2.7/bin/dpl:22:in `<main>'
failed to deploy
/cc @keplersj
VSCode will send an inmemory:// file for new files are files that are opened as part of a git diff.
Two problems arise:
To solve #1, we may want to only run the parser analyzer over inmemory files (and offer them completion services, when those are available).
To solve #2, we should send a clean diagnostic report whenever we close an inmemory file.
On ST3 to reproduce this issue try scry diagnostics using LSP plugin and disabling auto_format
on crystal package
As you can see ST3 is showing just the first error found and this error keep stuck in editor
Ref: #34
Add support to find classes and modules implementation
This is not supported by crystal tool implementations
yet
I guess we can use something like symbol search to get class and modules location,
@crystal-lang-tools/scry WDYT?
Related to #109
So I've got Scry working sometime in Neovim!!
Sometime I have a weird bug, where restarting the editor and scry doesn't resolve.
The log is: (I've just removed the huuuuge dependency graph line)
I, [2018-03-10 02:15:44 -08:00 #3622] INFO -- : Scry is looking into your code...
D, [2018-03-10 02:15:44 -08:00 #3622] DEBUG -- : Content-Length: 413
D, [2018-03-10 02:15:44 -08:00 #3622] DEBUG -- :
D, [2018-03-10 02:15:44 -08:00 #3622] DEBUG -- : {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"completion":{"completionItem":{"commitCharactersSupport":null,"documentationFormat":null,"snippetSupport":false},"dynamicRegistration":null}}},"initializationOptions":null,"processId":3611,"rootPath":"/home/lesell_b/tests/crystal/dbus/pure_dbus","rootUri":"file:///home/lesell_b/tests/crystal/dbus/pure_dbus","trace":"off"},"id":8}
D, [2018-03-10 02:15:44 -08:00 #3622] DEBUG -- : initialize
D, [2018-03-10 02:15:44 -08:00 #3622] DEBUG -- : Starting to build dependancy graph for these paths: /home/lesell_b/tests/crystal/dbus/pure_dbus/lib
lib
/usr/lib/crystal
/home/lesell_b/tests/crystal/dbus/pure_dbus
D, [2018-03-10 02:15:44 -08:00 #3622] DEBUG -- : Content SEND: Content-Length: 244
{"jsonrpc":"2.0","id":8,"result":{"capabilities":{"textDocumentSync":1,"documentFormattingProvider":true,"definitionProvider":true,"documentSymbolProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":[".","\"","/"]}}}}
D, [2018-03-10 02:15:44 -08:00 #3622] DEBUG -- : Content-Length: 327
D, [2018-03-10 02:15:44 -08:00 #3622] DEBUG -- :
D, [2018-03-10 02:15:44 -08:00 #3622] DEBUG -- : {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"crystal","text":"class Foo\n def self.bar(io : IO)\n end\nend\n\nclass Bar\n def self.bla\n 3\n end\n\n def ljkh\n 2\n end\nend\n\nBar.new.","uri":"file:///home/lesell_b/tests/crystal/dbus/pure_dbus/src/test.cr","version":0}}}
D, [2018-03-10 02:15:44 -08:00 #3622] DEBUG -- : textDocument/didOpen
D, [2018-03-10 02:15:45 -08:00 #3622] DEBUG -- : Content SEND: Content-Length: 3013
{"jsonrpc":"2.0","error":{"code":-32001,"message":"expecting any of these tokens: IDENT, CONST, +, -, *, /, %, |, &, ^, **, <<, <, <=, ==, !=, =~, !~, >>, >, >=, <=>, ===, [], []=, []?, [ (not 'EOF')","data":["/usr/lib/crystal/compiler/crystal/syntax/lexer.cr:2751:9 in 'raise'","/usr/lib/crystal/compiler/crystal/syntax/lexer.cr:2750:5 in 'raise'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:183:11 in 'check'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:606:11 in 'parse_atomic_method_suffix'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:558:7 in 'parse_atomic_with_method'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:549:9 in 'parse_prefix'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:533:5 in 'parse_pow'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:532:5 in 'parse_mul_or_div'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:498:7 in 'parse_add_or_sub'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:493:5 in 'parse_shift'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:492:5 in 'parse_logical_and'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:491:5 in 'parse_logical_or'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:490:5 in 'parse_cmp'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:489:5 in 'parse_equality'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:488:5 in 'parse_and'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:487:5 in 'parse_or'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:440:7 in 'parse_range'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:413:7 in 'parse_question_colon'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:304:7 in 'parse_op_assign'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:300:5 in 'parse_op_assign'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:236:7 in 'parse_expression'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:113:7 in 'parse_multi_assign'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:102:9 in 'parse_expressions_internal'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:3784:7 in 'parse_expressions'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:73:21 in 'parse'","/usr/lib/crystal/compiler/crystal/syntax/parser.cr:16:7 in 'parse'","/home/lesell_b/Projects/opensource/scry/src/scry/completion/method_db.cr:27:11 in 'generate'","/home/lesell_b/Projects/opensource/scry/src/scry/workspace.cr:27:7 in 'put_file'","/home/lesell_b/Projects/opensource/scry/src/scry/context.cr:128:7 in 'dispatchNotification'","/home/lesell_b/Projects/opensource/scry/src/scry/context.cr:39:7 in 'dispatch'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:23:19 in 'start'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:40:1 in '__crystal_main'","/usr/lib/crystal/crystal/main.cr:11:3 in '_crystal_main'","/usr/lib/crystal/crystal/main.cr:112:5 in 'main_user_code'","/usr/lib/crystal/crystal/main.cr:101:7 in 'main'","/usr/lib/crystal/crystal/main.cr:135:3 in 'main'","__libc_start_main","_start","???"]}}
D, [2018-03-10 02:15:45 -08:00 #3622] DEBUG -- : Content-Length: 196
D, [2018-03-10 02:15:45 -08:00 #3622] DEBUG -- :
D, [2018-03-10 02:15:45 -08:00 #3622] DEBUG -- : {"jsonrpc":"2.0","method":"textDocument/completion","params":{"position":{"character":8,"line":15},"textDocument":{"uri":"file:///home/lesell_b/tests/crystal/dbus/pure_dbus/src/test.cr"}},"id":13}
D, [2018-03-10 02:15:45 -08:00 #3622] DEBUG -- : textDocument/completion
D, [2018-03-10 02:15:45 -08:00 #3622] DEBUG -- : Content SEND: Content-Length: 882
{"jsonrpc":"2.0","error":{"code":-32001,"message":"Missing hash key: \"/home/lesell_b/tests/crystal/dbus/pure_dbus/src/test.cr\"","data":["/usr/lib/crystal/hash.cr:0:9 in 'fetch'","/usr/lib/crystal/hash.cr:62:5 in '[]'","/home/lesell_b/Projects/opensource/scry/src/scry/workspace.cr:44:7 in 'get_file'","/home/lesell_b/Projects/opensource/scry/src/scry/context.cr:58:36 in 'dispatchRequest'","/home/lesell_b/Projects/opensource/scry/src/scry/context.cr:33:9 in 'dispatch'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:23:19 in 'start'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:40:1 in '__crystal_main'","/usr/lib/crystal/crystal/main.cr:11:3 in '_crystal_main'","/usr/lib/crystal/crystal/main.cr:112:5 in 'main_user_code'","/usr/lib/crystal/crystal/main.cr:101:7 in 'main'","/usr/lib/crystal/crystal/main.cr:135:3 in 'main'","__libc_start_main","_start","???"]}}
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : Content-Length: 358
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- :
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":null,"rangeLength":null,"text":"class Foo\n def self.bar(io : IO)\n end\nend\n\nclass Bar\n def self.bla\n 3\n end\n\n def ljkh\n 2\n end\nend\n\nBar.new"}],"textDocument":{"uri":"file:///home/lesell_b/tests/crystal/dbus/pure_dbus/src/test.cr","version":1}}}
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : textDocument/didChange
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : Content SEND: Content-Length: 891
{"jsonrpc":"2.0","error":{"code":-32001,"message":"Missing hash key: \"/home/lesell_b/tests/crystal/dbus/pure_dbus/src/test.cr\"","data":["/usr/lib/crystal/hash.cr:0:9 in 'fetch'","/usr/lib/crystal/hash.cr:62:5 in '[]'","/home/lesell_b/Projects/opensource/scry/src/scry/workspace.cr:33:17 in 'update_file'","/home/lesell_b/Projects/opensource/scry/src/scry/context.cr:138:7 in 'dispatchNotification'","/home/lesell_b/Projects/opensource/scry/src/scry/context.cr:39:7 in 'dispatch'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:23:19 in 'start'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:40:1 in '__crystal_main'","/usr/lib/crystal/crystal/main.cr:11:3 in '_crystal_main'","/usr/lib/crystal/crystal/main.cr:112:5 in 'main_user_code'","/usr/lib/crystal/crystal/main.cr:101:7 in 'main'","/usr/lib/crystal/crystal/main.cr:135:3 in 'main'","__libc_start_main","_start","???"]}}
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : Content-Length: 196
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- :
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : {"jsonrpc":"2.0","method":"textDocument/completion","params":{"position":{"character":7,"line":15},"textDocument":{"uri":"file:///home/lesell_b/tests/crystal/dbus/pure_dbus/src/test.cr"}},"id":14}
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : textDocument/completion
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : Content SEND: Content-Length: 882
{"jsonrpc":"2.0","error":{"code":-32001,"message":"Missing hash key: \"/home/lesell_b/tests/crystal/dbus/pure_dbus/src/test.cr\"","data":["/usr/lib/crystal/hash.cr:0:9 in 'fetch'","/usr/lib/crystal/hash.cr:62:5 in '[]'","/home/lesell_b/Projects/opensource/scry/src/scry/workspace.cr:44:7 in 'get_file'","/home/lesell_b/Projects/opensource/scry/src/scry/context.cr:58:36 in 'dispatchRequest'","/home/lesell_b/Projects/opensource/scry/src/scry/context.cr:33:9 in 'dispatch'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:23:19 in 'start'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:40:1 in '__crystal_main'","/usr/lib/crystal/crystal/main.cr:11:3 in '_crystal_main'","/usr/lib/crystal/crystal/main.cr:112:5 in 'main_user_code'","/usr/lib/crystal/crystal/main.cr:101:7 in 'main'","/usr/lib/crystal/crystal/main.cr:135:3 in 'main'","__libc_start_main","_start","???"]}}
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : Content-Length: 359
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- :
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":null,"rangeLength":null,"text":"class Foo\n def self.bar(io : IO)\n end\nend\n\nclass Bar\n def self.bla\n 3\n end\n\n def ljkh\n 2\n end\nend\n\nBar.new."}],"textDocument":{"uri":"file:///home/lesell_b/tests/crystal/dbus/pure_dbus/src/test.cr","version":2}}}
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : textDocument/didChange
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : Content SEND: Content-Length: 891
{"jsonrpc":"2.0","error":{"code":-32001,"message":"Missing hash key: \"/home/lesell_b/tests/crystal/dbus/pure_dbus/src/test.cr\"","data":["/usr/lib/crystal/hash.cr:0:9 in 'fetch'","/usr/lib/crystal/hash.cr:62:5 in '[]'","/home/lesell_b/Projects/opensource/scry/src/scry/workspace.cr:33:17 in 'update_file'","/home/lesell_b/Projects/opensource/scry/src/scry/context.cr:138:7 in 'dispatchNotification'","/home/lesell_b/Projects/opensource/scry/src/scry/context.cr:39:7 in 'dispatch'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:23:19 in 'start'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:40:1 in '__crystal_main'","/usr/lib/crystal/crystal/main.cr:11:3 in '_crystal_main'","/usr/lib/crystal/crystal/main.cr:112:5 in 'main_user_code'","/usr/lib/crystal/crystal/main.cr:101:7 in 'main'","/usr/lib/crystal/crystal/main.cr:135:3 in 'main'","__libc_start_main","_start","???"]}}
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : Content-Length: 196
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- :
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : {"jsonrpc":"2.0","method":"textDocument/completion","params":{"position":{"character":8,"line":15},"textDocument":{"uri":"file:///home/lesell_b/tests/crystal/dbus/pure_dbus/src/test.cr"}},"id":15}
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : textDocument/completion
D, [2018-03-10 02:15:46 -08:00 #3622] DEBUG -- : Content SEND: Content-Length: 882
{"jsonrpc":"2.0","error":{"code":-32001,"message":"Missing hash key: \"/home/lesell_b/tests/crystal/dbus/pure_dbus/src/test.cr\"","data":["/usr/lib/crystal/hash.cr:0:9 in 'fetch'","/usr/lib/crystal/hash.cr:62:5 in '[]'","/home/lesell_b/Projects/opensource/scry/src/scry/workspace.cr:44:7 in 'get_file'","/home/lesell_b/Projects/opensource/scry/src/scry/context.cr:58:36 in 'dispatchRequest'","/home/lesell_b/Projects/opensource/scry/src/scry/context.cr:33:9 in 'dispatch'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:23:19 in 'start'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:40:1 in '__crystal_main'","/usr/lib/crystal/crystal/main.cr:11:3 in '_crystal_main'","/usr/lib/crystal/crystal/main.cr:112:5 in 'main_user_code'","/usr/lib/crystal/crystal/main.cr:101:7 in 'main'","/usr/lib/crystal/crystal/main.cr:135:3 in 'main'","__libc_start_main","_start","???"]}}
D, [2018-03-10 02:15:47 -08:00 #3622] DEBUG -- : Content-Length: 148
D, [2018-03-10 02:15:47 -08:00 #3622] DEBUG -- :
D, [2018-03-10 02:15:47 -08:00 #3622] DEBUG -- : {"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///home/lesell_b/tests/crystal/dbus/pure_dbus/src/test.cr"}}}
D, [2018-03-10 02:15:47 -08:00 #3622] DEBUG -- : textDocument/didSave
D, [2018-03-10 02:15:48 -08:00 #3622] DEBUG -- :
W, [2018-03-10 02:15:48 -08:00 #3622] WARN -- : Connection with client lost
D, [2018-03-10 02:15:48 -08:00 #3622] DEBUG -- : Content SEND: Content-Length: 872
{"jsonrpc":"2.0","error":{"code":-32001,"message":"Content-Length header is required. Ex: Content-Length: 132\\r\\n","data":["/home/lesell_b/Projects/opensource/scry/src/scry/headers.cr:25:17 in 'content_length'","/home/lesell_b/Projects/opensource/scry/src/scry/request.cr:45:7 in 'content_length'","/home/lesell_b/Projects/opensource/scry/src/scry/request.cr:39:18 in 'read_content'","/home/lesell_b/Projects/opensource/scry/src/scry/request.cr:14:7 in 'read'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:21:19 in 'start'","/home/lesell_b/Projects/opensource/scry/src/scry.cr:40:1 in '__crystal_main'","/usr/lib/crystal/crystal/main.cr:11:3 in '_crystal_main'","/usr/lib/crystal/crystal/main.cr:112:5 in 'main_user_code'","/usr/lib/crystal/crystal/main.cr:101:7 in 'main'","/usr/lib/crystal/crystal/main.cr:135:3 in 'main'","__libc_start_main","_start","???"]}}
E, [2018-03-10 02:15:48 -08:00 #3622] ERROR -- : Error writing file: Broken pipe
/usr/lib/crystal/io/file_descriptor.cr:72:11 in 'unbuffered_write'
/usr/lib/crystal/io/buffered.cr:120:9 in 'write'
/usr/lib/crystal/io.cr:487:7 in 'write_utf8'
/usr/lib/crystal/string.cr:4139:5 in 'to_s'
/usr/lib/crystal/io.cr:192:5 in '<<'
/home/lesell_b/Projects/opensource/scry/src/scry/response.cr:24:7 in 'log_and_write'
/home/lesell_b/Projects/opensource/scry/src/scry/response.cr:17:9 in 'write'
/home/lesell_b/Projects/opensource/scry/src/scry.cr:28:9 in 'start'
/home/lesell_b/Projects/opensource/scry/src/scry.cr:40:1 in '__crystal_main'
/usr/lib/crystal/crystal/main.cr:11:3 in '_crystal_main'
/usr/lib/crystal/crystal/main.cr:112:5 in 'main_user_code'
/usr/lib/crystal/crystal/main.cr:101:7 in 'main'
/usr/lib/crystal/crystal/main.cr:135:3 in 'main'
__libc_start_main
_start
???
This seems to happen when the opened file is not valid on first load. So when Scry receives the textDocument/didOpen
request, it tries to build the MethodDB
. At this point, as the file is not valid, the method failes, and doesn't add the file in the list of opened file in the workspace, and subsequent operations on this file (even if it fixes the syntax (or other) error, the file will not be added to the workspace again.
Maybe we should add a default empty MethodDB
if the initial generation fails?
On ST3 to reproduce this issue try scry formatting disabling crystal auto_format
on crystal package setting:
{
"auto_format": false,
"crystal_cmd": "crystal"
}
As you can see scry formatting is almost deleting all file text.
Ref: #34
After working on #48 I realize our specs don't test the working binary, just the isolated code of scry modules and features.
My proposal is to create a spec for testing the compiled binary, simulating a client to writing the input, checking output and to get the right response.
Initially scry was created to work with VSCode, times have changed and now scry aims to support many other editors and IDEs.
This issue is to discuss what we should keep inside scry, by example: The inmemory:
and git:
parts are needed to avoid errors in diff views inside VSCode, should we remove them?
Perhaps, we can include specific fixes for other editors as well, WDYT?
Ref #84 (comment)
The current handling of this request is not in line with the LSP spec, and is causing issue with Atom editors.
Spec Documentation: https://microsoft.github.io/language-server-protocol/specification#shutdown
Find macros using crystal tool expand
depended on crystal-lang/crystal#4766 (Already fixed ๐ )
This should work just like implementations, but for macros
Many people have problems to compile Scry even to execute the releases binaries.
Maybe we can link it statically using docker image.
I was able to compile Scry staticaly using official Crystal docker image and the binary runs without dependencies in almost every distro: ArchLnux, Ubuntu, Centos. (not Alpine)
To compile statically we can use crystal build src/scry.cr --link-flags="-static"
on Linux.
What do you think guys?
For example, in RubyMine, there's a feature where something such as:
for a in [*0...10]
RubyMine will automatically recommend you to change the for
statement to a each do
statement. This also applies to something like when you use if
with a negative statement (in which case unless
is recommended), etcetera.
This requires a centralised style guide or linter, however.
Beg, borrow or steal a travis config/ docker file installs crystal w/ llvm so our build can run.
if you have this scenario.
# File b.cr
class A
def self.a
end
end
# File a.cr
and then change file a.cr to:
# File a.cr
require "./b"
A.
Completion on A. doesn't work.
This is because the dependancy to b.cr wasn't added to the file.
We can either change this on save or on update. But I think on update might be really slow.
Related to #28
Something like this:
Ref: https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction
I usually work with large files (300-400 lines), and the logging file can become very big and take all the space available in /tmp
(which is a tmpfs on my system, so it lives in the ram).
A sample list of scry's log files:
-rw------- 1 lesell_b users 3.1G Mar 21 20:25 scry.out.27K0Q6
-rw------- 1 lesell_b users 1.1M Mar 21 17:24 scry.out.DJW0Dc
-rw------- 1 lesell_b users 1014K Mar 21 17:22 scry.out.KqqV1g
-rw------- 1 lesell_b users 6.8M Mar 21 23:31 scry.out.lyxMHz
-rw------- 1 lesell_b users 1014K Mar 21 17:23 scry.out.M8PRUt
-rw------- 1 lesell_b users 1013K Mar 21 17:22 scry.out.TShzqU
-rw------- 1 lesell_b users 1014K Mar 21 17:21 scry.out.VkHbyS
-rw------- 1 lesell_b users 845M Mar 21 23:27 scry.out.XTtliD
-rw------- 1 lesell_b users 1020K Mar 21 17:21 scry.out.ZtJysi
I suggest to at least disable the logging of every request/response unless the --debug
flag is given to scry, this will reduce the size of log files significantly I think.
Hi @crystal-lang-tools/scry community!
This project is getting better everyday. I think is cool but some newcomers are getting confused on how to use scry. This is mainly because the lack of documentation on LSP clients configuration:
I propose to write some wiki articles about configuring scry to run on:
When an error happens during a RPC call, a ResponseMessage
is returned, without the message id it's currently in processing.
scry/src/scry/protocol/response_error.cr
Lines 20 to 30 in a2ac15c
I looked at the code, the important bit is
Lines 20 to 29 in a2ac15c
ResponseMessage
object will create a ReponseError
with the given exception.Hi @laginha87 I just found another little issue with completion:
When I was testing #92 I realize the completion follows requires but doesn't includes content for the file itself.
By example:
This works:
This doesn't work:
I guess there is some issue with requires parsing somewhere here:
scry/src/scry/completion/dependency_graph.cr
Lines 83 to 85 in 9b1745a
Are we missing the current file content on completion?
@doughsay wrote:
This happens when scry attempts to create and write to .scry.out. If vscode is launched from Spotlight or Finder on macOS, the "PWD" is apparently set to /, so scry tries creating and writing to /.scry.out
See https://github.com/faustinoaq/vscode-crystal-lang/issues/14
@laginha87 I knew I had some issues with auto-completion feature and I have found them, sometimes the completion is broken in projects with sub directories. And keep working only in the main project file.
In the example below, I tried scry master and tested completion on all files, (baz.cr
, bar.cr
and foo.cr
) and no one works but only console.cr
. No matter where I put them, completion just work on one file, the main file console.cr
for the project console
Full logs here: https://gist.github.com/faustinoaq/65b39e810dc1e4a6a3456bb0286d48e6
OS: Linux 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux
IDE: RubyMine 2017.3.3
Plugin: https://plugins.jetbrains.com/plugin/10209-lsp-support
scry.out.tHN1QZ
I, [2018-03-30 20:08:56 -04:00 #16188] INFO -- : Scry is looking into your code...
D, [2018-03-30 20:08:56 -04:00 #16188] DEBUG -- : Content-Length: 586
D, [2018-03-30 20:08:56 -04:00 #16188] DEBUG -- :
D, [2018-03-30 20:08:56 -04:00 #16188] DEBUG -- : {"jsonrpc":"2.0","id":"1","method":"initialize","params":{"rootUri":"file:///api_v2/","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true},"didChangeWatchedFiles":{},"symbol":{},"executeCommand":{}},"textDocument":{"synchronization":{"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"completionItem":{"snippetSupport":false}},"hover":{},"signatureHelp":{},"references":{},"documentHighlight":{},"formatting":{},"rangeFormatting":{},"onTypeFormatting":{},"definition":{},"codeAction":{},"rename":{}}}}}
D, [2018-03-30 20:08:56 -04:00 #16188] DEBUG -- : Content SEND: Content-Length: 839
{"jsonrpc":"2.0","error":{"code":-32001,"message":"Couldn't parse (Scry::NotificationMessage | Scry::RequestMessage) from {\"jsonrpc\":\"2.0\",\"id\":\"1\",\"method\":\"initialize\",\"params\":{\"rootUri\":\"file:///api_v2/\",\"capabilities\":{\"workspace\":{\"applyEdit\":true,\"workspaceEdit\":{\"documentChanges\":true},\"didChangeWatchedFiles\":{},\"symbol\":{},\"executeCommand\":{}},\"textDocument\":{\"synchronization\":{\"willSave\":true,\"willSaveWaitUntil\":true,\"didSave\":true},\"completion\":{\"completionItem\":{\"snippetSupport\":false}},\"hover\":{},\"signatureHelp\":{},\"references\":{},\"documentHighlight\":{},\"formatting\":{},\"rangeFormatting\":{},\"onTypeFormatting\":{},\"definition\":{},\"codeAction\":{},\"rename\":{}}}}} at 1:1","data":["???","???","???","???","???","???","???"]}}
Hi, seems completion feature is including directories in some wrong places ๐
I found this strange error when I was working on other unrelated features:
D, [2018-04-08 23:55:59 -05:00 #5457] DEBUG -- : Content-Length: 281
D, [2018-04-08 23:55:59 -05:00 #5457] DEBUG -- :
D, [2018-04-08 23:55:59 -05:00 #5457] DEBUG -- : {"jsonrpc":"2.0","id":23,"method":"completionItem/resolve","params":{"label":"bar/","detail":"bar/","filterText":"bar/","insertTextFormat":1,"insertText":"bar/","kind":9,"sortText":"bar/","data":{"require_module_context":true,"path":"/home/main/Projects/console/src/console/bar"}}}
D, [2018-04-08 23:55:59 -05:00 #5457] DEBUG -- : completionItem/resolve
D, [2018-04-08 23:55:59 -05:00 #5457] DEBUG -- : Content SEND: Content-Length: 1215
{"jsonrpc":"2.0","error":{"code":-32001,"message":"Error reading file: Is a directory","data":["/usr/lib/crystal/io/file_descriptor.cr:53:9 in 'unbuffered_read'","/usr/lib/crystal/io/buffered.cr:206:5 in 'fill_buffer'","/usr/lib/crystal/io/buffered.cr:82:7 in 'peek'","/usr/lib/crystal/io.cr:638:37 in 'gets'","/usr/lib/crystal/io.cr:611:5 in 'gets'","/usr/lib/crystal/io.cr:581:5 in 'gets'","/usr/lib/crystal/io.cr:580:3 in 'gets'","/usr/lib/crystal/io.cr:1167:7 in 'next'","/usr/lib/crystal/iterator.cr:913:9 in 'next'","/usr/lib/crystal/enumerable.cr:390:15 in 'join'","/usr/lib/crystal/enumerable.cr:620:7 in 'join'","/home/main/Projects/scry/src/scry/completion_resolver.cr:11:9 in 'run'","/home/main/Projects/scry/src/scry/context.cr:103:19 in 'dispatch_request'","/home/main/Projects/scry/src/scry/context.cr:31:7 in 'dispatch'","/home/main/Projects/scry/src/scry.cr:25:19 in 'start'","/home/main/Projects/scry/src/scry.cr:42:1 in '__crystal_main'","/usr/lib/crystal/crystal/main.cr:11:3 in '_crystal_main'","/usr/lib/crystal/crystal/main.cr:112:5 in 'main_user_code'","/usr/lib/crystal/crystal/main.cr:101:7 in 'main'","/usr/lib/crystal/crystal/main.cr:135:3 in 'main'","__libc_start_main","_start","???"]}}
/cc @laginha87
I found this ๐ error today when I was working in my projects:
D, [2018-04-13 13:38:10 -05:00 #28884] DEBUG -- : workspace/didChangeConfiguration
E, [2018-04-13 13:39:46 -05:00 #28884] ERROR -- : A error was found while searching definitions
Expected Hash for #[]?(key : String), not Array(JSON::Type)
E, [2018-04-13 13:51:12 -05:00 #28884] ERROR -- : A error was found while searching definitions
Expected Hash for #[]?(key : String), not Array(JSON::Type)
E, [2018-04-13 13:51:40 -05:00 #28884] ERROR -- : A error was found while searching definitions
Expected Hash for #[]?(key : String), not Array(JSON::Type)
E, [2018-04-13 13:53:34 -05:00 #28884] ERROR -- : A error was found while searching definitions
Expected Hash for #[]?(key : String), not Array(JSON::Type)
E, [2018-04-13 13:56:44 -05:00 #28884] ERROR -- : A error was found while searching definitions
Expected Hash for #[]?(key : String), not Array(JSON::Type)
E, [2018-04-13 14:00:33 -05:00 #28884] ERROR -- : A error was found while searching definitions
Expected Hash for #[]?(key : String), not Array(JSON::Type)
E, [2018-04-13 14:00:33 -05:00 #28884] ERROR -- : A error was found while searching definitions
Expected Hash for #[]?(key : String), not Array(JSON::Type)
E, [2018-04-13 14:00:35 -05:00 #28884] ERROR -- : A error was found while searching definitions
Expected Hash for #[]?(key : String), not Array(JSON::Type)
E, [2018-04-13 14:03:10 -05:00 #28884] ERROR -- : A error was found while searching definitions
Expected Hash for #[]?(key : String), not Array(JSON::Type)
E, [2018-04-13 14:59:37 -05:00 #28884] ERROR -- : A error was found while searching definitions
Unexpected char 'E' at 1:1
I haven't seen this error before, I guess we need to review ๐ implementations feature again ๐
scry/src/scry/implementations.cr
Lines 60 to 61 in bf2660b
Hi community!
Find references is a feature I have no idea or clue on how to implement,
This is the only missing feature to complete basic LSP support see: https://langserver.org/
So, WDYT about this scry capability?
I think Scry can support list Document and Workspace symbols using Crystal Ctags by @SuperPaintman
It's not like it's a big issue or anything, but it kind of bugs me. The Crystal URL in the "topic"/"description" of the repository uses HTTP, while the site uses HTTPS. Granted it redirects, it looks kind of bad to me and anyone alike me.
I think scry should be editor/IDE agnostic
So, I guess We need to remove these lines from the protocol:
scry/src/scry/protocol/settings.cr
Lines 7 to 54 in 2e988b7
@crystal-lang-tools/scry WDYT?
Scry doesn't run on Windows. Because Crystal doesn't run on windows. But Windows 10 can run scry in bash. However, I'm not certain that we can mix STDIN and STDOUT in a useful way.
First step, test if we can connect to a Scry running bash from windows. If that works, there's nothing to change.
If that doesn't work, add support for optionally connecting to scry of TCP.
Hi, completion works per project, although, If I open an external crystal file in my current workspace I get this:
{"jsonrpc":"2.0","error":{"code":-32001,"message":"Missing hash key: \"/home/main/Projects/interactive-
crystal/mandel.cr\"","data":["/usr/lib/crystal/hash.cr:0:9 in 'fetch'","/usr/lib/crystal/hash.cr:62:5 in
'[]'","/home/main/Projects/scry/src/scry/completion/dependency_graph.cr:32:7 in
'[]'","/home/main/Projects/scry/src/scry/workspace.cr:29:29 in
'put_file'","/home/main/Projects/scry/src/scry/context.cr:138:7 in
'dispatch_notification'","/home/main/Projects/scry/src/scry/context.cr:36:7 in
'dispatch'","/home/main/Projects/scry/src/scry.cr:23:19 in
'start'","/home/main/Projects/scry/src/scry.cr:40:1 in '__crystal_main'","/usr/lib/crystal/crystal/main.cr:11:3
in '_crystal_main'","/usr/lib/crystal/crystal/main.cr:112:5 in
'main_user_code'","/usr/lib/crystal/crystal/main.cr:101:7 in 'main'","/usr/lib/crystal/crystal/main.cr:135:3 in
'main'","__libc_start_main","_start","???"]}}
I think we can check an existing file here:
Lines 26 to 32 in bf2660b
something like:
if @dependency_graph[file.filename]?
file_dependencies = @dependency_graph[file.filename].descendants.map &.value
method_db = Completion::MethodDB.generate(file_dependencies)
@open_files[file.filename] = {file, method_db}
else
@open_files[file.filename] = {file, Completion::MethodDB.new}
end
VSCode packages can't be larger then 20MB. So I can't distribute Cystal-IDE w/ bundled binaries for all platform/arch combos we'll want to support (probably a bad idea anyway).
So how should we distribute scry?
Maintain brew taps and apt-get repos. Brew taps don't seem that hard to maintain, but I'm uncertain of the cost in effort for keeping an apt distribution. And that excludes arch and redhat linux users.
Build logic into Crystal-IDE to fetch proper version of scry (and detect updates). There's a lot of hidden effort here; like prompting users that an update is available, etc.
See if it's possible to make scry distributable as a development dependency. This is how, for example, rake is distributed most often to ruby projects. This would actually make the most sense, since you may need a different scry on different projects. However, I'm not certain that shards supports distributing binary dependencies in this way.
Hi community!
@bmulvihill already implemented listing symbols per file via #39 and #43
Would be nice to use the new "main file" .scry.cr
to get workspace symbols, WDYT?
.scry.cr
file is optional, implemented on #95
Hi After testing scry on sublime text and intellij-idea I just realize, scry is bypassing initialize capabilities supported by client.
scry/src/scry/protocol/server_capabilities.cr
Lines 51 to 57 in a454c66
We're not using capabilities: JSON::Any
at all
I think we should enable features only if the client has/want support for specified capability.
So we can create a JSON.mapping
for capabilities
and check them before creating ServerCapabilities.new
After working on amberframework source code for a few days I notice the diagnostic for external files is not clean, so, I always see these errors, until the editor is reloaded.
External file Untitled-4.cr
located in home directory, and opened from a Project folder
I think this code is causing the issue:
Lines 19 to 24 in bf2660b
So, we need to send clean diagnostics to all files in @text_document.text.map
and not only to files inside src/
folder.
IMPORTANT: We're sending clean diagnostics to all files because some errors are not located in the same file, and because we support implicit requires now, the files scope is a bit bigger and needs to be clean.
Scry is growing, would be nice to use lsp
shard and remove protocol
folder for better maintainability.
Issues to be solved
lsp
shard crystal-lang-tools/lsp#1Hello:
I'm receiving this error when trying to compile the source code.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: execution of command failed with code: 1: `cc -o "/Users/.../.cache/crystal/crystal-run-scry.tmp" "${@}" -rdynamic -lz `pkg-config --libs libssl || printf %s '-lssl -lcrypto'` `pkg-config --libs libcrypto || printf %s '-lcrypto'` /usr/local/Cellar/crystal-lang/0.18.7/src/llvm/ext/llvm_ext.o `$(command -v llvm-config-3.6 || command -v llvm-config36 || command -v llvm-config-3.5 || command -v llvm-config35 || command -v llvm-config) --libs --system-libs --ldflags 2> /dev/null` -lstdc++ -lpcre -lgc -lpthread /usr/local/Cellar/crystal-lang/0.18.7/src/ext/libcrystal.a -levent -liconv -ldl -L/usr/lib -L/usr/local/lib`
We can get context types using crystal tool context
I think would be nice to implement hover feature just like vscode-crystal-lang is already doing, see: https://github.com/crystal-lang-tools/vscode-crystal-lang/wiki/Settings#hover
Hi all, this issue is a compilation of features I think we can add to the completion part of scry.
Open to suggestions.
Add string literal completion
Add array literal method completion
Add hash literal method completion
Support generic method completion
Add chain method completion
Add inherited instance methods completion
Add inherited class methods completion
Add json mappings completion
Any class defined under libs/ isn't used, this is because the requires aren't looked up properly when loading the requires
Right now we identify class methods but don't identify module functions. For example: Kemal.r
should complete with run.
This section is for when we have situations like a = [] of String
it should identify a as Array(String)
.
a = ""
should identify a as String.
a = [1,2,3]
a = [] of String
Should identify as Array(String, String).
a = {
"" => ""
}
a = {} of String => String
Should identify as Hash(String, String)
a = [] of String; a.map(&.)
should complete with string methods.
a.method_a.method_b.
should be able to give some completion hints (This needs methods to define the return type or we need to find away to guess tha too.)
When suggesting completion on an object it should also include instance methods from the classes it inherits from.
When suggesting completion on a class it should also include class methods from the classes it inherits from.
When suggesting completion on an object it should also include methods inherited from included modules.
I have no idea how to handle completion on methods defined by macros, so we could add special cases for json mappings.
This set of features needs the completion code to identify which class or module the cursor is on.
TODO Fill out this section.
Ameba is a static code analysis tool for the Crystal language. It enforces a consistent Crystal code style, also catches code smells and wrong code constructions
https://github.com/veelenga/ameba
See #57
Hi, I tried latest scry release (v0.7.1) and seems formatting untitled files (implemented on #54 ) is broken now:
I'm getting this message (relevant message):
D, [2018-03-11 08:57:22 -05:00 #2962] DEBUG -- : Content-Length: 276
D, [2018-03-11 08:57:22 -05:00 #2962] DEBUG -- :
D, [2018-03-11 08:57:22 -05:00 #2962] DEBUG -- : {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"untitled:Untitled-1","version":3},"contentChanges":[{"text":"module Console\n class ClassName\n def initialize\n end\n \n def method_name\n end\n end\n end\n "}]}}
D, [2018-03-11 08:57:22 -05:00 #2962] DEBUG -- : textDocument/didChange
D, [2018-03-11 08:57:22 -05:00 #2962] DEBUG -- : Content SEND: Content-Length: 780
{"jsonrpc":"2.0","error":{"code":-32001,"message":"Missing hash key: \"untitled:Untitled-1\"","data":["/usr/lib/crystal/hash.cr:0:9 in 'fetch'","/usr/lib/crystal/hash.cr:62:5 in '[]'","/home/main/Projects/scry/src/scry/workspace.cr:33:17 in 'update_file'","/home/main/Projects/scry/src/scry/context.cr:138:7 in 'dispatchNotification'","/home/main/Projects/scry/src/scry/context.cr:39:7 in 'dispatch'","/home/main/Projects/scry/src/scry.cr:23:19 in 'start'","/home/main/Projects/scry/src/scry.cr:40:1 in '__crystal_main'","/usr/lib/crystal/crystal/main.cr:11:3 in '_crystal_main'","/usr/lib/crystal/crystal/main.cr:112:5 in 'main_user_code'","/usr/lib/crystal/crystal/main.cr:101:7 in 'main'","/usr/lib/crystal/crystal/main.cr:135:3 in 'main'","__libc_start_main","_start","???"]}}
I tried to format this code:
I think the problem is somewhere here:
https://github.com/crystal-lang-tools/scry/blob/master/src/scry/workspace.cr#L26
or
https://github.com/crystal-lang-tools/scry/blob/master/src/scry/context.cr#L58
because Untitled files doesn't use a valid path.
/cc @laginha87
Hi community!
Requirements to reproduce this issue:
Currently Sublime Text 3 has full LSP support
I tried LSP on ST3 using https://github.com/tomv564/LSP with this settings:
// Settings in here override those in "LSP/LSP.sublime-settings",
{
"clients":
{
// Each new client must have the following structure.
"crystal":
{
// The command line required to run the server.
"command": ["/home/main/Projects/scry/bin/linux/scry"],
// Use: "Show Scope Name" from Sublime's Developer menu
"scopes": ["source.crystal"],
// Run: view.settings().get("syntax") in console
"syntaxes": ["Packages/Crystal/Crystal.sublime-syntax"],
// See: https://github.com/Microsoft/language-server-protocol/issues/213
"languageId": "crystal",
// Sent to server once using workspace/didConfigurationChange notification
"settings": { },
// Sent once to server in initialize request
"initializationOptions": { },
// Extra variables to override/add to language server's environment.
"env": { },
}
},
"auto_show_diagnostics_panel": false,
"show_diagnostics_phantoms": true
}
However I found some issues trying scry:
See issue #35
See issue #36
The only feature that currently works well!, To try Scry GoTo Definition first disable default GoTo Definition on ST3 settings:
{
"index_files": false
}
As you can see GoToDef works almost perfectly :)
I think these issues related to formatting and diagnostics would be configuration errors, maybe on initialize protocol. Latest contributions by @bmulvihill could be trying to fix some of these issues.
Next features to support will be Hover information (using crystal tool context
) and Completion using Cracker (maybe embedded on Scry WDYT @TechMagister ?).
Also I'm thinking on use crystal commandline tools instead of require "compiler/crystal/**"
this would reduce Scry size a ton and should allow us to implement features easily. However I still think require "compiler/crystal/syntax"
will be useful to implement features like List & Rename Symbols.
if you have this scenario.
# File b.cr
class A
enda
# File a.cr
require "./b"
File.
The completion on File. won't work because b.cr is invalid crystal code.
Note: If you 're trying this out in vscode because dependancies are preloaded, Run Reload the Window after saving the files.
Issue is here:
scry/src/scry/completion/method_db.cr
Line 27 in c48f421
Currently @TechMagister have a really good tool for autocompletion [0]
I think we can implement auto completion on Scry using cracker [0]
[0] - https://github.com/TechMagister/cracker
Adding a TODO list by @laginha87
The current handling for the shutdown
Request is more inline with LSP exit
Notification.
Spec Documenation: https://microsoft.github.io/language-server-protocol/specification#exit
Ref: #69
As I said here: #80 (comment) and here: #78 (comment)
Actually our specs cover some of implementation and diagnostic features, although full integration specs are required to ensure these features work on a full workspace on any editor.
Crystal compiler doesn't support rename symbols yet, see discussion here by @asterite
Would be possible to implement basic rename symbols on scry without crystal tool
support? WDYT?
Nice comment by @RX14 :
Personally, local variable renaming, and small refactors such as "extract this subexpression to a variable" would be my 99% usecase for a refactoring tool.
Some projects could have a main file, avoiding require
's in every file. So instead of analyzing each file, with mainFile
option we can analyze just one. [0] By example, on amber projects [1]
[0] - https://github.com/crystal-lang-tools/vscode-crystal-lang/wiki/Settings#mainfile
[1] - https://github.com/amberframework/amberframework.org/blob/master/src/amberframework.cr#L5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.