While working on #229, I discovered the following: the installation of rlwrap on Debian and Ubuntu pulls ~80 MB of additional packages (python3 and other stuff). That sounds excessive for a mere readline wrapper. Given that, and the fact that rlwrap is bugged in Docker and requires hacks to operate, this is a proposal to replace it with another readline wrapper, rlfe. It has a much slimmer dependency tree and looks simpler. I've verified that it works, supports GNU readline's navigation commands (^A, ^E, etc.), handles ^C dorrectly.
Main points:
Interactive REPL is unlikely to be the "production" usecase for a Docker image. So, as long as we continue to provide the user-facing functionality in a similar way (GNU readine is still used), small differences shouldn't be a dealbreaker.
The primary way of non-interactive invoking Clojure scripts, clojure, is not affected in any way.
I also discovered that the entrypoint in current Alpine images seems to be broken because we didn't install rlwrap there before. Also, rlfe is not available on Alpine and will not be installed with these changes. However, the new wrapper script invokes clojuredirectly if rlfe is not found – a better behavior than what we have now, where calling clj on Alpine fails completely.
While working on #229, I discovered the following: the installation of
rlwrap
on Debian and Ubuntu pulls ~80 MB of additional packages (python3 and other stuff). That sounds excessive for a mere readline wrapper. Given that, and the fact that rlwrap is bugged in Docker and requires hacks to operate, this is a proposal to replace it with another readline wrapper, rlfe. It has a much slimmer dependency tree and looks simpler. I've verified that it works, supports GNU readline's navigation commands (^A, ^E, etc.), handles ^C dorrectly.Main points:
clojure
, is not affected in any way.rlwrap
there before. Also,rlfe
is not available on Alpine and will not be installed with these changes. However, the new wrapper script invokesclojure
directly ifrlfe
is not found – a better behavior than what we have now, where callingclj
on Alpine fails completely.