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

Allow installing RDoc from a git source #1113

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

st0012
Copy link
Member

@st0012 st0012 commented May 29, 2024

This implements option 2 in #1107, which is to use extconf.rb to conditionally run rake generate when the gem is installed as a git source.

To make sure the target machine has the required dependencies for the generation, I modified rake generate to conditionally install the kpeg and racc.

task :generate do
unless ENV.key?('BUNDLE_GEMFILE')
Gem.install 'racc', '> 1.4.10'
Gem.install 'kpeg', '>= 1.3.3'
Copy link
Member Author

Choose a reason for hiding this comment

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

@colby-swandale do you know if there's any rubygems API to better handle these dependencies without bundler?

Copy link
Member

@colby-swandale colby-swandale May 30, 2024

Choose a reason for hiding this comment

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

Could you expand the context where Bundler wouldn't be available?

Copy link
Member Author

Choose a reason for hiding this comment

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

Bundler will be available, but this will be executed in 2 scenarios:

  • When a developer runs rake generate (or any tasks that depend on it) manually
  • When a user installs RDoc through git source

In the later case, I want to avoid installing all of RDoc's development dependencies as most of them aren't needed for generating the missing files.

ext/rdoc/extconf.rb Outdated Show resolved Hide resolved
Rakefile Outdated Show resolved Hide resolved
st0012 and others added 2 commits June 1, 2024 12:21
@st0012 st0012 marked this pull request as ready for review June 1, 2024 11:21
@st0012
Copy link
Member Author

st0012 commented Jun 1, 2024

@nobu Thanks for the suggestions 👍

@st0012 st0012 requested a review from nobu June 18, 2024 17:58
@st0012
Copy link
Member Author

st0012 commented Jun 25, 2024

@nobu Would you mind giving this another look? If you're not against it, I'd like to give it a try.

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

Successfully merging this pull request may close these issues.

3 participants