-
Notifications
You must be signed in to change notification settings - Fork 3
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
Possible reader issues when running the Clojerl REPL in a release? #86
Comments
The
This results in a (sort of) working Clojerl REPL:
I'm saying "sort of working" since I still have to investigate why the re-printing of the characters from the input is happening. |
The same I/O options need to be set before starting the Clojerl REPL through the other method mentioned in #85, and this actually works much better than calling
To avoid this situation for users in the future (i.e. REPL failing to start because of I/O options) I think it might be a good idea to either:
|
I think I like your first option, because I imagine this really being needed/wanted any time a REPL is started. I guess my only questions would be "How big of a change is this?" and "Is this going to impact anything/anyone that currently starts the REPL directly?" |
It's a very small change.
I don't think so. Those options are currently being set here when the |
Evaluating
After some investigation I realized this is because the
I was wondering how does Elixir handle this and they call defp set_expand_fun do
gl = Process.group_leader()
expand_fun =
if node(gl) != node() do
IEx.Autocomplete.remsh(node())
else
&IEx.Autocomplete.expand/1
end
# expand_fun is not supported by a shell variant
# on Windows, so we do two IO calls, not caring
# about the result of the expand_fun one.
_ = :io.setopts(gl, expand_fun: expand_fun)
:io.setopts(gl, binary: true, encoding: :unicode)
end |
Fixed by clojerl/clojerl#760 |
This was fixed by (clojerl/clojerl#763). Starting a REPL from an Erlang shell should work without issues or weird output now. |
As part of exploring the issue in #85, I ran into another problem.
When I start a release-based Clojerl REPL with the following (where
PROJ_BIN
points to an app's release script):And then attempt to execute a call in Clojerl, I get a series of Clojerl prompts written back to the terminal:
If I start from just the console and then switch from Erlang into Clojerl:
CODE_LOADING_MODE=interactive $(PROJ_BIN) console
then I see a little more:
The text was updated successfully, but these errors were encountered: