undefined method 'Pathname' for class RBS::EnvironmentLoader (NoMethodError) when running tests for version 3.10.4
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 78/100
Research direction
Start with lib/rbs/environment_loader.rb around line 26 and reproduce the failure through the test setup referenced by test/test_helper.rb. Verify the environment loader can load on Ruby 3.4 and that the test suite proceeds without the Pathname NoMethodError.
Written by the indexing model from the issue text.
Description
When running tests for version 3.4.10 against ruby version 3.4.8 I get the following errors during the tests:
/build/ruby-rbs/src/rbs/lib/rbs/environment_loader.rb:26:in '<class:EnvironmentLoader>': undefined method 'Pathname' for class RBS::EnvironmentLoader (NoMethodError)
DEFAULT_CORE_ROOT = Pathname(_ = __dir__) + "../../core"
^^^^^^^^
from /build/ruby-rbs/src/rbs/lib/rbs/environment_loader.rb:4:in '<module:RBS>'
from /build/ruby-rbs/src/rbs/lib/rbs/environment_loader.rb:3:in '<top (required)>'
from <internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
from <internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
from /build/ruby-rbs/src/rbs/lib/rbs.rb:29:in '<top (required)>'
from <internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
from <internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
from /build/ruby-rbs/src/rbs/test/test_helper.rb:8:in '<top (required)>'
from <internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
from <internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
from /build/ruby-rbs/src/rbs/test/rbs/ancestor_builder_test.rb:1:in '<top (required)>'
from <internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
from <internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
from /usr/lib/ruby/gems/3.4.0/gems/rake-13.3.1/lib/rake/rake_test_loader.rb:21:in 'block in <main>'
from /usr/lib/ruby/gems/3.4.0/gems/rake-13.3.1/lib/rake/rake_test_loader.rb:6:in 'Array#select'
from /usr/lib/ruby/gems/3.4.0/gems/rake-13.3.1/lib/rake/rake_test_loader.rb:6:in '<main>'
rake aborted!
Command failed with status (1)
From my understanding the issue is a missing require 'pathname' in https://github.com/ruby/rbs/blob/v3.10.4/lib/rbs/environment_loader.rb before line 26.
I know this is an old version but as far as I can see this issue also wasn't fixed in the latest version and for no I'm stuck on the 3.x version branch.
- Dominant language
- Ruby
- Stars
- 2.2k
- Forks
- 256
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 37
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/rbs
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100