ruby-build
ruby-build copied to clipboard
Initial attempt to add support for movable rubies
This follows the pattern that rvm uses. There's a --movable flag, and that adds some extra options.
Only tested on Ubuntu so far, but I can confirm that the configure options end up in RbConfig, but have not tested beyond that yet.
cc https://github.com/rbenv/ruby-build/issues/42
FYI, --enable-load-relative has several issues:
https://github.com/ruby/setup-ruby/issues/98#issuecomment-721233467
I think those issues are manageable to some extent. That comment references 2.3 and 2.1, both of which are EOL. And also truffle ruby. I think then is it should be possible to not allow movable in those cases.
Note the shebang issue affects all versions, i.e. gem install bundler fails with --enable-load-relative on all Ruby versions (at least when I tried). That very likely needs to be fixed or worked around.
Also I feel nobody really tests that configuration and if it fails it'll be ruby-build's "fault/responsibility" for using an unusual option.
Regarding truffleruby we already run the post-install hook and it already installs from binaries, so there is nothing to do. To me this is yet another clear sign CRuby should make their own binary movable builds, maybe that might happen if people open an issue on https://bugs.ruby-lang.org/ and it gains some support (e.g., nodejs has this).