Skip to content
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

Use shell:start_interactive to start shell if available #2741

Merged
merged 1 commit into from
Sep 3, 2022

Conversation

garazdawi
Copy link
Contributor

In Erlang/OTP 26 there is support for starting a shell session
from an escript instead of using the hack that is currently used.
So we make sure to use that method if possible.

See erlang/otp#6144 for details on the new shell

Note: At the moment rebar3 is started with "-noshell" which is the default for escripts. In 26 it will also be possible to start an escript in "-noinput" and then change to "-noshell" or start a shell session depending on what the application wants to do. I don't know if rebar3 should change to "-noinput", but I thought I would just mention it so that you know that the possibility exists.

In Erlang/OTP 26 there is support for starting a shell session
from an escript instead of using the hack that is currently used.
So we make sure to use that method if possible.
@tsloughter
Copy link
Collaborator

I guess @ferd might be the one to ask since he wrote the original, but Is all the logger removal, old shell fallback, ... stuff handled by the new start_interactive, or otherwise not needed?

@garazdawi
Copy link
Contributor Author

As start_interactive works right now the oldshell fallback is needed. Though I think that it might be better to improve start_interactive than to handle that in rebar3.

I don't think that the logger workaround is needed.

Copy link
Collaborator

@ferd ferd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to simplify a lot of things and when we can finally assume this to be the norm in ~2 years it's going to finally kill some of the hackiest code I've ever written.

A very welcome change!

@ferd ferd merged commit 58a6dac into erlang:main Sep 3, 2022
@garazdawi
Copy link
Contributor Author

Fyi I've opened a new pr (erlang/otp#6279) that make shell:start_interactive work with "oldshell" and also adds -remsh support into "oldshell" so that we finally get rid of that problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants