diff options
Diffstat (limited to 'lib/stdlib/doc/src/notes.xml')
-rw-r--r-- | lib/stdlib/doc/src/notes.xml | 1043 |
1 files changed, 1031 insertions, 12 deletions
diff --git a/lib/stdlib/doc/src/notes.xml b/lib/stdlib/doc/src/notes.xml index e94a4d6a55..514ac37d90 100644 --- a/lib/stdlib/doc/src/notes.xml +++ b/lib/stdlib/doc/src/notes.xml @@ -8,16 +8,17 @@ <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. </legalnotice> @@ -30,6 +31,1024 @@ </header> <p>This document describes the changes made to the STDLIB application.</p> +<section><title>STDLIB 2.5</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Fix handling of single dot in filename:join/2</p> + <p> + The reference manual says that filename:join(A,B) is + equivalent to filename:join([A,B]). In some rare cases + this turns out not to be true. For example:</p> + <p> + <c>filename:join("/a/.","b") -> "/a/./b"</c> vs + <c>filename:join(["/a/.","b"]) -> "/a/b"</c>.</p> + <p> + This has been corrected. A single dot is now only kept if + it occurs at the very beginning or the very end of the + resulting path.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-12158</p> + </item> + <item> + <p> + The undocumented option <c>generic_debug</c> for + <c>gen_server</c> has been removed.</p> + <p> + Own Id: OTP-12183</p> + </item> + <item> + <p> + erl_lint:icrt_export/4 has been rewritten to make the + code really follow the scoping rules of Erlang, and not + just in most situations by accident.</p> + <p> + Own Id: OTP-12186</p> + </item> + <item> + <p> + Add 'trim_all' option to binary:split/3</p> + <p> + This option can be set to remove _ALL_ empty parts of the + result of a call to binary:split/3.</p> + <p> + Own Id: OTP-12301</p> + </item> + <item> + <p> Correct orddict(3) regarding evaluation order of + <c>fold()</c> and <c>map()</c>. </p> + <p> + Own Id: OTP-12651 Aux Id: seq12832 </p> + </item> + <item> + <p> + Correct <c>maps</c> module error exceptions </p> + <p> + Bad input to maps module function will now yield the + following exceptions: <list> <item>{badmap,NotMap} + or,</item> <item>badarg</item> </list></p> + <p> + Own Id: OTP-12657</p> + </item> + <item> + <p> + It is now possible to paste text in JCL mode (using + Ctrl-Y) that has been copied in the previous shell + session. Also a bug that caused the JCL mode to crash + when pasting text has been fixed.</p> + <p> + Own Id: OTP-12673</p> + </item> + <item> + <p> + Add <c>uptime()</c> shell command.</p> + <p> + Own Id: OTP-12752</p> + </item> + <item> + <p> + Cache nowarn_bif_clash functions in erl_lint.</p> + <p> + This patch stores nowarn_bif_clash in the lint record. By + using erlc +'{eprof,lint_module}' when compiling the + erlang parser, we noticed the time spent on + nowarn_function/2 reduced from 30% to 0.01%.</p> + <p> + Own Id: OTP-12754</p> + </item> + <item> + <p> + Optimize the Erlang Code Linter by using the cached + filename information.</p> + <p> + Own Id: OTP-12772</p> + </item> + <item> + <p> + If a child of a simple_one_for_one returns ignore from + its start function no longer store the child for any + restart type. It is not possible to restart or delete the + child because the supervisor is a simple_one_for_one.</p> + <p> + Own Id: OTP-12793</p> + </item> + <item> + <p> + Make <c>ets:file2tab</c> preserve enabled + <c>read_concurrency</c> and <c>write_concurrency</c> + options for tables.</p> + <p> + Own Id: OTP-12814</p> + </item> + <item> + <p> + There are many cases where user code needs to be able to + distinguish between a socket that was closed normally and + one that was aborted. Setting the option + {show_econnreset, true} enables the user to receive + ECONNRESET errors on both active and passive sockets.</p> + <p> + Own Id: OTP-12841</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Allow maps for supervisor flags and child specs</p> + <p> + Earlier, supervisor flags and child specs were given as + tuples. While this is kept for backwards compatibility, + it is now also allowed to give these parameters as maps, + see <seealso + marker="stdlib:supervisor#sup_flags">sup_flags</seealso> + and <seealso + marker="stdlib:supervisor#child_spec">child_spec</seealso>.</p> + <p> + Own Id: OTP-11043</p> + </item> + <item> + <p> + A new system message, <c>terminate</c>, is added. This + can be sent with <c>sys:terminate/2,3</c>. If the + receiving process handles system messages properly it + will terminate shortly after receiving this message.</p> + <p> + The new function <c>proc_lib:stop/1,3</c> utilizes this + new system message and monitors the receiving process in + order to facilitate a synchronous stop mechanism for + 'special processes'.</p> + <p> + <c>proc_lib:stop/1,3</c> is used by the following + functions:</p> + <p> + <list> <item><c>gen_server:stop/1,3</c> (new)</item> + <item><c>gen_fsm:stop/1,3</c> (new)</item> + <item><c>gen_event:stop/1,3</c> (modified to be + synchronous)</item> <item><c>wx_object:stop/1,3</c> + (new)</item> </list></p> + <p> + Own Id: OTP-11173 Aux Id: seq12353 </p> + </item> + <item> + <p> + Remove the <c>pg</c> module, which has been deprecated + through OTP-17, is now removed from the STDLIB + application. This module has been marked experimental for + more than 15 years, and has largely been superseded by + the <c>pg2</c> module from the Kernel application.</p> + <p> + Own Id: OTP-11907</p> + </item> + <item> + <p> + New BIF: <c>erlang:get_keys/0</c>, lists all keys + associated with the process dictionary. Note: + <c>erlang:get_keys/0</c> is auto-imported.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-12151 Aux Id: seq12521 </p> + </item> + <item> + <p> Add three new functions to <c>io_lib</c>-- + <c>scan_format/2</c>, <c>unscan_format/1</c>, and + <c>build_text/1</c>-- which expose the parsed form of the + format control sequences to make it possible to easily + modify or filter the input to <c>io_lib:format/2</c>. + This can e.g. be used in order to replace unbounded-size + control sequences like <c>~w</c> or <c>~p</c> with + corresponding depth-limited <c>~W</c> and <c>~P</c> + before doing the actual formatting. </p> + <p> + Own Id: OTP-12167</p> + </item> + <item> + <p> Introduce the <c>erl_anno</c> module, an abstraction + of the second element of tokens and tuples in the + abstract format. </p> + <p> + Own Id: OTP-12195</p> + </item> + <item> + <p> + Support variables as Map keys in expressions and patterns</p> + <p>Erlang will accept any expression as keys in Map + expressions and it will accept literals or bound + variables as keys in Map patterns.</p> + <p> + Own Id: OTP-12218</p> + </item> + <item> + <p> The last traces of Mnemosyne Rules have been removed. + </p> + <p> + Own Id: OTP-12257</p> + </item> + <item> + <p> + Properly support maps in match_specs</p> + <p> + Own Id: OTP-12270</p> + </item> + <item> + <p> + New function <c>ets:take/2</c>. Works the same as + <c>ets:delete/2</c> but also returns the deleted + object(s).</p> + <p> + Own Id: OTP-12309</p> + </item> + <item> + <p><c>string:tokens/2</c> is somewhat faster, especially + if the list of separators only contains one separator + character.</p> + <p> + Own Id: OTP-12422 Aux Id: seq12774 </p> + </item> + <item> + <p>The documentation of the Abstract Format (in the ERTS + User's Guide) has been updated with types and + specification. (Thanks to Anthony Ramine.) </p> <p> The + explicit representation of parentheses used in types of + the abstract format has been removed. Instead the new + functions <c>erl_parse:type_inop_prec()</c> and + <c>erl_parse:type_preop_prec()</c> can be used for + inserting parentheses where needed. </p> + <p> + Own Id: OTP-12492</p> + </item> + <item> + <p> + Prevent zip:zip_open/[12] from leaking file descriptors + if parent process dies.</p> + <p> + Own Id: OTP-12566</p> + </item> + <item> + <p> + Add a new random number generator, see <c>rand</c> + module. It have better characteristics and an improved + interface.</p> + <p> + Own Id: OTP-12586 Aux Id: OTP-12501, OTP-12502 </p> + </item> + <item> + <p><c>filename:split/1</c> when given an empty binary + will now return an empty list, to make it consistent with + return value when given an empty list.</p> + <p> + Own Id: OTP-12716</p> + </item> + <item> + <p> + Add <c>sync</c> option to <c>ets:tab2file/3</c>.</p> + <p> + Own Id: OTP-12737 Aux Id: seq12805 </p> + </item> + <item> + <p> Add functions <c>gb_sets:iterator_from()</c> and + <c>gb_trees:iterator_from()</c>. (Thanks to Kirill + Kinduk.) </p> + <p> + Own Id: OTP-12742</p> + </item> + <item> + <p> + Add <c>maps:filter/2</c> to maps module.</p> + <p> + Own Id: OTP-12745</p> + </item> + <item> + <p> + Change some internal data structures to Maps in order to + speed up compilation time. Measured speed up is around + 10%-15%.</p> + <p> + Own Id: OTP-12774</p> + </item> + <item> + <p> Update <c>orddict</c> to use parameterized types and + specs. (Thanks to UENISHI Kota.) </p> + <p> + Own Id: OTP-12785</p> + </item> + <item> + <p>The assert macros in <c>eunit</c> has been moved out + to <c>stdlib/include/assert.hrl</c>. This files get + included by <c>eunit.hrl</c>. Thus, nothing changes for + eunit users, but the asserts can now also be included + separately.</p> + <p> + Own Id: OTP-12808</p> + </item> + </list> + </section> + +</section> + +<section><title>STDLIB 2.4</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Behaviour of character types \d, \w and \s has always + been to not match characters with value above 255, not + 128, i.e. they are limited to ISO-Latin-1 and not ASCII</p> + <p> + Own Id: OTP-12521</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + c:m/1 now displays the module's MD5 sum.</p> + <p> + Own Id: OTP-12500</p> + </item> + <item> + <p> + Make ets:i/1 handle binary input from IO server.</p> + <p> + Own Id: OTP-12550</p> + </item> + </list> + </section> + +</section> + +<section><title>STDLIB 2.3</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + The documentation of string:tokens/2 now explicitly + specifies that adjacent separator characters do not give + any empty strings in the resulting list of tokens.</p> + <p> + Own Id: OTP-12036</p> + </item> + <item> + <p> + Fix broken deprecation warnings in ssh application</p> + <p> + Own Id: OTP-12187</p> + </item> + <item> + <p> + Maps: Properly align union typed assoc values in + documentation</p> + <p> + Own Id: OTP-12190</p> + </item> + <item> + <p> + Fix filelib:wildcard/2 when 'Cwd' ends with a dot</p> + <p> + Own Id: OTP-12212</p> + </item> + <item> + <p> + Allow <c>Name/Arity</c> syntax in maps values inside + attributes.</p> + <p> + Own Id: OTP-12213</p> + </item> + <item> + <p> + Fix edlin to correctly save text killed with ctrl-u. + Prior to this fix, entering text into the Erlang shell + and then killing it with ctrl-u followed by yanking it + back with ctrl-y would result in the yanked text being + the reverse of the original killed text.</p> + <p> + Own Id: OTP-12224</p> + </item> + <item> + <p> + If a callback function was terminated with exit/1, there + would be no stack trace in the ERROR REPORT produced by + gen_server. This has been corrected.</p> + <p> + To keep the backwards compatibility, the actual exit + reason for the process is not changed.</p> + <p> + Own Id: OTP-12263 Aux Id: seq12733 </p> + </item> + <item> + <p> + Warnings produced by <c>ms_transform</c> could point out + the wrong line number.</p> + <p> + Own Id: OTP-12264</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Supports tar file creation on other media than file + systems mounted on the local machine.</p> + <p> + The <c>erl_tar</c> api is extended with + <c>erl_tar:init/3</c> that enables usage of user provided + media storage routines. A ssh-specific set of such + routines is hidden in the new function + <c>ssh_sftp:open_tar/3</c> to simplify creating a tar + archive on a remote ssh server.</p> + <p> + A chunked file reading option is added to + <c>erl_tar:add/3,4</c> to save memory on e.g small + embedded systems. The size of the slices read from a file + in that case can be specified.</p> + <p> + Own Id: OTP-12180 Aux Id: seq12715 </p> + </item> + <item> + <p> + I/O requests are optimized for long message queues in the + calling process.</p> + <p> + Own Id: OTP-12315</p> + </item> + </list> + </section> + +</section> + +<section><title>STDLIB 2.2</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + The type spec of the FormFunc argument to + sys:handle_debug/4 was erroneously pointing to dbg_fun(). + This is now corrected and the new type is format_fun().</p> + <p> + Own Id: OTP-11800</p> + </item> + <item> + <p> + Behaviors such as gen_fsm and gen_server should always + invoke format_status/2 before printing the state to the + logs.</p> + <p> + Own Id: OTP-11967</p> + </item> + <item> + <p> The documentation of <c>dets:insert_new/2</c> has + been corrected. (Thanks to Alexei Sholik for reporting + the bug.) </p> + <p> + Own Id: OTP-12024</p> + </item> + <item> + <p> + Printing a term with io_lib:format and control sequence + w, precision P and field width F, where F< P would + fail in one of the two following ways:</p> + <p> + 1) If P < printed length of the term, an infinite loop + would be entered, consuming all available memory.</p> + <p> + 2) If P >= printed length of the term, an exception + would be raised.</p> + <p> + These two problems are now corrected.</p> + <p> + Own Id: OTP-12041</p> + </item> + <item> + <p> + The documentation of <c>maps:values/1</c> has been + corrected.</p> + <p> + Own Id: OTP-12055</p> + </item> + <item> + <p> + Expand shell functions in map expressions.</p> + <p> + Own Id: OTP-12063</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Add maps:with/2</p> + <p> + Own Id: OTP-12137</p> + </item> + </list> + </section> + +</section> + +<section><title>STDLIB 2.1.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + OTP-11850 fixed filelib:wildcard/1 to work with broken + symlinks. This correction, however, introduced problems + since symlinks were no longer followed for functions like + filelib:ensure_dir/1, filelib:is_dir/1, + filelib:file_size/1, etc. This is now corrected.</p> + <p> + Own Id: OTP-12054 Aux Id: seq12660 </p> + </item> + </list> + </section> + +</section> + +<section><title>STDLIB 2.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p><c>filelib:wildcard("broken_symlink")</c> would return + an empty list if "broken_symlink" was a symlink that did + not point to an existing file.</p> + <p> + Own Id: OTP-11850 Aux Id: seq12571 </p> + </item> + <item> + <p><c>erl_tar</c> can now handle files names that contain + Unicode characters. See "UNICODE SUPPORT" in the + documentation for <c>erl_tar</c>.</p> + <p>When creating a tar file, <c>erl_tar</c> would + sometime write a too short end of tape marker. GNU tar + would correctly extract files from such tar file, but + would complain about "A lone zero block at...".</p> + <p> + Own Id: OTP-11854</p> + </item> + <item> + <p> When redefining and exporting the type <c>map()</c> + the Erlang Code Linter (<c>erl_lint</c>) erroneously + emitted an error. This bug has been fixed. </p> + <p> + Own Id: OTP-11872</p> + </item> + <item> + <p> + Fix evaluation of map updates in the debugger and + erl_eval</p> + <p> + Reported-by: José Valim</p> + <p> + Own Id: OTP-11922</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>The following native functions now bump an appropriate + amount of reductions and yield when out of + reductions:</p> <list> + <item><c>erlang:binary_to_list/1</c></item> + <item><c>erlang:binary_to_list/3</c></item> + <item><c>erlang:bitstring_to_list/1</c></item> + <item><c>erlang:list_to_binary/1</c></item> + <item><c>erlang:iolist_to_binary/1</c></item> + <item><c>erlang:list_to_bitstring/1</c></item> + <item><c>binary:list_to_bin/1</c></item> </list> + <p>Characteristics impact:</p> <taglist> + <tag>Performance</tag> <item>The functions converting + from lists got a performance loss for very small lists, + and a performance gain for very large lists.</item> + <tag>Priority</tag> <item>Previously a process executing + one of these functions effectively got an unfair priority + boost. This priority boost depended on the input size. + The larger the input was, the larger the priority boost + got. This unfair priority boost is now lost. </item> + </taglist> + <p> + Own Id: OTP-11888</p> + </item> + <item> + <p> + Add <c>maps:get/3</c> to maps module. The function will + return the supplied default value if the key does not + exist in the map.</p> + <p> + Own Id: OTP-11951</p> + </item> + </list> + </section> + +</section> + +<section><title>STDLIB 2.0</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + The option dupnames did not work as intended in re. When + looking for names with {capture, [Name, ...]}, re:run + returned a random instance of the match for that name, + instead of the leftmost matching instance, which was what + the documentation stated. This is now corrected to adhere + to the documentation. The option {capture,all_names} + along with a re:inspect/2 function is also added to + further help in using named subpatterns.</p> + <p> + Own Id: OTP-11205</p> + </item> + <item> + <p> + If option 'binary' was set for standard_input, then c:i() + would hang if the output was more than one page long - + i.e. then input after "(c)ontinue (q)uit -->" could + not be read. This has been corrected. (Thanks to José + Valim)</p> + <p> + Own Id: OTP-11589</p> + </item> + <item> + <p> + stdlib/lists: Add function droplast/1 This functions + drops the last element of a non-empty list. lists:last/1 + and lists:droplast/1 are the dual of hd/1 and tl/1 but + for the end of a list. (Thanks to Hans Svensson)</p> + <p> + Own Id: OTP-11677</p> + </item> + <item> + <p> + Allow all auto imports to be suppressed at once. + Introducing the no_auto_import attribute: + -compile(no_auto_import). Useful for code generation + tools that always use the qualified function names and + want to avoid the auto imported functions clashing with + local ones. (Thanks to José Valim.)</p> + <p> + Own Id: OTP-11682</p> + </item> + <item> + <p> + supervisor_bridge does no longer report normal + termination of children. The reason is that in some + cases, for instance when the restart strategy is + simple_one_for_one, the log could be completely + overloaded with reports about normally terminating + processes. (Thanks to Artem Ocheredko)</p> + <p> + Own Id: OTP-11685</p> + </item> + <item> + <p> The type annotations for alternative registries using + the {via, Module, Name} syntax for sup_name() and + sup_ref() in the supervisor module are now consistent + with the documentation. Dialyzer should no longer + complain about valid supervisor:start_link() and + supervisor:start_child() calls. (Thanks to Caleb + Helbling.) </p> + <p> + Own Id: OTP-11707</p> + </item> + <item> + <p> Two Dets bugs have been fixed. When trying to open a + short file that is not a Dets file, the file was deleted + even with just read access. Calling + <c>dets:is_dets_file/1</c> with a file that is not a Dets + file, a file descriptor was left open. (Thanks to Håkan + Mattsson for reporting the bugs.) </p> + <p> + Own Id: OTP-11709</p> + </item> + <item> + <p> + Fix race bug in <c>ets:all</c>. Concurrent creation of + tables could cause other tables to not be included in the + result. (Thanks to Florian Schintke for bug report)</p> + <p> + Own Id: OTP-11726</p> + </item> + <item> + <p> + erl_eval now properly evaluates '=='/2 when it is used in + guards. (Thanks to José Valim)</p> + <p> + Own Id: OTP-11747</p> + </item> + <item> + <p> + Calls to proplists:get_value/3 are replaced by the faster + lists:keyfind/3 in io_lib_pretty. Elements in the list + are always 2-tuples. (Thanks to Andrew Thompson)</p> + <p> + Own Id: OTP-11752</p> + </item> + <item> + <p> A qlc bug where filters were erroneously optimized + away has been fixed. Thanks to Sam Bobroff for reporting + the bug. </p> + <p> + Own Id: OTP-11758</p> + </item> + <item> + <p> + A number of compiler errors where unusual or nonsensical + code would crash the compiler have been reported by Ulf + Norell and corrected by Anthony Ramine.</p> + <p> + Own Id: OTP-11770</p> + </item> + <item> + <p> Since Erlang/OTP R16B the Erlang Core Linter + (<c>erl_lint</c>) has not emitted errors when built-in + types were re-defined. This bug has been fixed. (Thanks + to Roberto Aloi.) </p> + <p> + Own Id: OTP-11772</p> + </item> + <item> + <p> + The functions <c>sys:get_state/1,2</c> and + <c>sys:replace_state/2,3</c> are fixed so they can now be + run while the process is sys suspended. To accomplish + this, the new callbacks <c>Mod:system_get_state/1</c> and + <c>Mod:system_replace_state/2</c> are added, which are + also implemented by the generic behaviours + <c>gen_server</c>, <c>gen_event</c> and <c>gen_fsm</c>.</p> + <p> + The potential incompatibility refers to</p> + <p> + <list> <item>The previous behaviour of intercepting the + system message and passing a tuple of size 2 as the last + argument to <c>sys:handle_system_msg/6</c> is no longer + supported.</item> <item>The error handling when + <c>StateFun</c> in <c>sys:replace_state/2,3</c> fails is + changed from being totally silent to possibly (if the + callback module does not catch) throw an exception in the + client process.</item> </list></p> + <p> + (Thanks to James Fish and Steve Vinoski)</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-11817</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Options to set match_limit and match_limit_recursion are + added to re:run. The option report_errors is also added + to get more information when re:run fails due to limits + or compilation errors.</p> + <p> + Own Id: OTP-10285</p> + </item> + <item> + <p> The pre-defined types <c>array/0</c>, <c>dict/0</c>, + <c>digraph/0</c>, <c>gb_set/0</c>, <c>gb_tree/0</c>, + <c>queue/0</c>, <c>set/0</c>, and <c>tid/0</c> have been + deprecated. They will be removed in Erlang/OTP 18.0. </p> + <p> Instead the types <c>array:array/0</c>, + <c>dict:dict/0</c>, <c>digraph:graph/0</c>, + <c>gb_set:set/0</c>, <c>gb_tree:tree/0</c>, + <c>queue:queue/0</c>, <c>sets:set/0</c>, and + <c>ets:tid/0</c> can be used. (Note: it has always been + necessary to use <c>ets:tid/0</c>.) </p> <p> It is + allowed in Erlang/OTP 17.0 to locally re-define the types + <c>array/0</c>, <c>dict/0</c>, and so on. </p> <p> New + types <c>array:array/1</c>, <c>dict:dict/2</c>, + <c>gb_sets:set/1</c>, <c>gb_trees:tree/2</c>, + <c>queue:queue/1</c>, and <c>sets:set/1</c> have been + added. </p> <p> A compiler option, + <c>nowarn_deprecated_type</c>, has been introduced. By + including the attribute </p> <c> + -compile(nowarn_deprecated_type).</c> <p> in an Erlang + source file, warnings about deprecated types can be + avoided in Erlang/OTP 17.0. </p> <p> The option can also + be given as a compiler flag: </p> <c> erlc + +nowarn_deprecated_type file.erl</c> + <p> + Own Id: OTP-10342</p> + </item> + <item> + <p> + Calls to erlang:open_port/2 with 'spawn' are updated to + handle space in the command path.</p> + <p> + Own Id: OTP-10842</p> + </item> + <item> + <p> Dialyzer's <c>unmatched_return</c> warnings have been + corrected. </p> + <p> + Own Id: OTP-10908</p> + </item> + <item> + <p> + Forbid unsized fields in patterns of binary generators + and simplified v3_core's translation of bit string + generators. (Thanks to Anthony Ramine.)</p> + <p> + Own Id: OTP-11186</p> + </item> + <item> + <p> + The version of the PCRE library Used by Erlang's re + module is raised to 8.33 from 7.6. This means, among + other things, better Unicode and Unicode Character + Properties support. New options connected to PCRE 8.33 + are also added to the re module (ucd, notempty_atstart, + no_start_optimize). PCRE has extended the regular + expression syntax between 7.6 and 8.33, why this imposes + a potential incompatibility. Only very complicated + regular expressions may be affected, but if you know you + are using obscure features, please test run your regular + expressions and verify that their behavior has not + changed.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-11204</p> + </item> + <item> + <p> + Added dict:is_empty/1 and orddict:is_empty/1. (Thanks to + Magnus Henoch.)</p> + <p> + Own Id: OTP-11353</p> + </item> + <item> + <p> + A call to either the <c>garbage_collect/1</c> BIF or the + <c>check_process_code/2</c> BIF may trigger garbage + collection of another processes than the process calling + the BIF. The previous implementations performed these + kinds of garbage collections without considering the + internal state of the process being garbage collected. In + order to be able to more easily and more efficiently + implement yielding native code, these types of garbage + collections have been rewritten. A garbage collection + like this is now triggered by an asynchronous request + signal, the actual garbage collection is performed by the + process being garbage collected itself, and finalized by + a reply signal to the process issuing the request. Using + this approach processes can disable garbage collection + and yield without having to set up the heap in a state + that can be garbage collected.</p> + <p> + The <seealso + marker="erts:erlang#garbage_collect/2"><c>garbage_collect/2</c></seealso>, + and <seealso + marker="erts:erlang#check_process_code/3"><c>check_process_code/3</c></seealso> + BIFs have been introduced. Both taking an option list as + last argument. Using these, one can issue asynchronous + requests.</p> + <p> + <c>code:purge/1</c> and <c>code:soft_purge/1</c> have + been rewritten to utilize asynchronous + <c>check_process_code</c> requests in order to + parallelize work.</p> + <p> + Characteristics impact: A call to the + <c>garbage_collect/1</c> BIF or the + <c>check_process_code/2</c> BIF will normally take longer + time to complete while the system as a whole wont be as + much negatively effected by the operation as before. A + call to <c>code:purge/1</c> and <c>code:soft_purge/1</c> + may complete faster or slower depending on the state of + the system while the system as a whole wont be as much + negatively effected by the operation as before.</p> + <p> + Own Id: OTP-11388 Aux Id: OTP-11535, OTP-11648 </p> + </item> + <item> + <p> Improve the documentation of the supervisor's + <c>via</c> reference. (Thanks to MaximMinin.) </p> + <p> + Own Id: OTP-11399</p> + </item> + <item> + <p><c>orddict:from_list/1</c> now uses the optimized sort + routines in the <c>lists</c> module instead of + (essentially) an insertion sort. Depending on the input + data, the speed of the new <c>from_list/1</c> is anything + from slightly faster up to several orders of magnitude + faster than the old <c>from_list/1</c>.</p> (Thanks to + Steve Vinoski.) + <p> + Own Id: OTP-11552</p> + </item> + <item> + <p> + EEP43: New data type - Maps</p> + <p> + With Maps you may for instance: <taglist> <item><c>M0 = + #{ a => 1, b => 2}, % create + associations</c></item> <item><c>M1 = M0#{ a := 10 }, % + update values</c></item> <item><c>M2 = M1#{ "hi" => + "hello"}, % add new associations</c></item> <item><c>#{ + "hi" := V1, a := V2, b := V3} = M2. % match keys with + values</c></item> </taglist></p> + <p> + For information on how to use Maps please see Map Expressions in the + <seealso marker="doc/reference_manual:expressions#map_expressions"> + Reference Manual</seealso>.</p> + <p> + The current implementation is without the following + features: <taglist> <item>No variable keys</item> + <item>No single value access</item> <item>No map + comprehensions</item> </taglist></p> + <p> + Note that Maps is <em>experimental</em> during OTP 17.0.</p> + <p> + Own Id: OTP-11616</p> + </item> + <item> + <p> + When tab completing the erlang shell now expands + zero-arity functions all the way to closing parenthesis, + unless there is another function with the same name and a + different arity. (Thanks to Pierre Fenoll.)</p> + <p> + Own Id: OTP-11684</p> + </item> + <item> + <p> The Erlang Code Preprocessor (<c>epp</c>) could loop + when encountering a circular macro definition in an + included file. This bug has been fixed. </p> <p> Thanks + to Maruthavanan Subbarayan for reporting the bug, and to + Richard Carlsson for providing a bug fix. </p> + <p> + Own Id: OTP-11728</p> + </item> + <item> + <p> The Erlang Code Linter (<c>erl_lint</c>) has since + Erlang/OTP R13B emitted warnings whenever any of the + types <c>arity()</c>, <c>bitstring()</c>, + <c>iodata()</c>, or <c>boolean()</c> were re-defined. Now + errors are emitted instead. </p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-11771</p> + </item> + <item> + <p> The <c>encoding</c> option of + <c>erl_parse:abstract/2</c> has been extended to include + <c>none</c> and a callback function (a predicate). </p> + <p> + Own Id: OTP-11807</p> + </item> + <item> + <p> + Export zip option types to allow referal from other + modules.</p> + <p> + Thanks to Pierre Fenoll and Håkan Mattson</p> + <p> + Own Id: OTP-11828</p> + </item> + <item> + <p> + The module <c>pg</c> has been deprecated and will be + removed in Erlang/OTP 18.</p> + <p> + Own Id: OTP-11840</p> + </item> + </list> + </section> + +</section> + <section><title>STDLIB 1.19.4</title> <section><title>Fixed Bugs and Malfunctions</title> @@ -1809,7 +2828,7 @@ platforms than before. If <c>configure</c> warns about no atomic implementation available, try using the <c>libatomic_ops</c> library. Use the <seealso - marker="doc/installation_guide:INSTALL#How-to-Build-and-Install-ErlangOTP_A-Closer-Look-at-the-individual-Steps_Configuring">--with-libatomic_ops=PATH</seealso> + marker="doc/installation_guide:INSTALL#Advanced-configuration-and-build-of-ErlangOTP">--with-libatomic_ops=PATH</seealso> <c>configure</c> command line argument when specifying where the <c>libatomic_ops</c> installation is located. The <c>libatomic_ops</c> library can be downloaded from: @@ -1827,7 +2846,7 @@ the pentium 4 processor. If you want the runtime system to be compatible with older processors (back to 486) you need to pass the <seealso - marker="doc/installation_guide:INSTALL#How-to-Build-and-Install-ErlangOTP_A-Closer-Look-at-the-individual-Steps_Configuring">--enable-ethread-pre-pentium4-compatibility</seealso> + marker="doc/installation_guide:INSTALL#Advanced-configuration-and-build-of-ErlangOTP">--enable-ethread-pre-pentium4-compatibility</seealso> <c>configure</c> command line argument when configuring the system.</p> <p> |