-
Notifications
You must be signed in to change notification settings - Fork 3k
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
kernel: Incorporate "oldshell" into user_drv #6279
kernel: Incorporate "oldshell" into user_drv #6279
Conversation
CT Test Results 5 files 195 suites 3h 2m 33s ⏱️ For more details on these failures, see this check. Results for commit 2fe9995. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
@garazdawi thanks, I will check tomorrow the latest! But for documentation purposes, I needed to detect if we are in an old shell for two reasons:
|
The implementation in this PR should fix both of these problems, but please try and make sure that it does work for you. |
@garazdawi this is amazing! I have done extensive tests and everything works, both using Not only that, you are actually removing several LOCs here and I will be able to do the same in Elixir too. :)
Btw, if you want to remove |
Always a good feeling when you make something better and remove code at the same time.
Yes, I think that I would like to do that eventually, though peer uses it right now to get into nodes very early in the boot sequence, so I'll need to figure out how to solve its needs also. |
202ab13
to
10a7a11
Compare
When TERM=dumb prim_tty:init/2 will fail which means that we should used "oldshell" instead. But in that case we do not want stdout to have been set in canonical mode, so we call tty_set after init/2.
46736c4
to
dca9d4f
Compare
Instead of oldshell using a completely separate implementation we adjust user_drv to setup group to act as an oldshell when needed. If needed shell:start_interactive will now start the oldshell. This is needed for rebar3 to be able to start as it should in environments where TERM=dumb or we do not have TERMCAP.
This function can be used to find the current active shell process.
Disable running of cover on ct peer nodes that are not the same version as the current node. Also we don't use a fun to setup cover on the peer node as the newly compiled peer module may have a different md5 and thus the setup will fail.
2fe9995
to
1ae6b51
Compare
This commit cleans up #6144 by:
oldshell
implementation and merging it intonewshell
shell:start_interactive/1
start anoldshell
if it cannot start anewshell
-remsh
to work for botholdshell
andnewshell
This PR also implements the fixes in #6266 and #6268.
This PR needs to have more tests before it is merged.
@josevalim Could you take a look at this and see if this works for Elixir and if you still need a way to detect if you are running an oldshell or not? My goal is that, after you stop supporting Erlang/OTP 25, IEx should be able to stop using
-user
and instead start like this:erl -noinput -eval 'shell:start_interactive({IEx, start, []})'
, or foriex --remsh
erl -noinput -eval 'shell:start_interactive({remote, Node, {IEx, start, []}})'
. You could even put theshell:start_interactive/1
call in the application start callback of theIEx
application if you wanted to.