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

cucumber scenarios fail with ruby 3.3 #910

Closed
mtasaka opened this issue Sep 24, 2023 · 10 comments
Closed

cucumber scenarios fail with ruby 3.3 #910

mtasaka opened this issue Sep 24, 2023 · 10 comments
Assignees

Comments

@mtasaka
Copy link

mtasaka commented Sep 24, 2023

With ruby 3.3 ( I tried ruby/ruby@2ceb536 ) , aruba ( e9192be ) cucumber test fails like:

Failing Scenarios:
cucumber features/03_testing_frameworks/cucumber/steps/command/debug_your_command_in_aruba.feature:11 # Scenario: You can use a debug repl in your cli program
cucumber features/03_testing_frameworks/cucumber/steps/command/wait_for_output_of_command.feature:24 # Scenario: Detect subset of multiline output
cucumber features/03_testing_frameworks/cucumber/steps/command/wait_for_output_of_command.feature:47 # Scenario: Stop when output appears
cucumber features/06_use_aruba_cli/open_console.feature:6 # Scenario: Start console
cucumber features/06_use_aruba_cli/open_console.feature:14 # Scenario: Show help
cucumber features/06_use_aruba_cli/open_console.feature:31 # Scenario: Show methods
cucumber features/06_use_aruba_cli/open_console.feature:44 # Scenario: Has its own history file

I think 4 open_console.feature scenarios failures are due to ruby/irb#613 , for other 3 failures I have no idea for now.

Details are:

expected "Feature: Exit status in debug environment\n\n  @debug\n  Scenario: Run program with debug code # fea...                │\n└──────────────────────────────────────────────────────────────────────────────┘" to string includes: "[1] pry(main)> foo\n=> \"hello\"\n[2] pry(main)> exit"
Diff:
@@ -1,4 +1,37 @@
-[1] pry(main)> foo
-=> "hello"
-[2] pry(main)> exit
+Feature: Exit status in debug environment
+
+  @debug
+  Scenario: Run program with debug code # features/debug.feature:4
+
+��From:�� /builddir/build/GIT/aruba/tmp/aruba/cli-app/bin/aruba-test-cli:9 :
+
+     4: $stdout.sync = true
+     5: 
+     6: foo = 'hello'
+     7: 
+     8: require 'pry'
+ =>  9: binding.pry
+    10: 
+    11: exit 0
+
+�[0G[1] pry(main)> [1] pry(main)> [1] pry(main)> f[1] pry(main)> f[1] pry(main)> fo[1] pry(main)> fo[1] pry(main)> foo[1] pry(main)> foo=> "hello"
+[2] pry(main)> [2] pry(main)> [2] pry(main)> e[2] pry(main)> e[2] pry(main)> ex[2] pry(main)> ex[2] pry(main)> exi[2] pry(main)> exi[2] pry(main)> exit[2] pry(main)> exit    When I run `aruba-test-cli`         # /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:3
+    Then the exit status should be 0    # /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:334
+
+1 scenario (1 passed)
+2 steps (2 passed)
+0m0.395s
+┌──────────────────────────────────────────────────────────────────────────────┐
+│ Share your Cucumber Report with your team at https://reports.cucumber.io     │
+│                                                                              │
+│ Command line option:    --publish                                            │
+│ Environment variable:   CUCUMBER_PUBLISH_ENABLED=true                        │
+│ cucumber.yml:           default: --publish                                   │
+│                                                                              │
+│ More information at https://cucumber.io/docs/cucumber/environment-variables/ │
+│                                                                              │
+│ To disable this message, specify CUCUMBER_PUBLISH_QUIET=true or use the      │
+│ --publish-quiet option. You can also add this to your cucumber.yml:          │
+│ default: --publish-quiet                                                     │
+└──────────────────────────────────────────────────────────────────────────────┘
 (RSpec::Expectations::ExpectationNotMetError)
./lib/aruba/cucumber/command.rb:216:in `nil'
./features/support/timing.rb:9:in `block in <top (required)>'
./lib/aruba/platforms/local_environment.rb:22:in `call'
./lib/aruba/platforms/unix_platform.rb:79:in `with_environment'
./lib/aruba/api/core.rb:222:in `block in with_environment'
./lib/aruba/platforms/unix_environment_variables.rb:189:in `nest'
./lib/aruba/api/core.rb:220:in `with_environment'
./lib/aruba/cucumber/hooks.rb:7:in `block in <top (required)>'
features/03_testing_frameworks/cucumber/steps/command/debug_your_command_in_aruba.feature:55:in `the output should contain:'

expected "Feature: Run command\n\n  Scenario: Run command                             # features/output.featur...                │\n└──────────────────────────────────────────────────────────────────────────────┘" not to string includes: " failed)"
Diff:
@@ -1,40 +1,79 @@
- failed)
+Feature: Run command
+
+  Scenario: Run command                             # features/output.feature:2
+    When I run `irb --prompt default` interactively # /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:26
+    And I wait for output to contain:               # /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:88
+      """
+      irb(main):001:0>
+      """
+      execution expired (Timeout::Error)
+      /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:89:in `nil'
+      /builddir/build/GIT/aruba/lib/aruba/platforms/local_environment.rb:22:in `call'
+      /builddir/build/GIT/aruba/lib/aruba/platforms/unix_platform.rb:79:in `with_environment'
+      /builddir/build/GIT/aruba/lib/aruba/api/core.rb:222:in `block in with_environment'
+      /builddir/build/GIT/aruba/lib/aruba/platforms/unix_environment_variables.rb:189:in `nest'
+      /builddir/build/GIT/aruba/lib/aruba/api/core.rb:220:in `with_environment'
+      /builddir/build/GIT/aruba/lib/aruba/cucumber/hooks.rb:7:in `block in <top (required)>'
+      features/output.feature:4:in `I wait for output to contain:'
+    And I type "puts 'hello'"                       # /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:35
+    And I type "exit"                               # /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:35
+    Then the output should contain "hello"          # /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:123
+
+Failing Scenarios:
+cucumber features/output.feature:2 # Scenario: Run command
+
+1 scenario (1 failed)
+5 steps (1 failed, 3 skipped, 1 passed)
+0m15.116s
+┌──────────────────────────────────────────────────────────────────────────────┐
+│ Share your Cucumber Report with your team at https://reports.cucumber.io     │
+│                                                                              │
+│ Command line option:    --publish                                            │
+│ Environment variable:   CUCUMBER_PUBLISH_ENABLED=true                        │
+│ cucumber.yml:           default: --publish                                   │
+│                                                                              │
+│ More information at https://cucumber.io/docs/cucumber/environment-variables/ │
+│                                                                              │
+│ To disable this message, specify CUCUMBER_PUBLISH_QUIET=true or use the      │
+│ --publish-quiet option. You can also add this to your cucumber.yml:          │
+│ default: --publish-quiet                                                     │
+└──────────────────────────────────────────────────────────────────────────────┘
 (RSpec::Expectations::ExpectationNotMetError)
./lib/aruba/cucumber/command.rb:133:in `nil'
./lib/aruba/cucumber/testing_frameworks.rb:9:in `/^the feature(?:s)? should(?: all)? pass$/'
./features/support/timing.rb:9:in `block in <top (required)>'
./lib/aruba/platforms/local_environment.rb:22:in `call'
./lib/aruba/platforms/unix_platform.rb:79:in `with_environment'
./lib/aruba/api/core.rb:222:in `block in with_environment'
./lib/aruba/platforms/unix_environment_variables.rb:189:in `nest'
./lib/aruba/api/core.rb:220:in `with_environment'
./lib/aruba/cucumber/hooks.rb:7:in `block in <top (required)>'
features/03_testing_frameworks/cucumber/steps/command/wait_for_output_of_command.feature:45:in `the features should all pass'

expected "Feature: Run command\n\n  Scenario: Run command                                      # features/outp...                │\n└──────────────────────────────────────────────────────────────────────────────┘" not to string includes: " failed)"
Diff:
@@ -1,44 +1,87 @@
- failed)
+Feature: Run command
+
+  Scenario: Run command                                      # features/output.feature:2
+    When I run `irb --prompt default` interactively          # /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:26
+    And I wait for output to contain:                        # /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:88
+      """
+      irb(main):001:0>
+      """
+      execution expired (Timeout::Error)
+      /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:89:in `nil'
+      /builddir/build/GIT/aruba/lib/aruba/platforms/local_environment.rb:22:in `call'
+      /builddir/build/GIT/aruba/lib/aruba/platforms/unix_platform.rb:79:in `with_environment'
+      /builddir/build/GIT/aruba/lib/aruba/api/core.rb:222:in `block in with_environment'
+      /builddir/build/GIT/aruba/lib/aruba/platforms/unix_environment_variables.rb:189:in `nest'
+      /builddir/build/GIT/aruba/lib/aruba/api/core.rb:220:in `with_environment'
+      /builddir/build/GIT/aruba/lib/aruba/cucumber/hooks.rb:7:in `block in <top (required)>'
+      features/output.feature:4:in `I wait for output to contain:'
+    And I type '3.times { |i| puts "Test #{i}"; sleep 0.1 }' # /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:35
+    And I stop the command if output contains:               # /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:66
+      """
+      Test 0
+      """
+    Then the output should contain "Test 0"                  # /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:123
+    Then the output should not contain "Test 2"              # /builddir/build/GIT/aruba/lib/aruba/cucumber/command.rb:130
+
+Failing Scenarios:
+cucumber features/output.feature:2 # Scenario: Run command
+
+1 scenario (1 failed)
+6 steps (1 failed, 4 skipped, 1 passed)
+0m15.116s
+┌──────────────────────────────────────────────────────────────────────────────┐
+│ Share your Cucumber Report with your team at https://reports.cucumber.io     │
+│                                                                              │
+│ Command line option:    --publish                                            │
+│ Environment variable:   CUCUMBER_PUBLISH_ENABLED=true                        │
+│ cucumber.yml:           default: --publish                                   │
+│                                                                              │
+│ More information at https://cucumber.io/docs/cucumber/environment-variables/ │
+│                                                                              │
+│ To disable this message, specify CUCUMBER_PUBLISH_QUIET=true or use the      │
+│ --publish-quiet option. You can also add this to your cucumber.yml:          │
+│ default: --publish-quiet                                                     │
+└──────────────────────────────────────────────────────────────────────────────┘
 (RSpec::Expectations::ExpectationNotMetError)
./lib/aruba/cucumber/command.rb:133:in `nil'
./lib/aruba/cucumber/testing_frameworks.rb:9:in `/^the feature(?:s)? should(?: all)? pass$/'
./features/support/timing.rb:9:in `block in <top (required)>'
./lib/aruba/platforms/local_environment.rb:22:in `call'
./lib/aruba/platforms/unix_platform.rb:79:in `with_environment'
./lib/aruba/api/core.rb:222:in `block in with_environment'
./lib/aruba/platforms/unix_environment_variables.rb:189:in `nest'
./lib/aruba/api/core.rb:220:in `with_environment'
./lib/aruba/cucumber/hooks.rb:7:in `block in <top (required)>'
features/03_testing_frameworks/cucumber/steps/command/wait_for_output_of_command.feature:66:in `the features should all pass'

expected "<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:128:in `require': cannot load suc...hor-1.2.1/lib/thor/base.rb:485:in `start'\n\tfrom /builddir/build/GIT/aruba/exe/aruba:7:in `<main>'" to string includes: "aruba:001:0>"
Diff:
@@ -1,10 +1,19 @@
-aruba:001:0>
+<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:128:in `require': cannot load such file -- irb/ext/save-history (LoadError)
+Did you mean?  irb/ext/eval_history
+	from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:128:in `require'
+	from /builddir/build/GIT/aruba/lib/aruba/console.rb:32:in `start'
+	from /builddir/build/GIT/aruba/lib/aruba/cli.rb:17:in `console'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
+	from /builddir/build/GIT/aruba/exe/aruba:7:in `<main>'
 (RSpec::Expectations::ExpectationNotMetError)
./lib/aruba/cucumber/command.rb:216:in `nil'
./features/support/timing.rb:9:in `block in <top (required)>'
./lib/aruba/platforms/local_environment.rb:22:in `call'
./lib/aruba/platforms/unix_platform.rb:79:in `with_environment'
./lib/aruba/api/core.rb:222:in `block in with_environment'
./lib/aruba/platforms/unix_environment_variables.rb:189:in `nest'
./lib/aruba/api/core.rb:220:in `with_environment'
./lib/aruba/cucumber/hooks.rb:7:in `block in <top (required)>'
features/06_use_aruba_cli/open_console.feature:9:in `the output should contain:'

expected "<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:128:in `require': cannot load suc...hor-1.2.1/lib/thor/base.rb:485:in `start'\n\tfrom /builddir/build/GIT/aruba/exe/aruba:7:in `<main>'" to string includes: "Version:"
Diff:
@@ -1,10 +1,19 @@
-Version:
+<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:128:in `require': cannot load such file -- irb/ext/save-history (LoadError)
+Did you mean?  irb/ext/eval_history
+	from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:128:in `require'
+	from /builddir/build/GIT/aruba/lib/aruba/console.rb:32:in `start'
+	from /builddir/build/GIT/aruba/lib/aruba/cli.rb:17:in `console'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
+	from /builddir/build/GIT/aruba/exe/aruba:7:in `<main>'
 (RSpec::Expectations::ExpectationNotMetError)
./lib/aruba/cucumber/command.rb:216:in `nil'
./features/support/timing.rb:9:in `block in <top (required)>'
./lib/aruba/platforms/local_environment.rb:22:in `call'
./lib/aruba/platforms/unix_platform.rb:79:in `with_environment'
./lib/aruba/api/core.rb:222:in `block in with_environment'
./lib/aruba/platforms/unix_environment_variables.rb:189:in `nest'
./lib/aruba/api/core.rb:220:in `with_environment'
./lib/aruba/cucumber/hooks.rb:7:in `block in <top (required)>'
features/06_use_aruba_cli/open_console.feature:18:in `the output should contain:'

expected "<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:128:in `require': cannot load suc...hor-1.2.1/lib/thor/base.rb:485:in `start'\n\tfrom /builddir/build/GIT/aruba/exe/aruba:7:in `<main>'" to string includes: "Methods:"
Diff:
@@ -1,10 +1,19 @@
-Methods:
+<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:128:in `require': cannot load such file -- irb/ext/save-history (LoadError)
+Did you mean?  irb/ext/eval_history
+	from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:128:in `require'
+	from /builddir/build/GIT/aruba/lib/aruba/console.rb:32:in `start'
+	from /builddir/build/GIT/aruba/lib/aruba/cli.rb:17:in `console'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
+	from /builddir/build/GIT/aruba/exe/aruba:7:in `<main>'
 (RSpec::Expectations::ExpectationNotMetError)
./lib/aruba/cucumber/command.rb:216:in `nil'
./features/support/timing.rb:9:in `block in <top (required)>'
./lib/aruba/platforms/local_environment.rb:22:in `call'
./lib/aruba/platforms/unix_platform.rb:79:in `with_environment'
./lib/aruba/api/core.rb:222:in `block in with_environment'
./lib/aruba/platforms/unix_environment_variables.rb:189:in `nest'
./lib/aruba/api/core.rb:220:in `with_environment'
./lib/aruba/cucumber/hooks.rb:7:in `block in <top (required)>'
features/06_use_aruba_cli/open_console.feature:35:in `the output should contain:'

expected "<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:128:in `require': cannot load suc...hor-1.2.1/lib/thor/base.rb:485:in `start'\n\tfrom /builddir/build/GIT/aruba/exe/aruba:7:in `<main>'" to string includes: "~/.aruba_history"
Diff:
@@ -1,10 +1,19 @@
-~/.aruba_history
+<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:128:in `require': cannot load such file -- irb/ext/save-history (LoadError)
+Did you mean?  irb/ext/eval_history
+	from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:128:in `require'
+	from /builddir/build/GIT/aruba/lib/aruba/console.rb:32:in `start'
+	from /builddir/build/GIT/aruba/lib/aruba/cli.rb:17:in `console'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
+	from /usr/share/gems/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
+	from /builddir/build/GIT/aruba/exe/aruba:7:in `<main>'
 (RSpec::Expectations::ExpectationNotMetError)
./lib/aruba/cucumber/command.rb:216:in `nil'
./features/support/timing.rb:9:in `block in <top (required)>'
./lib/aruba/platforms/local_environment.rb:22:in `call'
./lib/aruba/platforms/unix_platform.rb:79:in `with_environment'
./lib/aruba/api/core.rb:222:in `block in with_environment'
./lib/aruba/platforms/unix_environment_variables.rb:189:in `nest'
./lib/aruba/api/core.rb:220:in `with_environment'
./lib/aruba/cucumber/hooks.rb:7:in `block in <top (required)>'
features/06_use_aruba_cli/open_console.feature:49:in `the output should contain:'
@mtasaka mtasaka changed the title wait_for_output_of_command.feature fails with ruby 3.3 cucumber scenarios fail with ruby 3.3 Sep 24, 2023
@mtasaka
Copy link
Author

mtasaka commented Dec 4, 2023

ruby3.3 is going to be released within one month. Can you enable ruby3.3 on github CI and debug this issue?

@mvz
Copy link
Contributor

mvz commented Dec 4, 2023

Hi @mtasaka thanks for the reminder. I'll look into it.

@mvz mvz self-assigned this Dec 4, 2023
@mvz
Copy link
Contributor

mvz commented Dec 8, 2023

I have debugged this issue and the source of the difference is that require "readline" loads Reline in Ruby 3.3, and 'real' Readline in Ruby 3.2.

Reline behaves oddly when output is not a tty. This can be demonstrated without pry and without using Ruby 3.3 by running irb piping to tee:

$ irb | tee irb.log
irb(main):001> foo = 1
irb(main):001> firb(main):001> foirb(main):001> fooirb(main):001> foo irb(main):001> foo =irb(main):001> foo = irb(main):001> foo = 1=> 1
irb(main):002> foo
irb(main):002> firb(main):002> foirb(main):002> foo=> 1
irb(main):003> exit
irb(main):003> eirb(main):003> exirb(main):003> exiirb(main):003> exit %                                                                                                                                             

Or even simpler:

$ echo 'foo' | ruby -e 'require "reline"; puts Reline.readline(">")' | tee bar.log
>>>f>f>fo>fo>foo>foofoo

@mtasaka
Copy link
Author

mtasaka commented Dec 8, 2023

Fow now, I've forwarded to ruby for Reline behavior: https://bugs.ruby-lang.org/issues/20052

@mvz
Copy link
Contributor

mvz commented Dec 9, 2023

Summarizing, this issue with Reline affects the test suite because

  • pry uses Reline by default with Ruby 3.3
  • pry uses a non-empty prompt
  • Reline has the issue described above when output is not a tty
  • Aruba's SpawnProcess creates an output stream for the process that is not a tty

Options for Aruba are:

  • Change the test suite to use irb. For some reason (not yet clear to me), irb won't show any prompt when run this way, which means this problem doesn't occur
  • Change Aruba's SpawnProcess runner so the spawned process is a tty. I've looked into this and PTY.open might play a role in this but I don't yet see a solution that doesn't involve manually reading from the resulting output, which we now avoid by just passing an open file handle pointing to an open Tempfile.
  • Wait for the Reline bug (?) to be fixed. I'm not keen on this option because Aruba should be ready to test with Ruby 3.3 as soon as it's released

I lean toward the first option, which means

  • Updating the test suite
  • Documenting that Aruba will run processes under test with output that is not a tty
  • Opening a new ticket to add a feature to make the output streams ttys, either optionally or always

@tompng
Copy link

tompng commented Dec 10, 2023

As a workaround, adding gem 'readline-ext' like rails/rails might solve this. rails/rails#48183
require 'readline' tries to require real readline and fallbacks to reline in both ruby 3.2 and 3.3.
Ruby 3.3 does not bundle readline-ext anymore.

@mvz
Copy link
Contributor

mvz commented Dec 11, 2023

Thanks @tompng. I looked that pull request and its comments and another work-around was merged later, which uses Reline but sets TERM=dumb: rails/rails#48369. I will try and see if that works for Aruba as well.

@mvz mvz mentioned this issue Dec 17, 2023
3 tasks
@tompng
Copy link

tompng commented Dec 21, 2023

Some other workaround I found is to

Ease the assertion condition from contain to match

Then the output should match:
"""
\[1\] pry\(main\)> input1\n?=> output2
"""
And the output should match:
"""
\[2\] pry\(main\)> input2\n?=> output2
"""

Or use a dummy readline for test

Given an executable named "bin/aruba-test-cli" with:
"""
module DummyReadline
  def self.readline(prompt)
    gets.tap { |l| puts prompt + l }
  end
end
require 'pry'
Pry.start(self, input: DummyReadline)
"""

@mvz
Copy link
Contributor

mvz commented Dec 21, 2023

Thanks @tompng I'll try those.

mvz added a commit that referenced this issue Dec 23, 2023
In ruby 3.3, requiring readline does not load the real readline library
but falls back to reline by default. This creates odd output when the
terminal is not a real TTY, making the interactive debugging scenario
fail.

See #910 for details. Also, see
ruby/reline#616 for the resulting reline
issue.

As a workaround, add the readline-ext gem which tries to use the real
readline as was the default in Ruby 3.2 and earlier.
mvz added a commit that referenced this issue Dec 23, 2023
In Ruby 3.3, requiring readline does not load the real readline library
but falls back to reline by default. This creates odd output when the
terminal is not a real TTY and a prompt is used when getting input.
Because pry uses a prompt, this makes the interactive debugging scenario
fail.

This change works around this issue by switching to irb. Irb will not
use a prompt, possibly because the output is not a TTY.

See #910. Also, see
ruby/reline#616 for the resulting reline
issue.
@mvz
Copy link
Contributor

mvz commented Dec 24, 2023

With #914 merged, Aruba is ready for Ruby 3.3. Next steps are adding documentation that stdout and stderr of our SpawnProcess are not ttys, and then see if we can use PTY to present a tty.

@mvz mvz closed this as completed Dec 24, 2023
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

3 participants