1
<?xml version="1.0" encoding="latin1" ?>
2
<!DOCTYPE chapter SYSTEM "chapter.dtd">
9
<holder>Ericsson AB, All Rights Reserved</holder>
12
The contents of this file are subject to the Erlang Public License,
13
Version 1.1, (the "License"); you may not use this file except in
14
compliance with the License. You should have received a copy of the
15
Erlang Public License along with this software. If not, it can be
16
retrieved online at http://www.erlang.org/.
18
Software distributed under the License is distributed on an "AS IS"
19
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
20
the License for the specific language governing rights and limitations
23
The Initial Developer of the Original Code is Ericsson AB.
26
<title>STDLIB Release Notes</title>
32
<p>This document describes the changes made to the STDLIB application.</p>
34
<section><title>STDLIB 1.15.5</title>
36
<section><title>Fixed Bugs and Malfunctions</title>
39
<p>A bug in the <c>qlc</c> module has been fixed: when
40
merge joining two query handles the temporary file used
41
for equivalence classes was not truncated properly which
42
could result in poor performance.</p>
48
The characters 16#C0 and 16#E0 ("A" and "a" with grave
49
accent), were not properly converted by the
50
<c>string:to_lower/1</c> and <c>string:to_upper/1</c>
51
functions. (Thanks to Richard O'Keefe.)</p>
57
The function <c>pool:attach/1</c> now returns
58
<c>already_attached</c> if the node is already attached,
59
rather than <c>allready_attached</c> (sic!). (Thanks to
62
*** POTENTIAL INCOMPATIBILITY ***</p>
67
<p>The documentation for <c>io:get_line/1,2</c> now
68
mentions that the return value can also be
69
<c>{error,Reason}</c>.</p>
71
Own Id: OTP-7604 Aux Id: seq11063 </p>
77
<section><title>Improvements and New Features</title>
81
The split function is now added to the re library.
82
Exceptions and errors from both run, replace and split
83
are made more consistent.</p>
85
Own Id: OTP-7514 Aux Id: OTP-7494 </p>
88
<p>Processes spawned using <c>proc_lib</c> (including
89
<c>gen_server</c> and other library modules that use
90
<c>proc_lib</c>) no longer keep the entire argument list
91
for the initial call, but only the arity.</p>
92
<p>Also, if <c>proc_lib:spawn/1</c> is used to spawn a
93
fun, the actual fun is not kept, but only module,
94
function name, and arity of the function that implements
96
<p>The reason for the change is that keeping the initial
97
fun (or a fun in an argument list), would prevent
98
upgrading the code for the module. A secondary reason is
99
that keeping the fun and function arguments could waste a
100
significant amount of memory.</p>
101
<p>The drawback with the change is that the crash reports
102
will provide less precise information about the initial
103
call (only <c>Module:Function/Arity</c> instead of
104
<c>Module:Function(Arguments)</c>). The function
105
<c>proc_lib:initial_call/1</c> still returns a list, but
106
each argument has been replaced with a dummy atom.</p>
108
Own Id: OTP-7531 Aux Id: seq11036 </p>
112
There is now experimental support for loading of code
113
from archive files. See the documentation of <c>code</c>,
114
<c>init</c>, <c>erl_prim_loader </c> and <c>escript</c>
117
The error handling of <c>escripts</c> has been improved.</p>
119
An <c>escript</c> may now set explicit arguments to the
120
emulator, such as <c>-smp enabled</c>.</p>
122
An <c>escript</c> may now contain a precompiled beam
125
An <c>escript</c> may now contain an archive file
126
containing one or more applications (experimental).</p>
128
The internal module <c>code_aux</c> has been removed.</p>
130
Own Id: OTP-7548 Aux Id: otp-6622 </p>
134
Enabled explicit control of which types of files that
135
should be compressed in a ZIP archive.</p>
137
Own Id: OTP-7549 Aux Id: otp-6622 </p>
141
In the job control mode, the "s" and "r" commands now
142
take an optional argument to specify which shell to
143
start. (Thanks to Robert Virding.)</p>
152
<section><title>STDLIB 1.15.4</title>
154
<section><title>Fixed Bugs and Malfunctions</title>
158
A bug in the calendar module could cause
159
calendar:local_time_to_universal_time_dst/1 to return
160
duplicate identical values for local times in timezones
161
without DST. Multiple values should only be returned when
162
a local time is within the hour occurring twice due to
163
shift from DST to non-DST, and certainly only in
164
timezones with DST. The correct behaviour is now
167
Own Id: OTP-7344 Aux Id: seq10960 </p>
170
<p>The documentation of <c>(d)ets:init_table()</c> has
171
been corrected. (Thanks to Paul Mineiro.)</p>
176
<p>The soft upper limit of 60 on the number of non-white
177
characters on a line, which was introduced in R12B-0 for
178
the control sequences <c>p</c> and <c>P</c> of the
179
functions <c>io:fwrite/2,3</c> and
180
<c>io_lib:fwrite/2</c>, has been removed. This means that
181
terms whose printed representation fits on a line will
182
have no NEWLINEs. The Erlang shell still uses the 60
183
character limit, though.</p>
185
Own Id: OTP-7421 Aux Id: OTP-6708 </p>
188
<p>Some debug code has been removed from Dets.</p>
193
<p>The documentation of <c>dets:match_delete/2</c> has
194
been corrected. (Thanks to Paul Mineiro.)</p>
199
<p>Corrections of digraph(3). (Thanks to Vlad
206
For the process that an escript runs in, the
207
<c>trap_exit</c> process flag is now <c>false</c> instead
208
of <c>true</c> (as in previous releases). Scripts that
209
depend on the previous (counter-intuitive) behaviour
210
might not work. (Thanks to Bengt Kleberg.)</p>
212
*** POTENTIAL INCOMPATIBILITY ***</p>
220
<section><title>Improvements and New Features</title>
223
<p>The documentation of <c>lists:(u)sort/2</c> now states
224
what is expected of an ordering function.</p>
230
The re module is exdended with repetitive matches (global
231
option) and replacement function.</p>
233
Own Id: OTP-7494 Aux Id: OTP-7181 </p>
236
<p>The Erlang shell now displays a nicer error message
237
when evaluating an undefined command. (Thanks to Richard
248
<section><title>STDLIB 1.15.3</title>
250
<section><title>Fixed Bugs and Malfunctions</title>
254
zip:unzip to/from binary with empty directories did not
255
work. (Thanks to Martin Dvorak.)</p>
260
<p>The documentation of the control sequence <c>w</c> of
261
the <c>io_lib</c> module now states that floating point
262
numbers are printed accurately.</p>
264
Own Id: OTP-7324 Aux Id: OTP-7084 </p>
268
zip:unzip was not supporting a flavour of the zip format
269
found in jar-files.</p>
271
Own Id: OTP-7382 Aux Id: seq10970 </p>
277
<section><title>Improvements and New Features</title>
281
An experimental module "re" is added to the emulator
282
which interfaces a publicly available regular expression
283
library for Perl-like regular expressions (PCRE). The
284
interface is purely experimental and *will* be subject to
287
The implementation is for reference and testing in
288
connection to the relevant EEP.</p>
297
<section><title>STDLIB 1.15.2</title>
299
<section><title>Fixed Bugs and Malfunctions</title>
302
<p> When inserting many small objects, Dets sometimes
303
crashed when reaching the maximum number of slots.
304
(Thanks to Daniel Goertzen.) </p>
309
<p>Processes linked to the Erlang shell did not get an
310
exit signal when the evaluator process was killed. This
311
bug, introduced in R12B-0, has been fixed.</p>
313
Own Id: OTP-7184 Aux Id: OTP-6554 </p>
317
Invalid arguments to <c>ets:update_counter/3</c> were not
318
handled correctly. A tuple position (<c>Pos</c>) less
319
than 1 caused the element directly following the key to
320
be updated (as if no position at all had been specified).
321
All invalid values for <c>Pos</c> will now fail with
328
For certain terminals, io:columns/0 could return 0
329
instead of enotsup. That is now corrected.</p>
331
Own Id: OTP-7229 Aux Id: seq10886 </p>
334
<p><c>qlc:info()</c> can now handle port identifiers,
335
pids, references, and funs. (Thanks to Wojciech Kaczmare
336
for reporting this bug.)</p> <p>When evaluating the
337
<c>parent_fun</c> messages sent to the process calling
338
<c>qlc:cursor()</c> were sometimes erroneously consumed.
339
This bug has been fixed.</p>
344
<p><c>erl_parse:abstract()</c> can now handle bit
353
<section><title>Improvements and New Features</title>
356
<p>The <c>queue</c> module has been rewritten to make it
357
easier to use. Suggestions and discussion from and with
358
among others Lev Walkin, Anders Ramsell and Rober Virding
359
in december 2007 on erlang-questions@erlang.org. It was
360
also discussed to change the internal representation to
361
contain length information which would speed up
362
<c>len/1</c> but that change has been postponed. Anyone
363
interested may write an EEP and try to reach an
364
acceptable compromise for queue overhead and thereby the
365
speed of all other operations than <c>len/1</c>. The
366
<c>queue</c> module is now optimized for fast and minimal
367
garbage <c>in/2</c> and <c>out/1</c> and such. See the
369
<p>New functions: <c>is_queue/1</c>, <c>get/1</c>,
370
<c>get_r/1</c>, <c>peek/1</c>, <c>peek_r/1</c>,
371
<c>drop/1</c>, <c>drop_r/1</c> and <c>liat/1</c>.
372
<c>is_queue/1</c> is a new predicate, <c>liat/1</c> is a
373
correction of an old misspelling, and the others
374
(<c>get</c>*, <c>peek</c>* and <c>drop</c>*) are new
375
interface functions.</p>
380
<p>The functions <c>io_lib:write/1,2</c> and
381
<c>io_lib:print/1,4</c> have been changed when it comes
382
to writing floating point numbers. This change affects
383
the control sequences <c>p</c>, <c>P</c>, <c>w</c>, and
384
<c>W</c> of the <c>io_lib</c> module. (Thanks to Bob
385
Ippolito for code contribution.) </p>
391
Updated the documentation for
392
<c>erlang:function_exported/3</c> and <c>io:format/2</c>
393
functions to no longer state that those functions are
394
kept mainly for backwards compatibility.</p>
400
A new BIF ets:update_element/3. To update individual
401
elements within an ets-tuple, without having to read,
402
update and write back the entire tuple.</p>
407
<p><c>string:join/2</c> now accepts an empty list as
410
Own Id: OTP-7231 Aux Id: OTP-6671 </p>
413
<p><c>qlc:info/1,2</c> accepts a new option,
414
<c>depth</c>. The type <c>SelectedObjects</c> used in the
415
description of <c>qlc:table/2</c> has been augmented.</p>
420
<p><c>tuple_size/1</c> and <c>byte_size/1</c> have been
421
substituted for <c>size/1</c> in the documentation.</p>
430
<section><title>STDLIB 1.15.1</title>
432
<section><title>Fixed Bugs and Malfunctions</title>
436
Ets:select/3 in combination with
437
ets:repair_continuation/2 and ordered_set data tables
438
could result in function_clause although used as
439
intended. This is now corrected. Thanks to Paul Mineiro
440
for finding and isolating the bug!</p>
445
<p>The compiler warning for the deprecated function
446
<c>ftp:close/1</c> now mentions the correct replacement
448
<p>The warning for the removed functions in the
449
<c>httpd_util</c> module have been changed to say they
450
have been removed, not merely deprecated. (Thanks to
453
Own Id: OTP-7034 Aux Id: seq10825 </p>
456
<p>In <c>(Expr)#r{}</c> (no fields are updated),
457
<c>Expr</c> is no longer evaluated more than once. There
458
is also a test that <c>Expr</c> is of the correct record
459
type. (Thanks to Dominic Williams.)</p>
461
Own Id: OTP-7078 Aux Id: OTP-4962 </p>
464
<p>Documentation bugfixes and clarifications.</p> (Thanks
465
to Joern (opendev@gmail.com), Matthias Lang, and Richard
471
<p>Duplicated objects were sometimes not deleted from the
472
list of answers when a QLC table was traversed using a
473
match specification. (Thanks to Dmitri Girenko.)</p>
481
<section><title>Improvements and New Features</title>
484
<p>The documentation has been updated so as to reflect
485
the last updates of the Erlang shell as well as the minor
486
modifications of the control sequence <c>p</c> of the
487
<c>io_lib</c> module.</p> <p>Superfluous empty lines have
488
been removed from code examples and from Erlang shell
491
Own Id: OTP-6944 Aux Id: OTP-6554, OTP-6911 </p>
494
<p><c>tuple_size/1</c> and <c>byte_size/1</c> have been
495
substituted for <c>size/1</c>.</p>
501
It is now possible to hibernate a
502
gen_server/gen_event/gen_fsm. In gen_server and gen_fsm,
503
hibernation is triggered by returning the atom
504
'hibernate'�instead of a timeout value. In the gen_event
505
case hibernation is triggered by a event handler
506
returning a tuple with an extra element containing the
507
atom 'hibernate'.</p>
509
Own Id: OTP-7026 Aux Id: seq10817 </p>
512
<p>Some undocumented debug functionality has been added
518
<p>The functions <c>digraph_utils:is_tree/1</c>,
519
<c>digraph_utils:is_arborescence/1</c>, and
520
<c>digraph_utils:arborescence_root/1</c> are new.</p>
526
The compiler could generate suboptimal code for record
527
updates if the record update code consisted of multiple
528
source code lines.</p>
537
<section><title>STDLIB 1.15</title>
539
<section><title>Fixed Bugs and Malfunctions</title>
542
<p>Bugs have been fixed in <c>qlc</c>:</p> <list
543
type="bulleted"> <item>Setting the <c>lookup_fun</c>
544
option of <c>qlc:table/2</c> to <c>undefined</c> could
545
cause a crash.</item> <item>If a QLC restricted some
546
column of a table in such a way that a traversal using a
547
match specification was possible and the QLC also
548
compared the key column or some indexed column of the the
549
table with a column of some other table, <c>qlc</c>
550
always chose to traverse the table first, never
551
considering lookup join. This has been changed so that
552
lookup join is always preferred; if an initial traversal
553
using the match specification is desired, the query needs
554
to be rewritten introducing an extra QLC with the
555
filter(s) restricting the column.</item> <item>When
556
trying to find candidates for match specifications and
557
lookup, filters using variables from one generator only
558
are ignored unless they are placed immediately after the
559
generator and possibly other filters using variables from
560
the same generator. In particular, filters joining two
561
tables should not be placed between the generator and the
562
filters using the generator only.</item> <item>The
563
call-back function <c>TraverseFun</c> used for
564
implementing QLC tables is allowed to return a term other
565
than a list since STDLIB 1.14 (OTP-5195). However, when
566
the returned term was a fun <c>qlc</c> often tried to
567
call the fun instead of returning it.</item> </list> <p>A
568
few minor optimizations have been implemented as
574
<p>A bug concerning the use of parameterized modules from
575
the shell has been fixed.</p>
580
<p>A bug regarding the size expression of the bit syntax
581
has been fixed in the <c>erl_eval</c> module.</p>
587
The log_mf_h event handler didn't close the index file
588
when it was done reading it causing a file descriptor
595
Definitions for the <c>filename()</c> and
596
<c>dirname()</c> types have been added to the
597
documentation for the <c>filelib</c> module.</p>
602
<p>file:write_file/3, file:write/2 and file:read/2 could
603
crash (contrary to documentation) for odd enough file
604
system problems, e.g write to full file system. This bug
605
has now been corrected.</p> <p>In this process the file
606
module has been rewritten to produce better error codes.
607
Posix error codes now originate from the OS file system
608
calls or are generated only for very similar causes (for
609
example 'enomem' is generated if a memory allocation
610
fails, and 'einval' is generated if the file handle in
611
Erlang is a file handle but currently invalid).</p>
612
<p>More Erlang-ish error codes are now generated. For
613
example <c>{error,badarg}</c> is now returned from
614
<c>file:close/1</c> if the argument is not of a file
615
handle type. See file(3).</p> <p>The possibility to write
616
a single byte using <c>file:write/2</c> instead of a list
617
or binary of one byte, contradictory to the
618
documentation, has been removed.</p>
620
*** POTENTIAL INCOMPATIBILITY ***</p>
622
Own Id: OTP-6967 Aux Id: OTP-6597 OTP-6291 </p>
625
<p>A bug concerning the evaluation of the <c>++/2</c>
626
operator has been fixed in <c>erl_eval</c>. (Thanks to
627
Matthew Dempsky.)</p>
635
<section><title>Improvements and New Features</title>
638
<p>The behaviour of the internal functions gen:call/3,4
639
has been changed slightly in the rare case that when the
640
caller was linked to the called server, and the server
641
crashed during the call; its exit signal was consumed by
642
the gen:call/3,4 code and converted to an exit exception.
643
This exit signal is no longer consumed.</p>
644
<p>To even notice this change, 1) the calling process has
645
to be linked to the called server.</p>
647
2) the call must not be remote by name that is it must be
648
local or remote by pid, local by name or global by name.</p>
650
3) the calling process has to have set
651
<c>process_flag(trap_exit, true)</c>.</p>
653
4) the server has to crash during the call.</p>
655
5) the calling process has to be sensitive to getting
656
previously consumed <c>{'EXIT',Pid,Reason}</c> messages
657
in its message queue.</p>
658
<p>The old behaviour was once the only way for a client
659
to notice if the server died, but has since
660
<c>erlang:monitor(process, {Name,Node})</c> was
661
introduced and used in gen:call been regarded as an
662
undesired behaviour if not a bug.</p>
663
<p>The affected user APIs are:
664
<c>gen_server:call/2,3</c>,
665
<c>gen_fsm:sync_send_event/2,3</c>,
666
<c>gen_fsm:sync_send_all_state_event/2,3</c>,
667
<c>gen_event:_</c>, <c>sys:_</c> and maybe a few others
668
that hardly will be noticed.</p>
670
*** POTENTIAL INCOMPATIBILITY ***</p>
672
Own Id: OTP-3954 Aux Id: Seq 4538 </p>
675
<p>When an exception occurs the Erlang shell now displays
676
the class, the reason, and the stacktrace in a clearer
677
way (rather than dumping the raw EXIT tuples as before).
678
<c>proc_lib:format/1</c> displays the exception of crash
679
reports in the same clearer way.</p> <p>The new shell
680
command <c>catch_exception</c> and the new application
681
configuration parameter <c>shell_catch_exception</c> can
682
be used for catching exceptions that would normally exit
683
the Erlang shell.</p>
685
Own Id: OTP-6554 Aux Id: OTP-6289 </p>
688
<p>The function <c>string:join/2</c> joins strings in a
689
list with a separator. Example: '<c>string:join(["a",
690
"b", "c"], ", ") gives "a, b, c"</c>'</p>
695
<p>The control sequence <c>P</c> of the <c>Format</c>
696
argument of the functions <c>io:fwrite/2,3</c> and
697
<c>io_lib:fwrite/2</c> now inserts fewer line breaks when
698
printing tuples and lists. A soft upper limit of 60 on
699
the number of non-white characters on a line has been
706
The new module <c>array</c> provides a fast functional
707
array implementation.</p>
712
<p>Functions that have long been deprecated have now been
713
removed from the following modules: <c>dict</c>,
714
<c>erl_eval</c>, <c>erl_pp</c>, <c>io</c>, <c>io_lib</c>,
715
<c>lists</c>, <c>orddict</c>, <c>ordsets</c>,
716
<c>sets</c>, and <c>string</c>.</p>
717
<p>The undocumented function <c>lists:zf/3</c> has also
718
been removed (use a list comprehension or
719
<c>lists:zf/2</c> instead).</p>
721
*** POTENTIAL INCOMPATIBILITY ***</p>
727
Minor documentation corrections for file:pread/2 and
734
Contract directives for modules in Kernel and STDLIB.</p>
739
<p>The <c>ets:fixtable/2</c> function, which has been
740
deprecated for several releases, has been removed.</p>
741
<p>The <c>ets:info/1</c> function has been reimplemented
742
as a BIF, which guarantees that information returned is
744
<p>The <c>ets:info/2</c> function now fails with reason
745
<c>badarg</c> if the second argument is invalid.
746
(Dialyzer can be used to find buggy code where the second
747
argument is misspelled.)</p>
749
*** POTENTIAL INCOMPATIBILITY ***</p>
754
<p>The Erlang pretty printer <c>erl_pp</c> now inserts
755
more newlines in order to facilitate line coverage
756
analysis by <c>Cover</c>. (Thanks to Thomas Arts.)</p>
762
The documentation for ets:safe_fixtable/2, ets:foldl/3,
763
and ets:foldr/3 is now clearer about what will happen if
764
objects are inserted during table traversals.</p>
766
Own Id: OTP-6928 Aux Id: seq10779 </p>
770
It is now possible to extract files in tar files directly
771
into binaries. It is also possible to add files to tar
772
files directly from binaries.</p>
777
<p>The functions <c>keystore/4</c> and <c>keytake/3</c>
778
are new in the <c>lists</c> module.</p>
783
<p>The new <c>qlc</c> option <c>tmpdir_usage</c> can be
784
used for outputting messages onto the error logger when a
785
temporary file is about to be created, or to prohibit the
786
usage of temporary files altogether.</p>
795
<section><title>STDLIB 1.14.5.3</title>
797
<section><title>Improvements and New Features</title>
801
The allowed syntax for -type() and -spec() was updated.</p>
803
Own Id: OTP-6861 Aux Id: OTP-6834 </p>
810
<section><title>STDLIB 1.14.5.2</title>
812
<section><title>Improvements and New Features</title>
816
The compiler will for forward compatibility ignore the
817
-type() and -spec() attributes that will be introduced in
818
the R12B release.</p>
826
<section><title>STDLIB 1.14.5.1</title>
828
<section><title>Fixed Bugs and Malfunctions</title>
832
The log_mf_h event handler didn't close the index file
833
when it was done reading it causing a file descriptor
842
<section><title>Improvements and New Features</title>
846
The dict:size/1 and orddict:size/1 functions have been
857
<title>STDLIB 1.14.5</title>
860
<title>Fixed Bugs and Malfunctions</title>
861
<list type="bulleted">
863
<p>Bugs have been fixed in Dets concerning comparison
864
(==) and matching (=:=).</p>
865
<p>The STDLIB manual pages
866
have been updated as to more carefully state when terms
867
are matched and when they are compared.</p>
868
<p>Own Id: OTP-4738 Aux Id: OTP-4685 </p>
871
<p>The shell has been updated to fix the following flaws:
872
Shell process exit left you with an unresponsive initial
873
shell if not using oldshell. Starting a restricted shell
874
with a nonexisting callback module resulted in a shell
875
where no commands could be used, not even init:stop/0.
876
Fun's could not be used as parameters to local shell
877
functions (in shell_default or user_default) when
878
restricted_shell was active.</p>
879
<p>Own Id: OTP-6537</p>
882
<p>A bug in QLC's parse transform has been fixed.</p>
883
<p>Own Id: OTP-6590</p>
886
<p>A bug concerning <c>lists:sort/1</c> and
887
<c>lists:keysort/2</c> and a mix of floating point
888
numbers and integers has been fixed.</p>
889
<p>Own Id: OTP-6606</p>
892
<p>When calling <c>erlang:garbage_collect/0</c> in the
893
Erlang shell not only the evaluator process (the one
894
returned by calling <c>self()</c> in the Erlang shell) is
895
garbage collected, but also the process holding the
897
<p>Own Id: OTP-6659</p>
900
<p>Functions of the <c>beam_lib</c> module that used to
901
catch exceptions and return a tuple
902
<c>{'EXIT',Reason}</c> now exit with the reason
904
<p>Own Id: OTP-6711</p>
907
<p>The <c>erl_eval</c> module now calls the non-local
908
function handler whenever an operator is evaluated
909
(exceptions are <c>andalso</c>, <c>orelse</c>, and
910
<c>catch</c>). The non-local function handler is now also
911
called when the function or operator occurs in a guard
912
test (such calls used to be ignored).</p>
913
<p>These changes affect the Erlang shell when running in
914
restricted mode: the callback function
915
<c>non_local_allowed/3</c> is now called for operators
916
such as <c>'!'/2</c>. This means that
917
<c>non_local_allowed/3</c> may need to be changed as to
918
let operators through. Note that <c>erlang:'!'/2</c> as
919
well as <c>erlang:send/2,3</c> have to be restricted in
920
order to stop message passing in the shell.</p>
921
<p>*** POTENTIAL INCOMPATIBILITY ***</p>
922
<p>Own Id: OTP-6714 Aux Id: seq10374 </p>
928
<title>Improvements and New Features</title>
929
<list type="bulleted">
931
<p>The new compiler option <c>warn_obsolete_guard</c> can
932
be used for turning on warnings for calls to old type
934
<p>Own Id: OTP-6585</p>
937
<p>For scripts written using <c>escript</c>, there is a new
938
function <c>escript:script_name/0</c>, which can be used
939
to retrieve the pathame of the script. The documentation
940
has been clarified regarding pre-defined macros such as
941
?MODULE and the module name.</p>
942
<p>Own Id: OTP-6593</p>
945
<p>Minor Makefile changes.</p>
946
<p>Own Id: OTP-6689 Aux Id: OTP-6742 </p>
953
<title>STDLIB 1.14.4</title>
956
<title>Fixed Bugs and Malfunctions</title>
957
<list type="bulleted">
959
<p>The MD5 calculation of a BEAM file done by
960
<c>code:module_md5/1</c>, <c>beam_lib:md5/1</c>, and by
961
the compiler for the default value of the <c>vsn</c>
962
attribute have all been changed so that its result will
963
be the same on all platforms; modules containing funs
964
could get different MD5s on different platforms.</p>
965
<p>Own Id: OTP-6459</p>
968
<p>When sorting terms using the <c>file_sorter</c> module
969
(the option <c>Format</c> set to <c>term</c>), file
970
errors were not always properly handled. This bug has
972
<p>The directory supplied with the
973
<c>tmpdir</c> option is no longer checked unless it is
974
actually used. The error reason <c>not_a_directory</c>
975
can no longer be returned; instead a <c>file_error</c>
976
tuple is returned</p>
977
<p>Own Id: OTP-6526</p>
980
<p>Bugs regarding <c>try</c>/<c>catch</c> have been fixed
981
in the <c>erl_eval</c> module.</p>
982
<p>Own Id: OTP-6539</p>
985
<p>When sorting the operands of a join operation, QLC
986
called <c>file:open/3</c> with bad arguments. This bug
988
<p>Own Id: OTP-6562 Aux Id: seq10606 </p>
994
<title>Improvements and New Features</title>
995
<list type="bulleted">
997
<p>The functions <c>beam_lib:cmp/1</c> and
998
<c>beam_lib:strip/1</c> (and similar functions) have been
999
updated to handle optional chunks (such as "FunT") in
1000
more general way in order to be future compatible.</p>
1001
<p>The function <c>beam_lib:chunks/3</c> has been
1003
<p>The function <c>beam_lib:md5/1</c> has been added.</p>
1004
<p>Own Id: OTP-6443</p>
1007
<p>Added base64 as a module to stdlib, encoding and decoding</p>
1008
<p>Own Id: OTP-6470</p>
1011
<p>Added the functions to_upper/1 and to_lower/1 to the
1012
string module. These provide case conversion for ISO/IEC
1013
8859-1 characters (Latin1) and strings.</p>
1014
<p>Own Id: OTP-6472</p>
1017
<p>The callback function <c>non_local_allowed/3</c> used
1018
by the restricted shell can now return the value
1019
<c>{{restricted,NewFuncSpec,NewArgList},NewState}</c>
1020
which can be used for letting the shell call some other
1021
function than the one specified.</p>
1022
<p>Own Id: OTP-6497 Aux Id: seq10555 </p>
1025
<p>There is a new <c>escript</c> program that can be used
1026
for writing scripts in Erlang. Erlang scripts don't need
1027
to be compiled and any arguments can be passed to them
1028
without risk that they are interpreted by the Erlang
1030
<p>Own Id: OTP-6505</p>
1033
<p>The <c>Format</c> argument of the functions
1034
<c>io:fwrite/2,3</c> and <c>io_lib:fwrite/2</c> is now
1035
allowed to be a binary.</p>
1036
<p>Own Id: OTP-6517</p>
1043
<title>STDLIB 1.14.3.1</title>
1046
<title>Fixed Bugs and Malfunctions</title>
1047
<list type="bulleted">
1049
<p>The control sequences <c>p</c> and <c>P</c> of the
1050
<c>Format</c> argument of the functions
1051
<c>io:fwrite/2,3</c> and <c>io_lib:fwrite/2</c> could
1052
cause a <c>badarg</c> failure when applied to binaries.
1053
This bug was introduced in STDLIB 1.14.3. (Thanks to
1055
<p>Own Id: OTP-6495</p>
1061
<title>Improvements and New Features</title>
1062
<list type="bulleted">
1064
<p>Added the option {cwd, Dir} to make zip-archives with
1065
relative pathnames without having to do (a global)
1067
<p>Own Id: OTP-6491 Aux Id: seq10551 </p>
1074
<title>STDLIB 1.14.3</title>
1077
<title>Fixed Bugs and Malfunctions</title>
1078
<list type="bulleted">
1080
<p>The <c>spawn_opt/2,3,4,5</c> option <c>monitor</c> --
1081
introduced in Kernel 2.11.2 -- is currently not possible
1082
to use when starting a process using <c>proc_lib</c>,
1083
that is, also when starting a gen_server, gen_fsm etc. </p>
1084
<p>This limitation has now been properly documented and the
1085
behavior of the <c>gen_fsm</c>, <c>gen_server</c>, and
1086
<c>proc_lib</c><c>start</c> and <c>start_link</c>
1087
functions when providing this option has been changed
1088
from hanging indefinitely to failing with reason
1090
<p>(Thanks to Fredrik Linder)</p>
1091
<p>Own Id: OTP-6345</p>
1097
<title>Improvements and New Features</title>
1098
<list type="bulleted">
1100
<p>The control sequence <c>P</c> of the <c>Format</c>
1101
argument of the functions <c>io:fwrite/2,3</c> and
1102
<c>io_lib:fwrite/2</c> now replaces the tail of binary
1103
strings with <c>...</c> when the maximum depth has been
1104
reached. For instance, <c><![CDATA[io:fwrite("~P", [<<"a binary string">>, 3]).]]></c> prints <c><![CDATA[<<"a binary"...>>]]></c>.</p>
1105
<p>The indentation takes more care not to exceed the
1106
right margin, if possible.</p>
1107
<p>If the maximum depth is
1108
reached while printing a tuple, <c>,...</c> is printed
1109
instead of <c>|...</c> (this change applies to the
1110
control sequence <c>W</c> as well).</p>
1111
<p>Own Id: OTP-6354</p>
1114
<p>The Erlang shell command <c>h/0</c> that prints the
1115
history list now avoids printing (huge) terms referred to
1116
by <c>v/1</c> but instead just prints the call to
1118
<p>Own Id: OTP-6390</p>
1125
<title>STDLIB 1.14.2.2</title>
1128
<title>Fixed Bugs and Malfunctions</title>
1129
<list type="bulleted">
1131
<p>The functions <c>dets:select/1,3</c>,
1132
<c>dets:match/1,3</c>, and <c>dets:match_object/1,3</c>
1133
have been changed as to never return
1134
<c>{[],Continuation}</c>. This change affects the
1135
corresponding functions in Mnesia.</p>
1137
fixed in QLC: <c>qlc:info()</c> could crash if the
1138
<c>tmpdir</c> option did not designate a valid directory;
1139
the results of looking up keys are kept in RAM, which
1140
should improve performance.</p>
1141
<p>Own Id: OTP-6359</p>
1148
<title>STDLIB 1.14.2.1</title>
1151
<title>Fixed Bugs and Malfunctions</title>
1152
<list type="bulleted">
1154
<p>A bug in <c>erl_pp:exprs()</c> has been fixed.</p>
1155
<p>Own Id: OTP-6321 Aux Id: seq10497 </p>
1162
<title>STDLIB 1.14.2</title>
1165
<title>Fixed Bugs and Malfunctions</title>
1166
<list type="bulleted">
1168
<p>The control sequences <c>p</c> and <c>P</c> of the
1169
<c>Format</c> argument of the functions
1170
<c>io:format/2,3</c> and <c>io_lib:format/2</c> did not
1171
handle binaries very well. This bug, introduced in
1172
stdlib-1.14, has been fixed.</p>
1173
<p>Own Id: OTP-6230</p>
1176
<p><c>filelib:wildcard(Wc, PathWithRedundantSlashes)</c>,
1177
where <c>PathWithRedundantSlashes</c> is a directory path
1178
containing redundant slashes, such as <c>/tmp/</c> or
1179
<c>//tmp</c>, could return incorrect results. (Thanks to
1180
Martin Bjorklund.)</p>
1181
<p>Own Id: OTP-6271</p>
1184
<p>The Erlang code preprocessor crashed if the predefined
1185
macros ?MODULE or ?MODULE_STRING were used before the
1186
module declaration. This bug has been fixed.</p>
1187
<p>Own Id: OTP-6277</p>
1193
<title>Improvements and New Features</title>
1194
<list type="bulleted">
1196
<p>Support for faster join of two tables has been added
1197
to the <c>qlc</c> module. There are two kinds of fast
1198
joins: lookup join that uses existing indices, and merge
1199
join that takes two sorted inputs. There is a new
1200
<c>join</c> option that can be used to force QLC to use a
1201
particular kind of join in some QLC expression.</p>
1202
<p>Several other changes have also been included:</p>
1204
<list type="bulleted">
1206
<p>The new <c>tmpdir</c> option of <c>cursor/2</c>,
1207
<c>eval/2</c>, <c>fold/4</c>, and <c>info/2</c> can be
1208
used to set the directory that join uses for temporary
1209
files. The option also overrides the <c>tmpdir</c> option
1210
of <c>keysort/3</c> and <c>sort/2</c>.</p>
1213
<p>The new <c>lookup</c> option can be used to
1214
assert that constants are looked up when evaluating some
1218
<p>The <c>cache</c> and <c>cache_all</c> options
1219
accept new tags: <c>ets</c>, <c>list</c>, and <c>no</c>.
1220
The tag <c>list</c> caches answers in a list using a
1221
temporary file if the answers cannot be held in RAM.
1222
Combining <c>{cache,list}</c> and <c>{unique, true}</c>
1223
is equivalent to calling <c>sort/2</c> with the option
1224
<c>unique</c> set to <c>true</c>. The old tags
1225
<c>true</c> (equivalent to <c>ets</c>) and <c>false</c>
1226
(equivalent to <c>no</c>) are recognized for backward
1230
<p>The new option <c>max_list_size</c> can be used
1231
to set the limit where merge join starts to use temporary
1232
files for large equivalence classes and when answers
1233
cached in lists are put on temporary files.</p>
1236
<p>There is a new callback <c>is_sorted_key</c> to
1237
be supplied as an option to <c>table/2</c>.</p>
1240
<p>QLC analyzes each and every QLC expression when
1241
trying to find constants for the lookup function.
1242
Hitherto only QLC expressions with exactly one generator
1244
<p>Note that only filters with guard
1245
syntax placed immediately after the generator are
1246
analyzed. The restriction to guard filters is an
1247
incompatible change. See <c>qlc(3)</c> for further
1251
<p>In a similar way several match specifications
1252
for traversal of QLC tables can be utilized for different
1253
generators of one single QLC expression.</p>
1256
<p>A bug has been fixed: when caching answers to a
1257
sufficiently complex query it could happen that some
1258
answers were not returned.</p>
1261
<p>*** POTENTIAL INCOMPATIBILITY ***</p>
1262
<p>Own Id: OTP-6038</p>
1265
<p>The Erlang pretty printer (<c>erl_pp</c>) is now much
1266
faster when the code is deeply nested. A few minor bugs
1267
have been fixed as well.</p>
1268
<p>Own Id: OTP-6227 Aux Id: OTP-5924 </p>
1271
<p>The Erlang shell now tries to garbage collect large
1272
binaries. Under certain circumstances such binaries could
1273
otherwise linger on for an indefinite amount of time.</p>
1274
<p>Own Id: OTP-6239</p>
1277
<p>To help Dialyzer find more bugs, many functions in the
1278
Kernel and STDLIB applications now only accept arguments
1279
of the type that is documented.</p>
1280
<p>For instance, the functions <c>lists:prefix/2</c> and
1281
<c>lists:suffix/2</c> are documented to only accept lists
1282
as their arguments, but they actually accepted anything
1283
and returned <c>false</c>. That has been changed so that
1284
the functions cause an exception if one or both arguments
1286
<p>Also, the <c>string:strip/3</c> function is documented
1287
to take a character argument that is a character to strip
1288
from one or both ends of the string. Given a list instead
1289
of a character, it used to do nothing, but will now cause
1291
<p>Dialyzer will find most cases where those functions
1292
are passed arguments of the wrong type.</p>
1293
<p>*** POTENTIAL INCOMPATIBILITY ***</p>
1294
<p>Own Id: OTP-6295</p>
1301
<title>STDLIB 1.14.1</title>
1304
<title>Fixed Bugs and Malfunctions</title>
1305
<list type="bulleted">
1307
<p>The functions <c>c:y/1,2</c> which call
1308
<c>yecc:file/1,2</c> are now listed by
1309
<c>c:help/0</c>.</p>
1310
<p>Documentation of <c>c:y/1,2</c> has been added to
1312
<p>The fact that the control sequence character <c>s</c>
1313
recognizes binaries and deep character lists has been
1314
documented in <c>io(3)</c>. This feature was added in
1315
R11B-0 (OTP-5403).</p>
1316
<p>Own Id: OTP-6140</p>
1319
<p>The shell command rr() sometimes failed to read record
1320
definitions from file(s). This problem has been fixed.</p>
1321
<p>Own Id: OTP-6166 Aux Id: OTP-5878 </p>
1324
<p>The nonlocal function handler in <c>erl_eval</c>, which
1325
is used for implementing the restricted mode of the
1326
Erlang shell, did not handle calls to
1327
<c>erlang:apply/3</c> correctly. This bug has been fixed.</p>
1328
<p>Own Id: OTP-6169 Aux Id: seq10374 </p>
1331
<p>ets:rename/1 could deadlock, or crash the SMP emulator
1332
when the table wasn't a named table.</p>
1333
<p>ets:next/2, and ets:prev/2 could return erroneous results
1334
on the SMP emulator.</p>
1335
<p>Own Id: OTP-6198 Aux Id: seq10392, seq10415 </p>
1338
<p>When closing a Dets table the space management data was
1339
sometimes saved in such a way that opening the table
1340
could not be done without repairing the file. This bug
1342
<p>Own Id: OTP-6206</p>
1349
<title>STDLIB 1.14</title>
1352
<title>Fixed Bugs and Malfunctions</title>
1353
<list type="bulleted">
1355
<p>A bugfix in QLC: two of the call-back functions used
1356
for implementing QLC tables, <c>TraverseFun</c> and
1357
<c>LookupFun</c>, are now allowed to return a term other
1358
than a list. Such a term is immediately returned as the
1359
results of the current query, and is useful mostly for
1360
returning error tuples.</p>
1361
<p>Several other minor bugs have been also been fixed.</p>
1362
<p>Own Id: OTP-5195</p>
1365
<p>The STDLIB modules <c>error_logger_file_h</c> and
1366
<c>error_logger_tty_h</c> now read the environment
1367
variable <c>utc_log</c> from the SASL application.</p>
1368
<p>Own Id: OTP-5535</p>
1371
<p><c>ets:info/1</c> has been corrected to behave according
1372
to the documentation and return a list of tuples, not a
1373
tuple with tuples.</p>
1374
<p>*** POTENTIAL INCOMPATIBILITY ***</p>
1375
<p>Own Id: OTP-5639</p>
1378
<p>Referencing a so far undeclared record from the default
1379
value of some record declaration is from now on considered
1380
an error by the linter. It is also an error if the default
1381
value of a record declaration uses or binds a variable.</p>
1382
<p>*** POTENTIAL INCOMPATIBILITY ***</p>
1383
<p>Own Id: OTP-5878</p>
1386
<p>When a file <c>.hrl</c> file is included using
1387
<c>-include_lib</c>, the include path is temporarily
1388
updated to include the directory the <c>.hrl</c> file was
1389
found in, which will allow that <c>.hrl</c> file to itself
1390
include files from the same directory as itself using
1391
<c>-include</c>. (Thanks to Richard Carlsson.)</p>
1392
<p>Own Id: OTP-5944</p>
1395
<p>Corrected <c>filelib:ensure_dir/1</c> which sometimes
1396
returned <c>true</c> and sometimes <c>ok</c> to always
1397
return <c>ok</c> when successful. This goes against the
1398
documentation which said <c>true</c>, but <c>ok</c> was
1399
judged to be a more logical return value.</p>
1400
<p>*** POTENTIAL INCOMPATIBILITY ***</p>
1401
<p>Own Id: OTP-5960 Aux Id: seq10240 </p>
1404
<p>The shell now handles records better when used in calls
1405
on the form <c>{Module, Function}(ArgList)</c>.</p>
1406
<p>Own Id: OTP-5990 Aux Id: OTP-5876 </p>
1409
<p>The functions <c>lists:ukeysort/2</c> and
1410
<c>lists:ukeymerge/3</c> have been changed in such a way
1411
that two tuples are considered equal if their keys
1413
<p>For the sake of consistency, <c>lists:usort/2</c> and
1414
<c>lists:umerge/3</c> have been modified too: two elements
1415
are considered equal if they compare equal.</p>
1416
<p>The <c>file_sorter</c> module has been modified in a
1417
similar way: the <c>unique</c> option now applies to the
1418
key (<c>keysort()</c> and <c>keymerge()</c>) and the
1419
ordering function (the option <c>{order, Order} </c>).</p>
1420
<p>*** POTENTIAL INCOMPATIBILITY ***</p>
1421
<p>Own Id: OTP-6019</p>
1424
<p>Correction in documentation for
1425
<c>ets:update_counter/3</c>; failure with <c>badarg</c>
1426
also if the counter to be updated is the key.</p>
1427
<p>Own Id: OTP-6072</p>
1430
<p>When sorting terms using the <c>file_sorter</c> module
1431
and an ordering fun, the sort was not always stable. This
1432
bug has been fixed.</p>
1433
<p>Own Id: OTP-6088</p>
1439
<title>Improvements and New Features</title>
1440
<list type="bulleted">
1442
<p>Improvements of the linter:</p>
1443
<list type="bulleted">
1445
<p>The <c>compile</c> attribute is recognized after
1446
function definitions.</p>
1449
<p>The new compiler option
1450
<c>nowarn_deprecated_function</c> can be used for
1451
turning off warnings for calls to deprecated functions.</p>
1454
<p>The new compiler option
1455
<c>{nowarn_unused_function,[{Name,Arity}]}</c> turns off
1456
warnings for unused local functions for the mentioned
1457
functions. The new options
1458
<c>{nowarn_deprecated_function,[{Module,Name,Arity}]}</c>
1459
and <c>{nowarn_bif_clash,[{Name,Arity}]}</c> work
1463
<p>The Erlang code preprocessor <c>epp</c> now recognizes
1464
the <c>file</c> attribute. This attribute is meant to be
1465
used by tools such as Yecc that generate source code
1467
<p>Own Id: OTP-5362</p>
1470
<p>The formatting option <c>~s</c> of <c>io:fwrite</c> and
1471
<c>io_lib:fwrite</c> has been extended to handle arguments
1472
that are binaries or I/O lists.</p>
1473
<p>Own Id: OTP-5403</p>
1476
<p>The control sequences <c>p</c> and <c>P</c> of the
1477
<c>Format</c> argument of the functions
1478
<c>io:format/2,3</c> and <c>io_lib:format/2</c> have been
1479
changed as to display the contents of binaries containing
1480
printable characters as strings.</p>
1481
<p>Own Id: OTP-5485</p>
1484
<p>The linter emits warnings for functions exported more
1485
than once in <c>export</c> attributes.</p>
1486
<p>Own Id: OTP-5494</p>
1489
<p>A manual for STDLIB has been added, <c>stdlib(6)</c>. It
1490
mentions the configuration parameters for the Erlang
1492
<p>Own Id: OTP-5530</p>
1495
<p>Added the <c>zip</c> module with functions for reading
1496
and creating zip archives. See <c>zip(3)</c>.</p>
1497
<p>Own Id: OTP-5786</p>
1500
<p>Simple-one-for-one supervisors now store the pids of
1501
child processes using <c>dict</c> instead of a list. This
1502
significantly improves performance when there are many
1503
dynamic supervised child processes. (Thanks to Mickaël
1504
Rémond et al.)</p>
1505
<p>Own Id: OTP-5898</p>
1508
<p>When given the new option '<c>strict_record_tests</c>',
1509
the compiler will generate code that verifies the record
1510
type for '<c>R#record.field</c>' operations in guards. Code
1511
that verifies record types in bodies has already been
1512
generated since R10B, but in this release there will be a
1513
'<c>{badrecord,RecordTag}</c>' instead of a
1514
'<c>badmatch</c>' if the record verification test fails.
1515
See the documentation for the <c>compile</c> module for
1516
more information.</p>
1517
<p>The Erlang shell always applies strict record tests.</p>
1518
<p>Own Id: OTP-5915 Aux Id: OTP-5714 </p>
1521
<p>The Erlang pretty printer (<c>erl_pp</c>) now tries to
1522
insert line breaks at appropriate places.</p>
1523
<p>Own Id: OTP-5924</p>
1526
<p>The <c>public</c> option has been removed from
1527
<c>digraph:new/1</c>. The reason is that several
1528
functions in the <c>digraph</c> module are implemented
1529
using multiple ETS accesses, which is not thread safe.
1530
(Thanks to Ulf Wiger.)</p>
1531
<p>*** POTENTIAL INCOMPATIBILITY ***</p>
1532
<p>Own Id: OTP-5985</p>
1535
<p>The function <c>lists:keyreplace/4</c> checks that the
1536
fourth argument (<c>NewTuple</c>) is a tuple.</p>
1537
<p>Own Id: OTP-6023</p>
1540
<p>Added an example of how to reconstruct source code from
1541
debug info (abstract code) to <c>beam_lib(3)</c>. (Thanks
1542
to Mats Cronqvist who wrote the example.)</p>
1543
<p>Own Id: OTP-6073</p>
1546
<p>The new compiler option <c>warn_unused_record</c> is used
1547
for finding unused locally defined record types.</p>
1548
<p>Own Id: OTP-6105</p>
1555
<title>STDLIB 1.13.12</title>
1558
<title>Fixed Bugs and Malfunctions</title>
1559
<list type="bulleted">
1561
<p><c>shell_default:xm/1</c> has been added. It calls
1562
<c>xref:m/1</c>.</p>
1563
<p>Own Id: OTP-5405 Aux Id: OTP-4101 </p>
1566
<p>Warnings are output whenever so far undeclared records are
1567
referenced from some default value of a record
1568
declaration. In STDLIB 1.14 (R11B) such forward references
1569
will cause a compilation error.</p>
1570
<p>Own Id: OTP-5878</p>
1573
<p>The linter's check of the <c>deprecated</c> attribute did
1574
not take the compile option <c>export_all</c> into
1575
account. This bug has been fixed.</p>
1576
<p>Own Id: OTP-5917</p>
1579
<p>The Erlang pretty printer did not handle <c>try/catch</c>
1580
correctly. This bug has been fixed.</p>
1581
<p>Own Id: OTP-5926</p>
1584
<p>Corrected documentation for <c>lists:nthtail/3</c>.</p>
1585
<p>Added documentation for <c>lists:keymap/3</c>.</p>
1586
<p>Tried to clarify some other type declarations and
1587
function descriptions in <c>lists(3)</c>.</p>
1588
<p>Corrected documentation for <c>timer:now_diff/2</c>.</p>
1589
<p>Fixed broken links in <c>gen_fsm(3)</c>,
1590
<c>gen_server(3)</c>, <c>io_lib(3)</c> and <c>lib(3)</c>.</p>
1591
<p>Own Id: OTP-5931</p>
1594
<p>Type checks have been added to functions in
1595
<c>lists.erl</c>.</p>
1596
<p>Own Id: OTP-5939</p>
1602
<title>Improvements and New Features</title>
1603
<list type="bulleted">
1605
<p>The new STDLIB module <c>erl_expand_records</c> expands
1606
records in abstract code. It is used by the Erlang shell,
1607
which means that Compiler is no longer used by the shell.</p>
1608
<p>Own Id: OTP-5876 Aux Id: OTP-5435 </p>
1611
<p>The compiler will now warn that the
1612
<c>megaco:format_versions/1</c> function is deprecated.</p>
1613
<p>Own Id: OTP-5976</p>
1620
<title>STDLIB 1.13.11</title>
1623
<title>Fixed Bugs and Malfunctions</title>
1624
<list type="bulleted">
1626
<p>When calling <c>gen_server:enter_loop</c> with a
1627
registered server name, it was only checked that the
1628
registered name existed, not that it actually was the
1629
name of the calling process.</p>
1630
<p>Own Id: OTP-5854</p>
1636
<title>Improvements and New Features</title>
1637
<list type="bulleted">
1639
<p>More detail on <c>beam_lib:version/1</c> in
1641
<p>Own Id: OTP-5789</p>
1644
<p>The new function <c>io:read/3</c> works like
1645
<c>io:read/1,2</c> but takes a third argument,
1646
<c>StartLine</c>.</p>
1647
<p>Own Id: OTP-5813</p>
1650
<p>The new function <c>gen_fsm:enter_loop/4,5,6</c>, similar
1651
to <c>gen_server:enter_loop/3,4,5</c>, has been added.</p>
1652
<p>Own Id: OTP-5846 Aux Id: seq10163 </p>
1655
<p>The function <c>c:i/1</c> is now exported.</p>
1656
<p>Own Id: OTP-5848 Aux Id: seq10164 </p>
1663
<title>STDLIB 1.13.10</title>
1666
<title>Fixed Bugs and Malfunctions</title>
1667
<list type="bulleted">
1669
<p>A couple of type errors have been fixed in <c>sofs</c>.</p>
1670
<p>Own Id: OTP-5739</p>
1673
<p>The pre-processor used to complain that the macro
1674
definition '<c>-define(S(S), ??S).</c>' was circular,
1675
which it isn't. (Thanks to Richard Carlsson.)</p>
1676
<p>Own Id: OTP-5777</p>
1683
<title>STDLIB 1.13.9</title>
1686
<title>Fixed Bugs and Malfunctions</title>
1687
<list type="bulleted">
1689
<p>The linter, QLC and the module <c>erl_pp</c> did not
1690
handle the new '<c>fun M:F/A</c>' construct in all
1691
situations. This problem has been fixed.</p>
1692
<p>Own Id: OTP-5644</p>
1698
<title>Improvements and New Features</title>
1699
<list type="bulleted">
1701
<p>The manual pages for most of the Kernel and some of
1702
the STDLIB modules have been updated, in particular
1703
regarding type definitions.</p>
1704
<p>The documentation of the return value for
1705
<c>erts:info/1</c> has been corrected.</p>
1706
<p>The documentation for <c>erlang:statistics/1</c> now
1707
lists all possible arguments.</p>
1708
<p>Own Id: OTP-5360</p>
1711
<p>Replaced some tuple funs with the new <c>fun M:F/A</c>
1713
<p>The high-order functions in the lists module no longer
1714
accept bad funs under any circumstances.
1715
'<c>lists:map(bad_fun, [])</c>' used to return
1716
'<c>[]</c>' but now causes an exception.</p>
1717
<p>Unused, broken compatibility code in the <c>ets</c>
1718
module was removed. (Thanks to Dialyzer.)</p>
1719
<p>Eliminated 5 discrepancies found by Dialyzer in the
1720
Appmon application.</p>
1721
<p>Own Id: OTP-5633</p>
1724
<p>The <c>c:i/0</c> function will now run in a paged mode if
1725
there are more than 100 processes in the system. (Thanks
1727
<p><c>erlang:system_info(process_count)</c> has been
1728
optimized and does now return exactly the same value as
1729
<c>length(processes())</c>. Previously
1730
<c>erlang:system_info(process_count)</c> did not include
1731
exiting processes which are included in
1732
<c>length(processes())</c>.</p>
1733
<p>The <c>+P</c> flag for <c>erl</c>, which sets the maximum
1734
number of processes allowed to exist at the same, no longer
1735
accepts values higher than 134217727. (You will still
1736
probably run out of memory before you'll be able to reach
1738
<p>Own Id: OTP-5645 Aux Id: seq9984 </p>
1745
<title>STDLIB 1.13.8</title>
1748
<title>Fixed Bugs and Malfunctions</title>
1749
<list type="bulleted">
1751
<p>Very minor corrections in <c>beam_lib</c> and its
1753
<p>Own Id: OTP-5589</p>
1759
<title>Improvements and New Features</title>
1760
<list type="bulleted">
1762
<p>The <c>erlang:port_info/1</c> BIF is now documented.
1763
Minor corrections of the documentation for
1764
<c>erlang:port_info/2</c>.</p>
1765
<p>Added a note to the documentation of the <c>math</c>
1766
module that all functions are not available on all
1768
<p>Added more information about the '<c>+c</c>' option in
1769
the <c>erl</c> man page in the ERTS documentation.</p>
1770
<p>Own Id: OTP-5555</p>
1773
<p>The new <c>fun M:F/A</c> construct creates a fun that
1774
refers to the latest version of <c>M:F/A</c>. This syntax is
1775
meant to replace tuple funs <c>{M,F}</c> which have many
1777
<p>The new type test <c>is_function(Fun,A)</c> (which may be
1778
used in guards) test whether <c>Fun</c> is a fun that can be
1779
applied with <c>A</c> arguments. (Currently, <c>Fun</c> can
1780
also be a tuple fun.)</p>
1781
<p>Own Id: OTP-5584</p>
1788
<title>STDLIB 1.13.7</title>
1791
<title>Fixed Bugs and Malfunctions</title>
1792
<list type="bulleted">
1794
<p><c>filelib:wildcard/2</c> was broken (it ignored its
1795
second argument).</p>
1796
<p>Also, <c>filelib:wildcard("Filename")</c> (where the
1797
argument does not contain any meta-characters) would
1798
always return <c>["Filename"]</c>. Corrected so that an
1799
empty list will be returned if <c>"Filename"</c> does not
1800
actually exist. (Same correction in
1801
<c>filelib:wildcard/2</c>.) (This change is a slight
1802
incompatibility.)</p>
1803
<p><c>filelib:wildcard/1,2</c> will generate a different
1804
exception when given bad patterns such as <c>"{a,"</c>. The
1805
exception used to be caused by
1806
'<c>exit(missing_delimiter)</c>' but is now
1807
'<c>erlang:error({badpattern,missing_delimiter})</c>'.</p>
1808
<p>Own Id: OTP-5523 Aux Id: seq9824 </p>
1814
<title>Improvements and New Features</title>
1815
<list type="bulleted">
1817
<p>Further improvements of encrypted debug info: New option
1818
<c>encrypt_debug_info</c> for compiler.</p>
1819
<p>Own Id: OTP-5541 Aux Id: seq9837 </p>
1826
<title>STDLIB 1.13.6</title>
1829
<title>Fixed Bugs and Malfunctions</title>
1830
<list type="bulleted">
1832
<p>When opening a Dets table read only an attempt was
1833
sometimes made to re-hash the table resulting in an error
1834
message. This problem has been fixed.</p>
1835
<p>Own Id: OTP-5487 Aux Id: OTP-4989 </p>
1841
<title>Improvements and New Features</title>
1842
<list type="bulleted">
1844
<p>It is now possible to encrypt the debug information in
1845
Beam files, to help keep the source code secret. See the
1846
documentation for <c>compile</c> on how to provide the key
1847
for encrypting, and the documentation for <c>beam_lib</c>
1848
on how to provide the key for decryption so that tools such
1849
as the Debugger, <c>xref</c>, or <c>cover</c> can be used.</p>
1850
<p>The <c>beam_lib:chunks/2</c> functions now accepts an
1851
additional chunk type <c>compile_info</c> to retrieve
1852
the compilation information directly as a term. (Thanks
1853
to Tobias Lindahl.)</p>
1854
<p>Own Id: OTP-5460 Aux Id: seq9787 </p>
1861
<title>STDLIB 1.13.5</title>
1864
<title>Fixed Bugs and Malfunctions</title>
1865
<list type="bulleted">
1867
<p>Closing a Dets table kept in RAM would cause a crash if
1868
the file could not be written. This problem has been
1869
fixed by returning an error tuple.</p>
1870
<p>Own Id: OTP-5402</p>
1873
<p><c>erl_pp</c> now correctly pretty-prints <c>fun F/A</c>.</p>
1874
<p>Own Id: OTP-5412</p>
1877
<p>The Erlang shell failed if the compiler was not in the
1878
code path. This problem has been fixed, but in order to
1879
evaluate records the compiler is still needed.</p>
1880
<p>Own Id: OTP-5435</p>
1883
<p>Corrected the example in the documentation for
1884
<c>ets:match/2</c>. Also clarified that
1885
<c>ets:update_counter/3</c> updates the counter atomically.
1886
(Thanks to Anders Svensson.)</p>
1887
<p>Own Id: OTP-5452 Aux Id: seq9770, seq9789 </p>
1893
<title>Improvements and New Features</title>
1894
<list type="bulleted">
1896
<p>The possibility to start the Erlang shell in parallel
1897
with the rest of the system was reintroduced for
1898
backwards compatibility in STDLIB 1.13.1. The flag to be
1899
used for this is now called <c>async_shell_start</c> and has
1900
been documented. New shells started from the JCL menu are
1901
not syncronized with <c>init</c> anymore. This makes it
1902
possible to start a new shell (e.g. for debugging purposes)
1903
even if the initial shell has not come up.</p>
1904
<p>Own Id: OTP-5406 Aux Id: OTP-5218 </p>
1907
<p>The compiler will now produce warnings when using the
1908
deprecated functions in the <c>snmp</c> module.</p>
1909
<p>Own Id: OTP-5425</p>
1912
<p>The function <c>c:zi/0</c> has been removed. Use
1913
<c>c:i/0</c> instead.</p>
1914
<p>Own Id: OTP-5432</p>
1917
<p>Corrected two minor bugs found by the Dialyzer:
1918
Calling a parameterized module from a restricted shell
1919
(i.e. if <c>shell:start_restricted/1</c> has been used)
1920
would crash the shell evaluator. A debug printout in
1921
<c>gen_fsm</c> had a clause that would never match; causing
1922
less information to be printed.</p>
1923
<p>And a somewhat more serious one also found by
1924
Dialyzer: <c>rpc:yield/1</c> would crash unless the call
1925
started by <c>rpc:async_call/4</c> had already finished;
1926
<c>rpc:nb_yield(Key,infinity)</c> would also crash.</p>
1927
<p>Cleaned up and removed redundant code found by
1928
Dialyzer in <c>erlang:dmonitor_p/2</c>.</p>
1929
<p>Own Id: OTP-5462</p>
1936
<title>STDLIB 1.13.4</title>
1939
<title>Fixed Bugs and Malfunctions</title>
1940
<list type="bulleted">
1942
<p>Bugs in the Erlang shell have been fixed.</p>
1943
<p>Own Id: OTP-5327</p>
1946
<p>Some dead code reported by Dialyzer was eliminated.</p>
1947
<p>A bug in <c>dbg</c> when tracing to wrap trace files has
1948
been corrected. It failed to delete any already existing
1949
wrap trace files with the same names when starting a new
1951
<p>Own Id: OTP-5329</p>
1954
<p>The linter could output invalid warnings about bit
1955
patterns in record initializations. This problem has been
1957
<p>Own Id: OTP-5338</p>
1960
<p><c>ordsets:is_set(NoList)</c>, where <c>NoList</c> is any
1961
term except a list, would crash. For consistency with
1962
<c>sets:is_set/1</c> and <c>gb_sets:is_set/1</c>, it now
1963
returns <c>false</c>.</p>
1964
<p>Own Id: OTP-5341</p>
1967
<p>A BIF <c>erlang:raise/3</c> has been added. See the manual
1968
for details. It is intended for internal system programming
1969
only, advanced error handling.</p>
1970
<p>Own Id: OTP-5376 Aux Id: OTP-5257 </p>
1976
<title>Improvements and New Features</title>
1977
<list type="bulleted">
1979
<p>The <c>deprecated</c> attribute is now checked by the
1980
linter. See <c>xref(3)</c> for a description of the
1981
<c>deprecated</c> attribute.</p>
1982
<p>Own Id: OTP-5276</p>
1985
<p>The restricted shell will now indicate if the return
1986
value from a user predicate is on an incorrect form.</p>
1987
<p>Own Id: OTP-5335</p>
1994
<title>STDLIB 1.13.3</title>
1997
<title>Fixed Bugs and Malfunctions</title>
1998
<list type="bulleted">
2000
<p>Bugs concerning unused and shadowed variables have been
2001
fixed in the linter.</p>
2002
<p>Own Id: OTP-5091</p>
2005
<p>A bug in the evaluator that caused the shell to choke on
2006
bit syntax expressions has been fixed.</p>
2007
<p>Own Id: OTP-5237</p>
2010
<p><c>io:format/2</c> et.al no longer crashes for some
2011
combinations of precision and value for format character
2012
"g". Previously it crashed if the precision P was 4 or lower
2013
and the absolute value of the float to print was lower
2014
than 10^4 but 10^(P-1) or higher. Now it will not crash
2015
depending on the value of the float.</p>
2016
<p>Own Id: OTP-5263</p>
2019
<p>Bugs in the handling of the bit syntax have been fixed in
2020
the Erlang shell.</p>
2021
<p>Own Id: OTP-5269</p>
2024
<p><c>gb_sets:del_element/2</c> was changed to do the
2025
same as <c>gb_sets:delete_any/2</c> which was the
2026
original intention, not as <c>gb_sets:delete/2</c>. Code
2027
that relies on <c>gb_sets:del_element/2</c> causing an
2028
error if the element does not exist must be changed to
2029
call <c>gb_sets:delete/2</c> instead.</p>
2030
<p>The documentation was also updated to explicitly
2031
document functions that were only referred to as
2032
'aliases' of a documented function. Also, a list of all
2033
functions common to the <c>gb_sets</c>, <c>sets</c>, and
2034
<c>ordsets</c> was added.</p>
2035
<p>*** POTENTIAL INCOMPATIBILITY ***</p>
2036
<p>Own Id: OTP-5277</p>
2039
<p>Debug messages have been removed from the QLC module.</p>
2040
<p>Own Id: OTP-5283</p>
2046
<title>Improvements and New Features</title>
2047
<list type="bulleted">
2049
<p>The size of continuations returned from
2050
<c>dets:match/1,3</c>, <c>dets:match_object/1,3</c>, and
2051
<c>dets:select/1,3</c> has been reduced. This affects the
2052
amount of data Mnesia sends between nodes while
2053
evaluating QLC queries.</p>
2054
<p>Own Id: OTP-5232</p>
2061
<title>STDLIB 1.13.2</title>
2064
<title>Improvements and New Features</title>
2065
<list type="bulleted">
2067
<p>The <c>-rsh</c> switch for starting a remote shell
2068
(introduced with OTP-5210) clashed with an already existing
2069
switch used by <c>slave</c>. Therefore the switch for
2070
the remote shell is now instead named <c>-remsh</c>.</p>
2071
<p>Own Id: OTP-5248 Aux Id: OTP-5210 </p>
2078
<title>STDLIB 1.13.1</title>
2081
<title>Fixed Bugs and Malfunctions</title>
2082
<list type="bulleted">
2084
<p>The Pman 'trace shell' functionality was broken as has
2085
now been fixed. Furthermore, Pman could not correctly
2086
find the pid of the active shell if more than one shell
2087
process was running on the node. This has also been
2089
<p>Own Id: OTP-5191</p>
2092
<p>When the undocumented feature "parameterized modules" was
2093
used, the ?MODULE macro did not work correctly.</p>
2094
<p>Own Id: OTP-5224</p>
2100
<title>Improvements and New Features</title>
2101
<list type="bulleted">
2103
<p>You can now start Erlang with the <c>-rsh</c> flag which
2104
gives you a remote initial shell instead of a local one.
2107
\011 erl -sname this_node -rsh other_node@other_host
2109
<p>Own Id: OTP-5210</p>
2112
<p>The man page for the <c>lists</c> module has been updated
2113
with decscription of the new <c>zip</c>, <c>unzip</c>,
2114
and <c>partition/2</c> functions.</p>
2115
<p>Own Id: OTP-5213</p>
2118
<p>The top level group leader used to be listed as job #1 in
2119
the job list in JCL mode. Since there is no shell
2120
associated with this process that can be connected to, it
2121
will no longer be listed.</p>
2122
<p>Own Id: OTP-5214</p>
2125
<p>The possibility to start the Erlang shell in parallel
2126
with the rest of the system has been reintroduced for
2127
backwards compatibility. Note that this old behaviour is
2128
error prone and should not be used unless for some reason
2130
<p>Own Id: OTP-5218 Aux Id: seq9534 </p>
2133
<p>The <c>shell</c> commands <c>rr/1,2,3</c> now accepts
2134
wildcards when reading record definitions from BEAM
2136
<p>Own Id: OTP-5226</p>