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

Gemfile: Add the test group not to install rdoc in CI. #701

Closed
wants to merge 1 commit into from

Conversation

junaruga
Copy link
Member

This PR is not to install rdoc in CI, mentioned at #699 (comment) to avoid the issue #699.

You can check this page for Bundler group feature.

I wanted to do the following commands. However, the set -ex didn't work in Windows environment. So, I split the "depends" to "bundle config" and "bundle install".

- name: depends
  run:  |
    set -ex
    bundle config set --local without development
    bundle install

@rhenium
Copy link
Member

rhenium commented Nov 25, 2023

ruby/stringio#71 seems to be the right solution for the CI error.

I agree it doesn't have to use the latest rdoc gem regardless. However, I think a better approach is to use bundle install --prefer-local.

Splitting groups (effectively removing rdoc from Gemfile) tells the CI to use the default gem version of rdoc. rdoc is still a default gem in Ruby master, but rdoc is one of the default gems that are planned to become bundled gems[*].

[*] https://bugs.ruby-lang.org/issues/19351

@rhenium
Copy link
Member

rhenium commented Nov 25, 2023

I think a better approach is to use bundle install --prefer-local.

It didn't work. Apparently, this option makes it fetch from rubygems.org only when no versions of a requested gem is locally installed. Ruby 3.0 ships with test-unit 3.3.7 while we require test-unit 3.4.6 or later. bundle install --prefer-local can install rake-compiler because it's not installed at all, but fails to install a newer test-unit because a version of the gem is already installed. (related: rubygems/rubygems#6705)

@eregon
Copy link
Member

eregon commented Nov 25, 2023

rdoc is a dependency of RubyGems so I'm not quite sure it could become a bundled gem. From that issue it won't be until at least 3.4.
Although I suppose RubyGems could activate rdoc only when it needs it or so.
Removing rdoc from the Gemfile might be a good workaround, I'm not sure when ruby/stringio#71 will get merged and released (I hope soon but it does not depend on me).

I didn't know about --prefer-local. It'd be useful to have something like that which prefers default & bundled & already-installed gems to installing newer versions.

@junaruga
Copy link
Member Author

..snip. Removing rdoc from the Gemfile might be a good workaround, ..snip..

I would like to keep the rdoc in the Gemfile for the cases with Fedora and the downstream Linux distro Rubies. I sent another PR #704 to pass the CI as a workaround.

@junaruga
Copy link
Member Author

junaruga commented Dec 3, 2023

As the #699 was fixed, we don't need this PR any more.

@junaruga junaruga closed this Dec 3, 2023
@junaruga junaruga deleted the wip/gemfile-test branch December 3, 2023 01:29
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