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

Test failure with ruby 3.0.2 #828

Open
lucaskanashiro opened this issue Oct 19, 2021 · 1 comment
Open

Test failure with ruby 3.0.2 #828

lucaskanashiro opened this issue Oct 19, 2021 · 1 comment

Comments

@lucaskanashiro
Copy link

Problem description

In Debian, we are moving from ruby2.7 to ruby3.0 and ruby-byebug is failing to build with the new version. Here is the full build log:

https://people.debian.org/~kanashiro/ruby3.0/round2/builds/3/ruby-byebug/ruby-byebug_11.1.3-1+rebuild1633376056_amd64.build.txt

You can see only test failures against ruby3.0 but the problems seems to be when loading the extension, however, it seems to be built fine.

Expected behavior

byebug should build and pass all tests against ruby 3.0.

Actual behavior

It fails as described above.

Steps to reproduce the problem

In my case, build the Debian package in a Debian unstable environment but installing ruby-dev-all from Debian experimental.

I believe this is also reproducible if you try to build it using ruby 3.0.2.

@dleidert
Copy link

dleidert commented Nov 1, 2021

The problem is that the tests run exe/byebug directly. The fix for us was quite easy by enabling the behavior you have reserved for Windows only: run the script and precede it with the correct ruby binary. We applied this small patch. Maybe this is suitable for upstream as well (I actually don't see any harm in it):

--- a/test/support/utils.rb
+++ b/test/support/utils.rb
@@ -273,9 +273,9 @@ module Byebug
     #
     def binstub
       cmd = "exe/byebug"
-      return [cmd] unless Gem.win_platform?
+      #return [cmd] unless Gem.win_platform?
 
-      [RbConfig.ruby, cmd]
+      return [RbConfig.ruby, cmd]
     end
   end
 end

https://salsa.debian.org/ruby-team/ruby-byebug/-/blob/master/debian/patches/996145-fix-tests-with-ruby3.patch

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

No branches or pull requests

2 participants