Age | Commit message (Collapse) | Author |
|
* siri/filename-join-2/OTP-12158:
Fix handling of single dot in filename:join/2
|
|
|
|
* ap/attribute_fun_arity_in_map/OTP-12213:
stdlib: Test Map attributes via erl_pp
stdlib: erl_parse abstract Maps
stdlib: Refactor ?line in erl_pp_SUITE:misc_attrs
stdlib: Refactor Maps farity attributes
Allow Name/Arity syntax in maps inside attributes
|
|
|
|
* capflam/filelib_wildcard_fix:
Fix filelib:wildcard/2 when 'Cwd' ends with a dot
|
|
|
|
|
|
|
|
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:
1> filename:join("/a/.","b").
"/a/./b"
2> filename:join(["/a/.","b"]).
"/a/b"
In general, filename:join/1,2 removes single dots from the resulting
path, except dots that occur at the beginning or end of the path. The
problem above occurs when the first argument to join/2 ends with a
dot, then it is not removed even if the second argument differs from
an empty string and thus the dot ends up in "the middle" of the path.
This commit corrects this problem. A single dot is now only kept if it
occurs at the very beginning or the very end of the resulting path.
Test of filename:join/1,2 are added in filename_SUITE. In addition,
filelib_SUITE is updated with more tests of filelib:wildcard/2 since
this failed when the given current directory (second argument) ended
with a dot.
|
|
The appup tests for kernel, stdlib and sasl tests that the appup file
allows upgrade from the previous and current major release to the
current release. If, in the current release, the application version
was not changed compared to the previous release, then we would still
test that the appup supported the upgrade (i.e. from current release
to current release). This is now changed, in order to avoid test
failures on patch releases where kernel, stdlib and sasl are not
changed.
|
|
* nox/fix-exporting-rules/OTP-12186:
Rewrite merge of clause variable tables (in case, try, etc)
|
|
|
|
* egil/maps-with-doc-tests/OTP-12137:
stdlib: Test maps:with/2
stdlib: Document maps:with/2
|
|
|
|
* nox/erl_scan-fix-column-tracking:
Properly track column numbers in erl_scan
|
|
|
|
* dgud/stdlib/format_status_terminate/OTP-11967:
stdlib: Call format_status even if terminate callback crashes
|
|
|
|
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.
* The function should not depend on calling unused_vars/3 because that
function does not return variables which begins with an underscore,
something that only matters when emitting warnings. This could cause
a compiler crash if such a variable was reused afterwards.
* The variable tables from each clause are first merged together,
lists:merge/1 is safe to use because they are orddicts and thus
already sorted. This list is then traversed parallelly to the old
variable table, again taking advantage of their sorted order.
* The function does not emit warnings itself, there is no need to pass
around the lint state. In the same vein, vtunsafe/3 has been rewritten
to do more things by itself, given that all of its calls were similar.
Finally, compiled-out code has been removed.
* This reverts the code in 9ce148b1059e4da746a11f1d80a653340216c468,
which fixed the compiler crash and made erl_lint remember unsafe
variables, but forget about unused variables in the process.
* Other places of the code which relied on the old clunky behaviour were
also updated: unused and unsafe old variables are forgotten when
merging fun clauses and boolean shortcircuiting operators do not rely
on icrt_export/3 anymore.
|
|
|
|
OTP-12063
* nox/maps-shell-expansion:
Expand shell functions in map expressions
|
|
In such case, filelib:wildcard/2 returned truncated results:
1> file:set_cwd("/usr/lib/erlang/lib").
ok
2> filelib:wildcard("stdlib-*/ebin/*.app", filename:absname(".")).
["dlib-2.1/ebin/stdlib.app"]
|
|
|
|
|
|
This commit complements 769996c0cd4cb68c157e39de725642f209ed7423 and
adds tests for the following problems introduced by
f11aabdc9fec593c31e6c4f3fa25c1707e9c35df:
Given the symlink 'dirlink' pointing to an existing dir, then
- filelib:is_regular("dirlink") -> false
- filelib:is_dir("dirlink") -> false
Given the symlink 'filelink' pointing to an existing file, then
- filelib:is_regular("filelink") -> false
- filelib:is_file("filelink") -> false
- filelib:last_modified("filelink") and filelib:filesize("filelink")
return the info of the link and not the file
Given the symlink "broken_symlink" pointing to a non-existing file, then
- filelib:wildcard("broken_symlink",File) -> []
|
|
This fixes a bug introduced in f11aabdc9fec593c31e6c4f3fa25c1707e9c35df where
filelib:eval_read_file_info/2 was made to use file:read_link_info/1 to never
follow symlinks. This fixed wildcard/1 but broke every other function using
eval_read_file_info/2.
Reported-by: Louis-Philippe Gauthier
Reported-by: Danil Zagoskin
|
|
|
|
* nox/io_lib_format-width-too-small:
Properly handle fields too short in io_lib_format
OTP-12041
|
|
The format_status callback (if exists) should always be invoked when
logging errors.
|
|
* maint:
stdlib: Correct documentation of dets:insert/2
|
|
Reported-by: Danil Zagoskin
|
|
Thanks to Alexei Sholik for reporting the bug.
|
|
This is a partial revert of 05c4d31b2c5c5f6ade7d91b55c598fe7fa58e509 in
which a new macro `?STR()` was introduced. This macro shouldn't be used in
scan_number/6 and scan_based_int/6 because the length of the string is
needed when computing column numbers through tok3/8.
|
|
* siri/sync-stop-gen/OTP-11173:
Add synchronous stop function to wx_object
Fix minor bugs in gen_server and gen_fsm documentation
Update gen_event:stop to be synchronous
Add synchronous stop functions to gen_server and gen_fsm
Add synchronous stop function to proc_lib
Add system message 'terminate'
Remove old code from stdlib/test/sys_sp2.erl
|
|
|
|
* saa/add_default_value_for_maps_get/OTP-11951:
stdlib: Fix indentation of maps doc
Add docs and test for maps:get/3
Add default value for maps:get
|
|
This function now uses proc_lib:stop, which guarantees that the
process is terminated before the function return.
|
|
The functions utilize proc_lib:stop, which in turn utilizes
sys:terminate.
|
|
The new function utilizes sys:terminate.
|
|
This is to be used when implementing synchronous stop of generic
behaviours and other 'sys special processes'.
|
|
Values for which the precision or field width were too small in io_lib_format
could trigger an infinite loop or crash in term/5.
Reported-by: Richard Carlsson
|
|
|
|
* nox/fix-eval-map-update/OTP-11922:
Fix evaluation of map updates in the debugger and erl_eval
|
|
* maint:
Correct typo in type specification
Fix typo in erl_tar docs
Update information about compatibility
Correct end of tape marker
Support path names with characters outside the US ASCII range
|
|
* bjorn/stdlib/erl_tar/OTP-11854:
Correct typo in type specification
Fix typo in erl_tar docs
Update information about compatibility
Correct end of tape marker
Support path names with characters outside the US ASCII range
|
|
|
|
* siri/cuddle-with-tests:
Fix regexp in release_handler test so versions are correctly replaced
Update kernel, stdlib and sasl appup tests
Minor update to test_server for finding old releases
|
|
The POSIX standard for tar says that there must be at least
two 512-bytes zero blocks at the end of the tar archive file.
Our implementation would only emit a single 512-byte zero block if the
size of the last file was in the range 18*512 through 19*512-1 (modulo
20*512). GNU tar would correctly unpack such tar archive file, but
would emit a warning:
tar: A lone zero block at 20
|
|
|
|
* maint:
Document that spawn_opt/5 does not support the 'monitor' option
filelib:wildcard() should show broken symlinks
|