steep icon indicating copy to clipboard operation
steep copied to clipboard

Steep::Typing::UnknownNodeError: Unknown node for type: ...

Open ksss opened this issue 4 years ago • 1 comments

If I type . with steep-vscode as in the following code, an error seems to occur.

Repro code:

1.← typing dot
a, b = []

then output log

[Steep 0.45.0] [interaction:interaction] [background] [#handle_job] [#response_to_completion] [completion_provider#run(line: 26, column: 2)] [synthesize:(1:1)] [synthesize:(26:1)] Unsupported masgn lhs node: only lvasgn, ivasgn, and splat are supported
...
[Steep 0.45.0] [interaction:interaction] [background] Unexpected error: #<Steep::Typing::UnknownNodeError: Unknown node for type: s(:int, 1)>
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/steep-0.45.0/lib/steep/typing.rb:79:in `type_of'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/steep-0.45.0/lib/steep/services/completion_provider.rb:176:in `items_for_trigger'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/steep-0.45.0/lib/steep/services/completion_provider.rb:81:in `block in run'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/steep-0.45.0/lib/steep.rb:166:in `measure'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/steep-0.45.0/lib/steep/services/completion_provider.rb:80:in `run'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/steep-0.45.0/lib/steep/server/interaction_worker.rb:194:in `block (2 levels) in process_completion'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/steep-0.45.0/lib/steep.rb:166:in `measure'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/steep-0.45.0/lib/steep/server/interaction_worker.rb:185:in `block in process_completion'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb:99:in `block in tagged'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb:37:in `tagged'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb:99:in `tagged'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/steep-0.45.0/lib/steep/server/interaction_worker.rb:184:in `process_completion'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/steep-0.45.0/lib/steep/server/interaction_worker.rb:37:in `block in handle_job'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb:99:in `block in tagged'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb:37:in `tagged'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb:99:in `tagged'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/steep-0.45.0/lib/steep/server/interaction_worker.rb:23:in `handle_job'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/steep-0.45.0/lib/steep/server/base_worker.rb:53:in `block (2 levels) in run'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb:99:in `block in tagged'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb:37:in `tagged'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb:99:in `tagged'
[Steep 0.45.0] [interaction:interaction] [background]   /Users/ksss/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/steep-0.45.0/lib/steep/server/base_worker.rb:43:in `block in run'

ksss avatar Aug 30 '21 14:08 ksss

The error here is the lack of masgn support ("Unsupported masgn lhs node: only lvasgn, ivasgn, and splat are supported").

@soutaro Any plans on supporting this? Maybe you can tell a bit on where to look at to start implementing it?

palkan avatar Feb 17 '22 10:02 palkan