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

Drop debugging support in preference of validated builds against Ruby 2.7.x -> 3.2.x #292

Merged
merged 3 commits into from
Jul 5, 2023

Conversation

chadlwilson
Copy link
Contributor

@chadlwilson chadlwilson commented Jun 29, 2023

Test against more than Ruby 2.7, along us to roll things forward more easily.

Removes debugging as it fails on Ruby 3+. Not really sure the cause, but ruby-debug/debase#94 and No source for ruby-3.x.x-pxxx errors preventing the gems from installing in some cases. Might relate to the way GH Actions sets up Ruby on ubuntu and windows, however I can also replicate some problems via containers and various issues on MacOS with certain debase and ruby combinations.

See #294 for adding debugging back if folks have interest.

@chadlwilson chadlwilson self-assigned this Jun 29, 2023
@chadlwilson chadlwilson force-pushed the test-other-ruby-versions branch 2 times, most recently from 7a92d80 to 893e44e Compare July 1, 2023 13:55
@gaugebot
Copy link

gaugebot bot commented Jul 1, 2023

@chadlwilson Thank you for contributing to gauge-ruby. Your pull request has been labeled as a release candidate 🎉🎉.

Merging this PR will trigger a release.

Please bump up the version as part of this PR.

Instructions to bump the version can found at CONTRIBUTING.md

If the CONTRIBUTING.md file does not exist or does not include instructions about bumping up the version, please looks previous commits in git history to see what changes need to be done.

debase and ruby-debug-ide don't seem to install reliably on Ruby 3.1 Linux for reasons that are hard to get to the bottom of. Maybe this is better to be added back later, perhaps via ruby/debug

Signed-off-by: Chad Wilson <[email protected]>
@chadlwilson
Copy link
Contributor Author

chadlwilson commented Jul 2, 2023

Hey @zabil and @sriv - what do you think about this?

The intent here was to bring confidence that things 'work' on newer Ruby versions, especially with the parser/unparser dependencies which have looseish couplings to support for only certain ruby code versions.

The current setup (including ruby-debug-ide and debase) generally does bundle install ok in later Ruby versions (I have validated up to and including ruby 3.1 with GoCD func tests via Linux x64, Linux arm64 and Darwin arm64) but no idea if the debugging actually works, as I don't use VS Code or this functionality.

I also don't really know why the gems won't install successfully via the GH actions builds here although there are reported weirdnesses an problems with various debase versions across archs in the wider community.

I don't really want to drop debugging support, but it would be good to validate the plugin on later rubies. Right now ruby 2.7 is the only version the isntalls work on via GH actions and that is officially EOL. (Probably somewhat maintained on older enterprisey Linux distros but not on Darwin/windows)

@zabil
Copy link
Member

zabil commented Jul 3, 2023

but it would be good to validate the plugin on later rubies.

Makes sense to me.

@chadlwilson
Copy link
Contributor Author

chadlwilson commented Jul 5, 2023

but it would be good to validate the plugin on later rubies.

Makes sense to me.

Perhaps I wasn't so clear - does it make sense even at the cost of dropping the debugging support due to these unexplained failures installing the debase source gems? I'm not so confident on that trade-off.

I feel to fix those it'd involve either reworking debugging support using the more modern ruby/debug (which is a bit beyond my capability/interest) or digging much deeper into why the gem installs succeed in some OSes/setups but not others - possibly due to missing dev libs/headers and such.

If someone has the necessary ruby insight I could create another branch/PR to show the failures in GH actions for someone to take a look.

@zabil
Copy link
Member

zabil commented Jul 5, 2023

Hey @chadlwilson

What I meant is that it's beneficial to support newer Ruby versions if that means sacrificing the debug functionality, until someone picks up and fixes it.

An option could be creating a separate plugin tailored specifically for Ruby 3+ users. This would allow us to inform them about any non-functional elements while still maintaining backwards compatibility. I understand that it might require extra effort, but in the long run, it could potentially be less disruptive.

I'm also interested in hearing @sriv's thoughts on this approach.

@chadlwilson
Copy link
Contributor Author

chadlwilson commented Jul 5, 2023

An option could be creating a separate plugin tailored specifically for Ruby 3+ users. This would allow us to inform them about any non-functional elements while still maintaining backwards compatibility. I understand that it might require extra effort, but in the long run, it could potentially be less disruptive.

Yeah, possibly.

Although if thinking of that direction in preference to dropping debugging, it would probably make more sense to first dig deeper to understand the nature of the problems are on Ruby 3.

gauge-ruby installs and works perfectly fine on Ruby 3.0 and Ruby 3.1 with the existing debase/ruby-debug-ide gems on aarch64-linux, x86_x64-linux (via CentOS Stream 9), arm64-darwin (me locally) within the context of GoCD's ruby-functional-tests so the failures to bundle install during debase-ruby_core_source for the builds here via GH Actions on Ubuntu and Windows are a mystery.

Maybe I'll spend a bit more time digging into that and trying to replicate. It might just be some dev tools need to be apt-geted on certain OSes.

@sriv
Copy link
Member

sriv commented Jul 5, 2023

I am ok to ditch the debugger support for ruby altogether. I don't know if it is being used by anyone, I would be surprised if there are many takers.

I would prioritize modern ruby over debase support. (debase is an indirect dependency IIRC brought in by ruby-debug-ide). I see that ruby/debug now has support for remote debugging, we can look at adding that in if required later.

@sriv
Copy link
Member

sriv commented Jul 5, 2023

In any case, I wouldn't want a separate plugin for ruby3. If we want backward compatibility check, we could check for RUBY_VERSION and conditionally include debugging support for ruby 2.x alone. IMO, it might be cleaner to just remove the debugger support, it will trim the dependency tree as well

@chadlwilson
Copy link
Contributor Author

OK, thanks both.

Let me timebox some experiments. Might be something that can be worked around by installing build toolchains (apt install build-essential or similar), at least for the builds. Would be a shame if that was required for gauge-ruby users though, and not sure why it worked earlier for Ruby 2.7 with nothing special on the runners, but the world of native interop is still a bit of a mystery...

@chadlwilson
Copy link
Contributor Author

chadlwilson commented Jul 5, 2023

I give up: https://github.com/getgauge/gauge-ruby/actions/runs/5463424559/jobs/9944094508

Tried various combinations of debase versions (0.2.4.1, 0.2.5.beta2) and debase-ruby_core_source versions in containers and with GH Actions, and sometimes I can get 3.0 to bundle install, but never 3.1. It seems in general debase and/or ruby-debug-ide just doesn't work/install easily, and/or properly on Ruby 3.0 or Ruby 3.1 across mac/linux - let alone Windows. There are all sorts of difficult to track issues with the native extensions.

Might related to the ruby/setup-ruby installs on GH actions, but some I can replicate locally as well.

Given Ruby 2.7 is EOL, and the need to have confidence with gem installs on 3.x I think we should just drop debugging for now and I'll raise a "help wanted" issue for someone to re-add if they are keen. Even if I can get the gems to install, seems unlikely it actually works with confidence given the issues reported against ruby-debug-ide.

ruby-debug/ruby-debug-ide#217
ruby-debug/ruby-debug-ide#223

ruby-debug/debase#94
ruby-debug/debase#95
ruby-debug/debase#98

@chadlwilson chadlwilson changed the title Run tests against multiple Ruby versions Drop debugging support in preference of validated builds against Ruby 2.7.x -> 3.2.x Jul 5, 2023
@chadlwilson chadlwilson added the dependencies Pull requests that update a dependency file label Jul 5, 2023
@chadlwilson chadlwilson merged commit 00f321c into getgauge:master Jul 5, 2023
@chadlwilson chadlwilson deleted the test-other-ruby-versions branch July 5, 2023 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ReleaseCandidate technical
Development

Successfully merging this pull request may close these issues.

3 participants