Skip to content

Conversation

@iHiD
Copy link
Member

@iHiD iHiD commented Sep 7, 2021

Closes #40

Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

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

Is Ruby 3 now the minimum version, or is it backwards compatible?

@iHiD
Copy link
Member Author

iHiD commented Sep 7, 2021

It's pretty backwards compatible. Code that raised deprecation warnings in Ruby 2.7 will now result in ArgumentError or different behaviour, but this is mainly around where kwargs and the final args being hashes could be confusing.

As Ruby 3.0 is now "normal" in production, I think we should probably make the upgrade.

@ErikSchierboom
Copy link
Member

:+1

@Steffan153
Copy link

When is this going to be merged? :)

@iHiD
Copy link
Member Author

iHiD commented Sep 22, 2021

The test runner codebase isn't actually compatible with Ruby 3 so that needs fixing first, then it'll get merged :)

@kotp
Copy link
Member

kotp commented Sep 24, 2021

We could mark this as draft until the prerequisite is done. That will prevent it from coming in early.

@iHiD iHiD marked this pull request as draft September 24, 2021 20:13
@katrinleinweber
Copy link
Contributor

… codebase isn't actually compatible with Ruby 3 …

@iHiD: Are there specific lines that need to be changed? I tried relying on RubyMine's default inspections & "problem" detection just now, but found none.

I'd be interested in taking a stab at this task, but I'd need a few pointers and help to get started.


Specifically, I'm encountering this after following the README's instructions:

Minitest::UnexpectedError: Errno::ENOENT: No such file or directory @ rb_sysopen - /tmp/…uuid…/output/results.json

for all TestRunnerTest#… tests, and for AttacksTest#test_large_output_is_truncated.

The folders are being created just fine, the input/…/*.rb files as well, so it seems that somewhere, writing the test results JSON fails (silently, it also seems).

@iHiD
Copy link
Member Author

iHiD commented Nov 5, 2021

@katrinleinweber Hi there :) Thanks for picking this up.

Try uncommenting one of https://github.com/exercism/ruby-test-runner/blob/main/test/test_helper.rb#L61 and commenting out the ones below. You should get better info then. This is a weird project as it's effectively wrapping minitest in an external runner, and capturing stdout/stderr, so getting logging out can be tricky. But that should help.

I think the issue might have been that Mandate wasn't compatible with Ruby 3, but try using 1.0.0.beta1 for that and see if it fixes it. (I maintain Mandate). Any/most pain is probably around kwargs and similar, which is where Ruby 3 changes in quite a breaking way.

Happy to answer questions and I can take a look at things if there's anything specific that needs another pair of eyes.

@katrinleinweber
Copy link
Contributor

katrinleinweber commented Nov 5, 2021

Thank you, @iHiD! I'm suggesting #47 as an alternative to this PR.

@iHiD
Copy link
Member Author

iHiD commented Nov 6, 2021

Closing in favour of #47

@iHiD iHiD closed this Nov 6, 2021
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.

Tests for Word Count pass locally with Ruby 2.6 but fail on Exercism website because test runner is using Ruby 2.5.9

6 participants