Age | Commit message (Collapse) | Author |
|
* maint:
Correct rand:export_seed/0 when there is no prior seed
|
|
* bjorn/stdlib/rand-export_seed/OTP-13162:
Correct rand:export_seed/0 when there is no prior seed
|
|
According to the documentation, rand:export_seed/0 should return
'undefined' if the seed has not been intialized. However, it will
create and return a seed. That means that the following code
will not work as expected:
case rand:export_seed() of
undefined -> rand:seen({1,2,3});
_ -> ok
end,
rand:uniform(Range)
|
|
* maint:
doc: Fix some minor issues in Types and Function Specifications
erts: Remove CDATA from The Abstract Format document
erts: Correct the types section in The Abstract Format document
stdlib: Correct pretty-printing of map types
stdlib: Pretty-print constraints as 'V :: T'
Conflicts:
erts/doc/src/absform.xml
|
|
Add parentheses around annotated type union elements in map pair
types. The bug was introduced in Erlang/OTP 18.0.
|
|
Print constraints as 'V :: T' rather than 'is_subtype(V, T)'.
|
|
* maint:
Extend erl_lint:format_error/1 to handle bittype mismatches
erl_lint_SUITE: Add smoke test of format_error/1
|
|
erl_lint:format_error/1 would crash with a function error if
conflicting types were given. That was most easily noticed in the
shell:
Eshell V7.0.3 (abort with ^G)
1> <<0/integer-binary>>.
*** ERROR: Shell process terminated! ***
Noticed-by: Aleksei Magusev
|
|
This type modifier was missed in 90efeaf21147505b1e8207822e606027f94183cc.
|
|
* maint:
stdlib: Fix the shell command rp and pretty-printing
|
|
The shell command 'rp' prints strings as lists of integers
when pretty printing of lists is 'false'.
|
|
There is no need to flatten filenames using file_name/1 every
time the current filename changes. Any filename obtained from
a source file will be already flattened. Only the original
source filename may need flattening.
|
|
Use maps instead of 'dict'. Remove the {atom,MacroName} wrappers
that were used for historical reasons.
|
|
The Type argument is always 'atom', so there is no need for the
argument.
|
|
|
|
Refactor scan_define() in order to share more between macros
without any arguments and macros with arguments.
|
|
Packages were removed in 34d865a7dfdb33 (R16), but the 'epp'
module was forgotten.
|
|
Unicode support was introduced in R13. The backward compatible code
path in 'io' is unlikely to be used in practice. Therefore, make sure
that the common case of an i/o server supporting unicode requests is
as fast as possible, making sure to get rid of the mathing and
re-building of tuples in the current code. Make the backward
compatible code path work with a minimum of code.
|
|
OTP-13082
* sverk/binary_split_bif:
erts: Minor refactor for binary find BIF backend
erts: Refactor BIF for binary:match,matches,split
erts: Refactor backend of binary:split
erts: Replace 0 with THE_NON_VALUE
stdlib: Add BIF option 'trim_all' to binary:split/3
stdlib: Add BIF binary:split/2 and binary:split/3
Conflicts:
bootstrap/lib/stdlib/ebin/binary.beam
|
|
|
|
* maint:
beam_lib: Document all_chunks/1 and build_module/1
|
|
beam_lib:all_chunks/1 and beam_lib:build_module/1 can be useful
for special-purpose stripping, for example to remove the "Line"
chunk.
|
|
The field 'dynamics' in #state{} is a union of two opaque types, which
is possibly problematic. Tagging the types should make the code safe
for warnings from future versions of Dialyzer.
|
|
Record field types have been modified due to commit 8ce35b2:
"Take out automatic insertion of 'undefined' from typed record fields".
|
|
Background
-----------
In record fields with a type declaration but without an initializer, the
Erlang parser inserted automatically the singleton type 'undefined' to
the list of declared types, if that value was not present there.
I.e. the record declaration:
-record(rec, {f1 :: float(),
f2 = 42 :: integer(),
f3 :: some_mod:some_typ()}).
was translated by the parser to:
-record(rec, {f1 :: float() | 'undefined',
f2 = 42 :: integer(),
f3 :: some_mod:some_typ() | 'undefined'}).
The rationale for this was that creation of a "dummy" #rec{} record
should not result in a warning from dialyzer that e.g. the implicit
initialization of the #rec.f1 field violates its type declaration.
Problems
---------
This seemingly innocent action has some unforeseen consequences.
For starters, there is no way for programmers to declare that e.g. only
floats make sense for the f1 field of #rec{} records when there is no
`obvious' default initializer for this field. (This also affects tools
like PropEr that use these declarations produced by the Erlang parser to
generate random instances of records for testing purposes.)
It also means that dialyzer does not warn if e.g. an is_atom/1 test or
something more exotic like an atom_to_list/1 call is performed on the
value of the f1 field.
Similarly, there is no way to extend dialyzer to warn if it finds record
constructions where f1 is not initialized to some float.
Last but not least, it is semantically problematic when the type of the
field is an opaque type: creating a union of an opaque and a structured
type is very problematic for analysis because it fundamentally breaks
the opacity of the term at that point.
Change
-------
To solve these problems the parser will not automatically insert the
'undefined' value anymore; instead the user has the option to choose the
places where this value makes sense (for the field) and where it does
not and insert the | 'undefined' there manually.
Consequences of this change
----------------------------
This change means that dialyzer will issue a warning for all places
where records with uninitialized fields are created and those fields have
a declared type that is incompatible with 'undefined' (e.g. float()).
This warning can be suppressed easily by adding | 'undefined' to the
type of this field. This also adds documentation that the user really
intends to create records where this field is uninitialized.
|
|
|
|
OTP-12032
* tomszilagyi/shell-support-del-home-end:
Erlang shell: Support keys Del, Home and End
|
|
|
|
* nybek/supervisor_reporting_error:
Fix supervisor reporting error
|
|
* bjorn/compiler/remove-deprecated/OTP-12979:
core_lib: Remove previously deprecated functions
|
|
* maint:
Update application versions
|
|
|
|
* maint:
stdlib: Fix leaking files after error_logger:logfile(close)
|
|
* dgud/stdlib/fix-file-error_log-leak:
stdlib: Fix leaking files after error_logger:logfile(close)
|
|
|
|
Introduced when changing state from tuple to record.
|
|
* leoliu/export-catch_exception:
Export shell:catch_exception/1 as documented
|
|
The recently added module erl_anno can no longer handle
negative line numbers.
|
|
|
|
* maint:
stdlib: Fix bug with unicode detection in re
|
|
* howleysv/stdlib/compiled-unicode/OTP-12977:
stdlib: Fix bug with unicode detection in re
|
|
Fix bug with unrecognised 'unicode' option in re:split/2,3 &
re:replace/3,4 when using pre-compiled regex.
|
|
* maint:
dialyzer: Add a testcase
Add documentation
Introduce sasl_report_SUITE
Teach sasl_report to limit crash reports
proc_lib: Add format/3
Teach error_logger_tty_h to truncate big messages
error_logger_tty_h: Refactor and modernize code
Teach error_logger_file_h to truncate big messages
error_logger_file_h: Refactor and modernize code
Remove unused code in error logger handlers
Add error_logger_h_SUITE
sasl_SUITE: Add a rudimentary test of the utc_log configuration
sasl_SUITE: Correct the log_file/1 test case
proc_lib_SUITE: Remove added report handlers
zip_SUITE: Don't trust priv_dir to be empty
|
|
We'll need a way to limit the size of the crash report produced
by proc_lib:format(). Add format/3, where the third argument is
a depth argument.
|
|
Add the possibility to truncate big messages to avoid running out
of memory.
|
|
Refactor, simplify, and modernize the code to facilitate future
improvements in the following commits.
|
|
Add the possibility to truncate big messages to avoid running out
of memory.
|
|
Refactor, simplify, and modernize the code to facilitate future
improvements in the following commits.
|
|
A long time ago, errors from the emulator itself was sent as
messages that would end up in the handle_info/2 function.
Those clauses in handle_info/2 can be removed.
The code for handling events tagged 'info' instead of 'info_msg'
can also be taken out.
|
|
* maint:
Optimize zip:unzip/2 when uncompressing to memory
wx: Fix assert log test
debugger: Fix broken debugger:quick/3 start
Remove erlang:now() and random usage in tests
|