You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solargraph struggles to access a readapt which even runs, and when that is resolved, the solution doesn't actually work.
There are two issues in this report. Am uncertain which if either should be filed against readapt rather than solargraph. I filed PyvesB/eclipse-solargraph#31 and they seem to think the first issue is because a fix hasn't been published, and think the second issue is with the Readapt code.
First issue: The latest Solargraph seems to pull down a readapt version which is missing the rb_cData with rb_cObject fix: 7b209fe
This means the native extension does not compile.
c:\Ruby33-x64\lib\ruby\gems>gem install readapt
Fetching readapt-1.4.4.gem
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing readapt:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/readapt-1.4.4/ext/readapt
C:/Ruby33-x64/bin/ruby.exe extconf.rb
creating Makefile
current directory: C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/readapt-1.4.4/ext/readapt
make DESTDIR= sitearchdir=./.gem.20240310-22128-j61oje sitelibdir=./.gem.20240310-22128-j61oje clean
current directory: C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/readapt-1.4.4/ext/readapt
make DESTDIR= sitearchdir=./.gem.20240310-22128-j61oje sitelibdir=./.gem.20240310-22128-j61oje
generating readapt-x64-mingw-ucrt.def
compiling breakpoints.c
compiling frame.c
frame.c: In function 'initialize_frame':
frame.c:131:57: error: 'rb_cData' undeclared (first use in this function)
131 | c_Frame = rb_define_class_under(m_Readapt, "Frame", rb_cData);
| ^~~~~~~~
frame.c:131:57: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:248: frame.o] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/readapt-1.4.4 for inspection.
Results logged to C:/Ruby33-x64/lib/ruby/gems/3.3.0/extensions/x64-mingw-ucrt/3.3.0/readapt-1.4.4/gem_make.out
Second issue: trying to start the debugger triggers these errors.
[TypeError] no implicit conversion of nil into String
internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb:127:in require' <internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in require'
I happen to be debugging a selenium test, which runs fine in Ruby directly (the thing I am troubleshooting connects to a DOM change in what I'm running against), but triggers this error when I try to run through Eclipse/SolarGraph/Readapt, meaning I don't get any interactive debugging.
The fault reproduces with this trivial rb file. Runs cleanly with 100% passed when run directly, but produces the error when run through solargraph/readapt
require "test/unit"
class Noop < Test::Unit::TestCase
def setup
end
def teardown
end
def test_main
end
end
It is not helped by the fact one of the messages gets truncated. There seems to be some kind of 355 character limit in the "output" lines. Eventually I found the Solargraph "Troubleshoot Readapt debugger by enabling adapter logs" checkbox. Hard to work out where this was going to put log messages, but eventually found the debug adapter logs had turned into JSON rather than raw text. But there's no real extra content:
Content-Length: 344
{"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"exceptionBreakpointFilters":[{"filter":"raise","label":"Break on raised exceptions","description":"The debugger will break when an exception is raised, regardless of whether it is subsequently rescued.","default":false}]}}Content-Length: 38
{"type":"event","event":"output","body":{"output":"[TypeError] no implicit conversion of nil into String\n","category":"stderr"}}Content-Length: 331
{"type":"event","event":"output","body":{"output":"<internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in require'\n\<internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb\>:127:in require'\n<full path to one of my rb files>:2:in `<top (require","category":"stderr"}}Content-Length: 333
I've been using these extensions without too much trouble for years (9?!?), and have very much appreciated them, so am sad they have now broken, and am hopeful repair isn't too difficult?
The text was updated successfully, but these errors were encountered:
Solargraph struggles to access a readapt which even runs, and when that is resolved, the solution doesn't actually work.
There are two issues in this report. Am uncertain which if either should be filed against readapt rather than solargraph. I filed PyvesB/eclipse-solargraph#31 and they seem to think the first issue is because a fix hasn't been published, and think the second issue is with the Readapt code.
First issue: The latest Solargraph seems to pull down a readapt version which is missing the rb_cData with rb_cObject fix:
7b209fe
This means the native extension does not compile.
I was able to get round this with help from https://stackoverflow.com/questions/16310793/how-to-avoid-the-source-being-overwritten-when-compiling-a-gem:
But then hit second issue.
Second issue: trying to start the debugger triggers these errors.
I happen to be debugging a selenium test, which runs fine in Ruby directly (the thing I am troubleshooting connects to a DOM change in what I'm running against), but triggers this error when I try to run through Eclipse/SolarGraph/Readapt, meaning I don't get any interactive debugging.
The fault reproduces with this trivial rb file. Runs cleanly with 100% passed when run directly, but produces the error when run through solargraph/readapt
It is not helped by the fact one of the messages gets truncated. There seems to be some kind of 355 character limit in the "output" lines. Eventually I found the Solargraph "Troubleshoot Readapt debugger by enabling adapter logs" checkbox. Hard to work out where this was going to put log messages, but eventually found the debug adapter logs had turned into JSON rather than raw text. But there's no real extra content:
I've been using these extensions without too much trouble for years (9?!?), and have very much appreciated them, so am sad they have now broken, and am hopeful repair isn't too difficult?
The text was updated successfully, but these errors were encountered: