Skip to content
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

Declare rdoc as dependency #648

Merged
merged 1 commit into from
Jul 18, 2023
Merged

Declare rdoc as dependency #648

merged 1 commit into from
Jul 18, 2023

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Jul 17, 2023

IRB already has several features that rely on rdoc, such as:

  • Autocompletion's document dialog
  • Autocompletion's PerfectMatchedProc
  • The show_doc command
  • Easter egg

And we could use its pager more in the future too. So it makes sense to declare rdoc as a dependency instead of relying on the one bundled with Ruby.

How will this affect Rails?

TL;DR - rdoc will be installed as a gem in all environments, but won't be required outside of rails console usages. In production, rdoc will only be required when IRB's document look-up commands are used because autocompletion is diabled.

  • After this PR, Rails 7.1 will install rdoc as a gem along with irb
  • Rails only requires irb in console_command.rb, which is not loaded unless rails console is run. So whatever IRB requires, including rdoc, won't be loaded outside of rails console.
  • Even with this PR, IRB does NOT eagerly require rdoc. And consider Rails disables IRB's autocompletion in production, rdoc won't be loaded unless show_doc/help commands are run.

IRB already has several features that rely on rdoc, such as:

- Autocompletion's document dialog
- Autocompletion's `PerfectMatchedProc`
- The `show_doc` command
- Easter egg

And we could use its pager more in the future too. So it makes sense to
declare rdoc as a dependency instead of relying on the one bundled with
Ruby.
@st0012 st0012 merged commit 4dffbb1 into master Jul 18, 2023
47 checks passed
@st0012 st0012 deleted the add-rdoc-as-dependency branch July 18, 2023 13:53
matzbot pushed a commit to ruby/ruby that referenced this pull request Jul 18, 2023
(ruby/irb#648)

IRB already has several features that rely on rdoc, such as:

- Autocompletion's document dialog
- Autocompletion's `PerfectMatchedProc`
- The `show_doc` command
- Easter egg

And we could use its pager more in the future too. So it makes sense to
declare rdoc as a dependency instead of relying on the one bundled with
Ruby.

ruby/irb@4dffbb1dd3
@ima1zumi ima1zumi added the dependencies Pull requests that update a dependency file label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Development

Successfully merging this pull request may close these issues.

3 participants