Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack level too deep error on indexing project with docusign_esign gem dependency #2095

Open
Galathius opened this issue May 29, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Galathius
Copy link

Galathius commented May 29, 2024

Description

Recently tried to switch from my previous IDE to vscode using ruby-lsp extension. On one of my project, I got the indexing process stuck with the message Ruby LSP: indexing files: 33% completed.

Checking Output tab led me to Stack level too deep error:

Logs 2024-05-29 14:59:19.596 [info] (hireglobal-backend) # terminated with exception (report_on_exception is true):

2024-05-29 14:59:19.601 [info] (hireglobal-backend) /Users/galathius/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/prism-0.29.0/lib/prism/visitor.rb:31:in each': stack level too deep (SystemStackError) from /Users/galathius/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/prism-0.29.0/lib/prism/visitor.rb:31:in visit_child_nodes'
from /Users/galathius/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/prism-0.29.0/lib/prism/dispatcher.rb:97:in visit_and_node' from /Users/galathius/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/prism-0.29.0/lib/prism/node.rb:537:in accept'
from /Users/galathius/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/prism-0.29.0/lib/prism/visitor.rb:31:in block in visit_child_nodes' from /Users/galathius/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/prism-0.29.0/lib/prism/visitor.rb:31:in each'
from /Users/galathius/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/prism-0.29.0/lib/prism/visitor.rb:31:in visit_child_nodes' from /Users/galathius/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/prism-0.29.0/lib/prism/dispatcher.rb:97:in visit_and_node'
from /Users/galathius/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/prism-0.29.0/lib/prism/node.rb:537:in accept' ... 3605 levels... from /Users/galathius/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/ruby-lsp-0.16.7/lib/ruby_indexer/lib/ruby_indexer/index.rb:175:in index_all'
from /Users/galathius/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/sorbet-runtime-0.5.11262/lib/types/private/methods/_methods.rb:279:in bind_call' from /Users/galathius/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/sorbet-runtime-0.5.11262/lib/types/private/methods/_methods.rb:279:in block in _on_method_added'
from /Users/galathius/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/ruby-lsp-0.16.7/lib/ruby_lsp/server.rb:693:in `block in perform_initial_indexing'

Then I went through these instrucitons and figured out that it's failing on 7k LOC file from docusign_ruby gem.

I was managed to fix it by adding .index.yml file to the root of my project with the following content:

excluded_gems:
  - docusign_esign

Not sure how common this problem is, but I’m afraid it may stop some people from switching to VS Code and from using ruby-lsp. Maybe it is worth handling such error-prone cases somehow.

@Galathius Galathius added the bug Something isn't working label May 29, 2024
@andyw8
Copy link
Contributor

andyw8 commented May 29, 2024

Thanks for the report. I'm trying to reproduce this failure but not seeing it yet, what version of the docusign_esign gem are you using?

@Galathius
Copy link
Author

Galathius commented May 29, 2024

Hi @andyw8! Here are details:

  • docusign_esign gem version – 3.26.0
  • ruby version – ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin23] (without YJIT)
  • OS – MacOs Sonoma 14.5
  • VSCode version – 1.89.1
  • Ruby LSP version – 0.16.7

@andyw8
Copy link
Contributor

andyw8 commented May 29, 2024

Thanks, I was able to reproduce on Ruby 3.2.2, it's fine on 3.3.1

FYI @kddnewton

@andyw8
Copy link
Contributor

andyw8 commented May 29, 2024

(one thing I don't yet understand is why ruby-lsp-doctor doesn't fail for this...)

@andyw8
Copy link
Contributor

andyw8 commented May 29, 2024

Possible fix/workaround: #2097

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants