postmodern / ruby-install

Installs Ruby, JRuby, TruffleRuby, or mruby
MIT License
1.9k stars 252 forks source link

Rename to truffleruby+graalvm, only add Ruby executables in PATH, clean installation directory before installing #377

Closed eregon closed 3 years ago

eregon commented 3 years ago

Addresses https://github.com/postmodern/ruby-install/pull/373#issuecomment-662414406 and the following comments.

eregon commented 3 years ago

This needs a corresponding change in ruby-versions which I have here: https://github.com/eregon/ruby-versions/commit/f40e0c032744da6fee7739359964603af880979b

We don't need to care about the older name (graalvm) since ruby-install has no release with it.

postmodern commented 3 years ago

@eregon could you go ahead and push your changes to ruby-versions, then switch the ruby_versions_url back to the official one?

eregon commented 3 years ago

@postmodern Done, and PR updated.

eregon commented 3 years ago

@postmodern Do you mean 46d2d2c? I can remove that from this PR.

Ideally, the ruby's installation process should cleanly overwrite all files.

I don't think that's realistic. Any leftover file can cause unpredictable failures that nobody wants to investigate. Simple example: a stdlib file (or a bin/foo file) is removed, it would still be there if there was a previous installation and there is no such cleanup. And then you end up with "it works on my machine but not on yours" situations.

I see your point that it's problematic for /usr/local. Maybe we can detect if ruby-install installs to a directory with the ruby name in it, in which case it should be fairly safe? (e.g. removing ~/.rubies/ruby-2.6.5 when re-installing Ruby 2.6.5 makes perfect sense)

FWIW, both ruby-build and RVM remove if the installation directory already exists.

eregon commented 3 years ago

@postmodern I removed that commit from this PR.

eregon commented 3 years ago

Thanks for merging!

postmodern commented 3 years ago

FYI I have merged the better_parse_ruby branch into 0.8.0. This should now be able to handle ruby, version and ruby-version arguments. Unless there's an important reason why truffleruby+graalvm should contain the +, I would like to rename it to either truffleruby-graalvm or graalvm-truffleruby.

eregon commented 3 years ago

@postmodern Sounds nice, thanks. I think truffleruby-graalvm is good. I don't like graalvm-truffleruby because that sounds to me like all graalvm executables should be available.

donv commented 3 years ago

Regular truffleruby will still be available, right?

eregon commented 3 years ago

@donv Yes, truffleruby is TruffleRuby Native, and truffleruby-graalvm is TruffleRuby Native + JVM + ability to install and interop with other languages.

postmodern commented 3 years ago

@eregon what URL should I use for truffleruby-graalvm and how should I refer to it in the README? "TruffleRuby (GraalVM)"?

eregon commented 3 years ago

TruffleRuby (GraalVM) sounds good.

I will add instructions how to install truffleruby-graalvm in https://github.com/oracle/truffleruby/blob/master/doc/user/ruby-managers.md with ruby-install when it's released. Linking there doesn't seem very useful though, so I'd still link to the README: https://github.com/oracle/truffleruby

postmodern commented 3 years ago

@eregon if both TruffleRuby's will link to the same place, could I combine them into something like "TruffleRuby (native / GraalVM)"?

eregon commented 3 years ago

Yeah, that sounds good :)