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
Hi. I find the RBS RDoc plugin outputs nothing with RDoc 6.5.0. Please look at the following sections for details.
test.rb
#!/usr/bin/env ruby require 'bundler/inline' rdoc_version, = ARGV abort "Usage: #{$0} <rdoc_version>" unless rdoc_version gemfile(true) do source 'https://rubygems.org' gem 'rdoc', rdoc_version gem 'rbs', '3.1.0' end rbs_file = 'user.rbs' File.write rbs_file, <<~RBS class User def name: -> String end RBS require 'rdoc/rdoc' RDoc::RDoc.new.document [rbs_file]
$ ./test.rb '>=6.5.0' Fetching gem metadata from https://rubygems.org/......... Resolving dependencies... Using stringio 3.0.6 Using rbs 3.1.0 Using bundler 2.4.13 Using psych 5.1.0 Using rdoc 6.5.0 Parsing sources... 100% [ 1/ 1] user.rbs Generating Darkfish format into /Users/koba/tmp/rbs-rdoc/doc... Files: 1 Classes: 0 (0 undocumented) Modules: 0 (0 undocumented) Constants: 0 (0 undocumented) Attributes: 0 (0 undocumented) Methods: 0 (0 undocumented) Total: 0 (0 undocumented) 0.00% documented Elapsed: 0.1s
$ ./test.rb '<6.5.0' Fetching gem metadata from https://rubygems.org/......... Resolving dependencies... Using bundler 2.4.13 Using rbs 3.1.0 Using stringio 3.0.6 Using psych 5.1.0 Using rdoc 6.4.0 Parsing sources... 100% [ 1/ 1] user.rbs Generating Darkfish format into /Users/masafumi.koba/tmp/rbs-rdoc/doc... Files: 1 Classes: 1 (1 undocumented) Modules: 0 (0 undocumented) Constants: 0 (0 undocumented) Attributes: 0 (0 undocumented) Methods: 1 (1 undocumented) Total: 2 (2 undocumented) 0.00% documented Elapsed: 0.1s
Using RDoc 6.5.0 ('>=6.5.0') outputs no classes, while using RDoc 6.4.0 (<6.5.0) outputs 1 class.
'>=6.5.0'
<6.5.0
I think the cause is the following code:
rbs/lib/rdoc/discover.rb
Line 4 in 97187e9
This code can raise Gem::LoadError with the message:
Gem::LoadError
Gem::LoadError: can't activate rdoc (~> 6.4.0), already activated rdoc-6.5.0. Make sure all dependencies are added to Gemfile.
Note that the message above is actually discarded here:
Lines 16 to 17 in 97187e9
So, I think we could fix the bug to allow newer RDoc versions like this:
-gem 'rdoc', '~> 6.4.0' +gem 'rdoc', '>= 6.4.0'
But PR #1169 has pinned the RDoc version as 6.4.0 for some reason (I'm not sure why). 🤔
The text was updated successfully, but these errors were encountered:
Thank you for the quick fix! 😄
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Hi. I find the RBS RDoc plugin outputs nothing with RDoc 6.5.0. Please look at the following sections for details.
Reproduction steps
test.rb
:Using RDoc 6.5.0 (
'>=6.5.0'
) outputs no classes, while using RDoc 6.4.0 (<6.5.0
) outputs 1 class.Suggestion
I think the cause is the following code:
rbs/lib/rdoc/discover.rb
Line 4 in 97187e9
This code can raise
Gem::LoadError
with the message:Note that the message above is actually discarded here:
rbs/lib/rdoc/discover.rb
Lines 16 to 17 in 97187e9
So, I think we could fix the bug to allow newer RDoc versions like this:
But PR #1169 has pinned the RDoc version as 6.4.0 for some reason (I'm not sure why). 🤔
The text was updated successfully, but these errors were encountered: