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
Adjust mix nerves.system.shell
for OTP 26
#897
Conversation
What do you do to continue the build after you run Docker? |
The output docker command is the last step of "starting the system shell" - You can do the typical things there such as Later one, if one uses the system as a path dependency then those same build artifacts are used with |
e3b6c91
to
63d0b82
Compare
@fhunleth This is ready for another review. I adjusted it to output the usable command at the end. A really hacky workaround is a user could do |
f814107
to
227654e
Compare
This is a great improvement! Not the smooth experience of OTP 25 but much better than the cryptic error message. The only caveat I have is this message after running the long docker command:
I think this last part could be a bit more clear:
The command already leaves you on |
Also, not sure how much of a problem this is, but since the shell used to run within iex itself, exit it was "as intuitive" as pressing |
@guillego That output is all part of the create-build.sh script that gets run. Previously, it was directing to
So the tradeoff is the erroneous Also, the prompt was previously being rewritten (for better or worse), but the shell is the same. The initial error could maybe be adjusted to make that more clear? |
Ha, also funny you bring up |
No issue with the warnings! And I get the ctrl+c thing, but since it's the default way to exit iex, perhaps it would be good to add some comment.
Alternatively we could just add more info in the actual docs to inform of these changes, let me know if you want a hand with those! |
Regarding:
You can ignore that. It's wrong and luckily doesn't actually do anything. It's due to building in an |
K, I've adjusted and added the prompts for the docker container. Turns out those warnings are to stderr, so we can leave I am hesitant to adjust the prompt for local linux builds. Before, it adjust for a transient shell. With this change, it would rewrite the whole active terminal (if fact, it may be desirable to have their configured one now show?) |
OTP 26 made some big changes around serial interface and it breaks the `mix nerves.system.shell` task. In the end, the main issue is that we no longer have an easy way to take over the STDIN of the task to forward it to a shell running in the system build directory. Many attempts were made to recapture STDIN, but decided that for now we need to move on. Instead, this adjusts the task to do _all_ the setup for the build directory as before and outputs a warning to the user for the command that can be manually run in order to get the same shell that was previously started with `mix nerves.system.shell`
227654e
to
d9f5776
Compare
Looks perfect now! Basically the only difference is that you need to copy and paste the docker command (on Mac), so I think this is quite a good solution! Thanks a lot for working on this @jjcarstens |
Hi! Just saw your post over at Elixir Forums. If you could open an issue on https://github.com/erlang/otp describing what you want to achieve, then we would be more than happy to take a look and see if we can help you. Either by figuring out the proper way to configure the new stdin/stdout system, or by adding something to Erlang that allows you to do what you want. |
OTP 26 made some big changes around serial interface and it breaks the
mix nerves.system.shell
task. In the end, the main issue is that we no longer have an easy way to take over the STDIN of the task to forward it to a shell running in the system build directory.Many attempts were made to recapture STDIN, but decided that for now we need to move on. Instead, this adjusts the task to do all the setup for the build directory as before and outputs a warning to the user for the command that can be manually run in order to get the same shell that was previously started with
mix nerves.system.shell
Docker error
Local (Linux) error