Skip to content

Silence doc warnings during 'gem install net-http' #194

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

Closed
wants to merge 1 commit into from

Conversation

0x1eef
Copy link
Contributor

@0x1eef 0x1eef commented Nov 21, 2024

Fix #193

Reproduction steps:
gem build net-http.gemspec
mv net-http-0.5.0.gem ${HOME}
cd ${HOME}
gem install net-http-0.5.0.gem

Fix ruby#193

Reproduction steps:
gem build net-http.gemspec
mv net-http-0.5.0.gem ${HOME}
cd ${HOME}
gem install net-http-0.5.0.gem
@0x1eef
Copy link
Contributor Author

0x1eef commented Jan 7, 2025

@hsbt Hello! Is this pull request useful or no ? This repository has 15 pull requests, some have no comments, and some are years old. I'd rather not maintain such a pull request, and if there's no intention of merging it, I'd rather close. I don't mean to be rude with this message.

Copy link

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can reproduce this with gem build && gem install net-http-0.6.0.gem --document and this PR fixes it 👍.

@deivid-rodriguez
Copy link

@hsbt I'm not an rdoc expert but I think this PR is correct and can be merged 👍.

@hsbt
Copy link
Member

hsbt commented Jan 8, 2025

I'm not sure that works on ruby/ruby repository. Please wait my confirmation that or verify with ruby/ruby repo.

@rhenium
Copy link
Member

rhenium commented Jan 8, 2025

I believe this is a regression in RDoc. A relative path from the root directory works with Ruby 3.1.6 and RubyGems/RDoc bundled with it, but not with later versions.

@rhenium
Copy link
Member

rhenium commented Jan 8, 2025

I submitted ruby/rdoc#1274 to include the gem root directory in the search paths again.

I think an even easier workaround for net-http is to explicitly specify the path in rdoc_options in the gemspec.

st0012 pushed a commit to ruby/rdoc that referenced this pull request Jan 8, 2025
Commit 6cf6e16, which went to v6.5.0, changed `RDoc::Options#parse`
to not call `#finish` in it. While the commit adjusted other call sites,
it missed `lib/rdoc/rubygems_hook.rb`.

`RDoc::Options#finish` prepares the include paths for `:include:`
directives. This has to be done before starting to parse sources.

I think this should fix ruby/net-http#193 +
ruby/net-http#194.
matzbot pushed a commit to ruby/ruby that referenced this pull request Jan 8, 2025
RDoc::RDoc#parse_files
(ruby/rdoc#1274)

Commit ruby/rdoc@6cf6e1647b97, which went to v6.5.0, changed `RDoc::Options#parse`
to not call `#finish` in it. While the commit adjusted other call sites,
it missed `lib/rdoc/rubygems_hook.rb`.

`RDoc::Options#finish` prepares the include paths for `:include:`
directives. This has to be done before starting to parse sources.

I think this should fix ruby/net-http#193 +
ruby/net-http#194.

ruby/rdoc@d62da8ca09
@0x1eef
Copy link
Contributor Author

0x1eef commented Jan 8, 2025

Thanks! Closing.

@0x1eef 0x1eef closed this Jan 8, 2025
@0x1eef 0x1eef deleted the docs/patch branch January 8, 2025 17:27
@0x1eef
Copy link
Contributor Author

0x1eef commented Jan 8, 2025

I think an even easier workaround for net-http is to explicitly specify the path in rdoc_options in the gemspec.

How would that work ? With --root - right ? The path varies based on the computer. For example, if I build on my machine, the path would not be the same on someone else's machine. Maybe it does not matter anymore, since eventually your fix will make this not matter anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'gem install net-http' generates warnings
4 participants