-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Support Erlang/OTP 26 new features #11985
Comments
If you want to, you may want to check out the new possible return values from https://github.com/erlang/otp/blob/master/lib/stdlib/src/edlin_expand.erl#L41-L47 It allows the expand function to return structured data so that you can group completions. In Erlang we use it to make completions like this: 1> h<TAB> bifs halt( hd( commands h( hcb( help( history( ht( modules heart: http_chunk: http_request: http_response: http_transport: http_uri: http_util: httpc: httpc_cookie: httpc_handler: httpc_handler_sup: httpc_manager: httpc_profile_sup: httpc_request: httpc_response: httpc_sup: httpd: httpd_acceptor: httpd_acceptor_sup: httpd_cgi: httpd_conf: httpd_connection_sup: httpd_custom: httpd_custom_api: httpd_esi: httpd_example: httpd_file: httpd_instance_sup: httpd_log: httpd_logger: httpd_manager: httpd_misc_sup: httpd_request: httpd_request_handler: httpd_response: httpd_script_env: httpd_socket: httpd_sup: httpd_util: and like this: 1> ssl:connect(<TAB> typespecs ssl:connect(Host, Port, TLSOptions) ssl:connect(Host, Port, TLSOptions, Timeout) ssl:host() :: {0..255, ...} {0..65535, ...} string() ssl:connect(TCPSocket, TLSOptions) ssl:connect(TCPSocket, TLSOptions, Timeout) ssl:socket() :: {'$inet', ...} port() |
How about |
hello, I am finding an issue that maybe is something not yet implemented but in OTP 26 the follow code breaks Mix.Task.get("phx.new"). I had a mix task that tries to detect if phoenix is installed by detecting the mix task above. All worked till OTP 26. but in OTP 26 it cannot find the code being loaded somehow. Any idea ? We are seeing that a lot with atom (to_existiing_atom failing in our code base and having to force loading the module before so the atom are available) |
Hi @epinault, please use the ElixirForum or do a complete bug report, I don't want to sidetrack the existing issues. |
done #13116 (so if people find this they know where I moved the issue to) |
👋🏻 Hello! I see one point that requires Erlang 26 is ticked off. Does this mean Elixir 1.18 will require 26, and the remaining points can be worked on now, or was |
The rich shell will require 26 on Windows in the new version because maintaining both, and 27, was not possible. |
We can start tackling the remaining 3 items in this issue. Pull requests are welcome! |
I noticed that https://github.com/elixir-lang/elixir/blob/main/lib/iex/lib/iex/server.ex#L363-L364 does not actually parse anything. If you update that to return |
For that feature we need this patch, which means it was postponed to OTP 27 integration. :) |
@garazdawi there is one task left, which is to deal with groups in IEx autocompletion. How do you declare these groups in Erlang/OTP? Should perhaps we make the group some sort of official metadata in EEP 48? |
Right now all the logic is inside edlin_expand. I'm not sure what categories you have in mind that would be placed in EEP-48? We have:
and probably some others that I didn't find. Most of these have very little with the docs to do and more with different contexts within the language, except modules/functions/types of course. |
@garazdawi I see. In Elixir we use groups already to organize things in the ExDoc sidebar: I was thinking we could expose those same groups in the terminal. This way, Cowboy could for example, do this: -doc #{group => ~"Request"}. And then it automatically shows up in autocomplete. |
@josevalim We already have something similar it our docs: https://github.com/erlang/otp/blob/OTP-27.2/lib/stdlib/src/string.erl#L254 Though we call it |
Thank you. I will think about the API and submit a pull request once the pieces have fallen into place. :) |
All done, thanks everyone! |
To be implemented and backported when Erlang 26 is released:
custom_options: [sort_maps: true]
for sorting mapsTo be implemented when Erlang 26 is released:
To be implemented when we require Erlang 26 exclusively:
min
andmax
in guardsPlease do not send PRs for those, as it will take a while until we can effectively accept them.
The text was updated successfully, but these errors were encountered: