Skip to content

ruby 4.0.0 compatibility & readline/reline#79

Draft
noraj wants to merge 4 commits intoHackplayers:devfrom
noraj:reline
Draft

ruby 4.0.0 compatibility & readline/reline#79
noraj wants to merge 4 commits intoHackplayers:devfrom
noraj:reline

Conversation

@noraj
Copy link
Contributor

@noraj noraj commented Jan 24, 2026

cleaner commit history of PR #77

replaces #77

see #77 for discussion history

- replaces readline with reline
- add reline as dependency
noraj added 3 commits January 25, 2026 03:21
- reflect the reline/readline change
- use ruby alpine image instead of installing ruby in an alpine image
@OscarAkaElvis
Copy link
Member

I'm testing the new version of the .rb file and once connect, There is a warning:

image

And the remote path completion is not working.

Maybe we need to check Reline source code to find the analogue function for the old Readline.quoting_detection_proc. It seems there is no quoting_detection_proc function in Reline. Maybe it is called different. Not sure, didn't check yet.

And soon I'll be checking also the Dockerfile

@noraj
Copy link
Contributor Author

noraj commented Jan 27, 2026

@OscarAkaElvis Migration from readline to reline on that specific issue is something you already studied in 2022 with postmodern: ruby/reline#444

The issue was fixed in late 2024 by ruby/reline#782

There is no longer quoting_detection_proc but there is completion_proc= to create auto-completion. So it may require a few adjustments.

@OscarAkaElvis
Copy link
Member

OscarAkaElvis commented Jan 27, 2026

Yeah, we were aware of that issue and that it was resolved... but now, before accepting this PR, we need to figure out how to make the remote path completion to work using Reline. Otherwise we'll not be able to accept the PR as we don't want to lose features.

Hopefully we'll achieve it. Give us some time.

Now I'll check the Dockerfile and I'll be back with some feedback if needed. Thanks!

@OscarAkaElvis
Copy link
Member

OscarAkaElvis commented Jan 27, 2026

I've checked the Dockerfile and looks good to me. It builds well and I was testing it and it works.

Of course, it works in the same way as the .rb file (for now without remote path completion).

On the other hand, I saw some weird warnings that are appearing sometimes (not related to docker, they are happening with or without the use of docker). And they are happening only sometimes for example on exit:

image

To be honest, I'm not sure yet if this is related to the change to Reline, but I'd say that the warnings were no happening before.

We'll be checking all of these problems one by one.

@OscarAkaElvis
Copy link
Member

More warnings to handle. This time only from docker:

image

I don’t want to sound discouraging, but it seems there’s still a lot of work ahead for this PR to move forward.

It’s not just about the warnings. I spent some time "playing around" trying to get autocomplete working with Reline based on the files from the PR, and so far I haven’t been able to get it working.

@OscarAkaElvis
Copy link
Member

hey @noraj , we (the team) were doing some tests trying to make the remote autocompletion to work but we obtained poor results... very basic completion, but no absolute path completions, no completions when spaces are in place etc... I mean, the results of using Reline for remote path autocompletion seems to not be very reliable.

What is the purpose of this? just to be able to use bundle 4.0 with Evil-WinRM? ok, then I guess that we can do what you proposed in the first PR, just adding reline to the gemspec file as it will no longer be part of the Ruby default included gems in modern ruby versions... ok but that's all. I mean, we can set it in the gemspec and keep using readline, can't we?

@noraj
Copy link
Contributor Author

noraj commented Jan 28, 2026

ore warnings to handle. This time only from docker:
image

Those are not related to readline / reline change, but just the use of the winrm gem on more recent version of ruby like ruby 4.0.0. This is upstream issue that we should report at https://github.com/WinRb/WinRM/issues.

On the other hand, I saw some weird warnings that are appearing sometimes (not related to docker, they are happening with or without the use of docker). And they are happening only sometimes for example on exit:
image

Again, it is not related to readline / reline change but to the use of recent rexml version with winrm gem. It's a know issue: WinRb/WinRM#355.

@noraj
Copy link
Contributor Author

noraj commented Jan 28, 2026

hey @noraj , we (the team) were doing some tests trying to make the remote autocompletion to work but we obtained poor results... very basic completion, but no absolute path completions, no completions when spaces are in place etc... I mean, the results of using Reline for remote path autocompletion seems to not be very reliable.

What is the purpose of this? just to be able to use bundle 4.0 with Evil-WinRM? ok, then I guess that we can do what you proposed in the first PR, just adding reline to the gemspec file as it will no longer be part of the Ruby default included gems in modern ruby versions... ok but that's all. I mean, we can set it in the gemspec and keep using readline, can't we?

Yeah I guess if we can't find a way to get suitable auto-completion with reline, we could dodge this PR and just add readline (not reline) in gemspec. Moving to Reline seems a good idea first as readline has been abandoned for years and that reline does not need system dependency and so less compilation flags.

@noraj noraj marked this pull request as draft January 28, 2026 15:44
@OscarAkaElvis
Copy link
Member

yeah ok, let's leave this open as draft to see if we can make it work... but if not, we can do the readline addition in gemspec.

And regarding the Rexml warnings... ok, hopefully they will fix them soon. Seems out of our hands.

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