We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ruby: v3.4.1 rbs: v3.8.1
prism v1.2.0 is bundled as default gem with ruby v3.4. link
But rbs collection cannot found it.
RBS::EnvironmentLoader.gem_sig_path('prism', '1.2.0') #=> nil Gem::Specification.find_by_name('prism', '1.2.0').gem_dir #=> "/Users/yuki.kurihara/.rbenv/versions/3.4.1/lib/ruby/gems/3.4.0/gems/prism-1.2.0" Dir[Gem::Specification.find_by_name('prism', '1.2.0').gem_dir + "/*"] #=> []
Even if the gem directory can be found, the sig directory is not synchronised by default gem and cannot be consulted.
https://github.com/ruby/ruby/blob/48d4efcb85000e1ebae42004e963b5d0cedddcf2/tool/sync_default_gems.rb#L376-L398
The text was updated successfully, but these errors were encountered:
Sync sig dir from prism from tool/sync_default_gems.rb.
sig
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 677ed03f55..5624261493 100755 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -391,6 +391,10 @@ def sync_default_gems(gem) rm_rf("prism/templates/rbi") rm_rf("prism/templates/sig") + cp_r("#{upstream}/sig", "prism/") + rm_rf("prism/sig/_shims") + rm_rf("prism/sig/prism/_private") + rm("test/prism/snapshots_test.rb") rm_rf("test/prism/snapshots")
Read sig dir for default gems.
diff --git a/lib/rbs/environment_loader.rb b/lib/rbs/environment_loader.rb index cdfde833..8e6edebc 100644 --- a/lib/rbs/environment_loader.rb +++ b/lib/rbs/environment_loader.rb @@ -29,7 +29,11 @@ module RBS requirements = [] #: Array[String] requirements << version if version spec = Gem::Specification.find_by_name(name, *requirements) - path = Pathname(spec.gem_dir) + "sig" + path = if spec.default_gem? + Pathname("#{RbConfig::CONFIG["rubylibdir"]}/#{name}/sig") + else + Pathname(spec.gem_dir) + "sig" + end if path.directory? [spec, path] end
Sorry, something went wrong.
No branches or pull requests
ruby: v3.4.1
rbs: v3.8.1
prism v1.2.0 is bundled as default gem with ruby v3.4. link
But rbs collection cannot found it.
Even if the gem directory can be found, the sig directory is not synchronised by default gem and cannot be consulted.
https://github.com/ruby/ruby/blob/48d4efcb85000e1ebae42004e963b5d0cedddcf2/tool/sync_default_gems.rb#L376-L398
The text was updated successfully, but these errors were encountered: