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

Remove version constraints in gemspec and some CI workflow fixes #748

Merged
merged 6 commits into from
Dec 25, 2023

Conversation

gemmaro
Copy link
Contributor

@gemmaro gemmaro commented Dec 24, 2023

This is a continuation of #746.

The summary of changes are bellow:

  • Remove gem version conditionals in the gemspec file, which is evaluated in release phase, so one cannot use conditionals in the file. This is a regression of Use newer version of dependency or omit one for newer Ruby version #746.
  • Use an unfrozen string value in the test code. This passes the test workflow for the Ruby v.1.9.3.
  • Remove Rake version constraint from the gemspec file. Older Rake has an issue with the latest Ruby version.
  • Use Ubuntu 20.04 for Ruby 2.2.10. Bundler cannot be installed with Ruby 2.2.10 on the latest Ubuntu.

Please refer also to the pointers in commit messages.

Best,

See also mishina2228's comment[1].

[1] mizzy#746 (comment)
See also mishina2228's comment[1].

[1] mizzy#746 (comment)

Remove gem version conditionals in gemspec

See also mishina2228's comment[1].

[1] mizzy#746 (comment)
Failures:

  1) Specinfra::Backend::Exec#build_command with complex command should escape quotes
     Failure/Error: if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7')

     RuntimeError:
       can't modify frozen String
     # ./spec/backend/exec/build_command_spec.rb:21:in `new'
     # ./spec/backend/exec/build_command_spec.rb:21:in `block (4 levels) in <top (required)>'
Reference: GitHub / ruby / rake / undefined method =~ in Ruby 3.2 mizzy#431 [1]

Error output:

  rake aborted!
  undefined method `=~' for #<Proc:0x00007f488b282050 /opt/hostedtoolcache/Ruby/3.2.2/x64/lib/ruby/gems/3.2.0/gems/rake-10.1.1/lib/rake/application.rb:357 (lambda)>

  (See full trace by running task with --trace)
  Error: Process completed with exit code 1.

[1] ruby/rake#431
Ruby 2.2.10 cannot be installed on the latest Ubuntu but the Ubuntu 20.04.

Reference: GitHub / ruby / setup-ruby / Bundler install appears broken
           on Ruby 2.2 / the summary comment by eregon [1]

Error output:

  Installing Bundler
    Bundler 2 requires Ruby 2.3+, using Bundler 1 on Ruby <= 2.2
    /opt/hostedtoolcache/Ruby/2.2.10/x64/bin/gem install bundler -v ~> 1.0
    ERROR:  While executing gem ... (RuntimeError)
        Marshal.load reentered at marshal_load
    Took   0.28 seconds

[1] ruby/setup-ruby#496 (comment)
@gemmaro gemmaro force-pushed the fix/remove-conditionals-in-gemspec branch from cad255f to e611262 Compare December 24, 2023 03:20
@gemmaro gemmaro force-pushed the fix/remove-conditionals-in-gemspec branch from e611262 to 70f5aef Compare December 24, 2023 03:22
@gemmaro gemmaro marked this pull request as ready for review December 24, 2023 03:23
@mizzy
Copy link
Owner

mizzy commented Dec 25, 2023

Great work! Thanks a lot!

@mizzy mizzy merged commit 2a05a3b into mizzy:master Dec 25, 2023
12 of 13 checks passed
@mizzy
Copy link
Owner

mizzy commented Dec 25, 2023

Released as v2.87.2.

@gemmaro gemmaro deleted the fix/remove-conditionals-in-gemspec branch December 25, 2023 03:43
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.

2 participants