Age | Commit message (Collapse) | Author |
|
* ks/erl_lint:
erl_lint_SUITE: adjust failing test case
Allow recursive types and check for undefined types
OTP-8421: ks/erl_lint
|
|
|
|
Errors are now reported slightly differently, so we'll
need to adjust the test case.
|
|
Contains four kinds of changes:
* Allows recursive types and type definitions to be in any order.
* Because the checking is not performed from top to bottom, there
is a separate pass which checks for undefined module-local types.
* Behaviour callbacks which allow specs in them.
* Clean up the code as suggested by tidier.
|
|
configuration parameter shell_prompt_func can be used for
customizing the Erlang shell prompt.
|
|
|
|
|
|
|
|
Now, when we have only the constant definition of a macro (without
arguments), we always use it. In all other cases, we try to find the
exact matching definition. We throw an error if we don't find it.
|
|
This feature simplifies the definition of macros by avoiding to have a
different name for each version (with different arities) of the same
macros. New rules:
- can have multiple definitions of the same macro with different arities
- cannot overload macro with the same arity
- the overloading of predefined macros (?MODULE, ?LINE, ...) is forbidden
- the directive '-undef' removes all definitions of a macro
|
|
The dict St#epp.uses that helps to find circular macros was not correctly
updated.
|
|
* bg/hipe-fixes:
compiler: make ignore_native_errors also handle internal hipe errors
re tests: disable native-code compilation for huge modules
Teach the compiler the no_native option
|
|
* bg/cleanup-tests:
file_SUITE: eliminate a warning for an unused variable
kernel tests: modernize guard tests
unicode_SUITE: replace deprecated concat_binary/1 with list_to_binary/1
stdlib tests: modernize guard tests
Test suites: fix creation of Emakefiles
|
|
Two generated modules contains too big functions for the
native-code compiler to handle (even the BEAM compiler
struggles when compiling them).
|
|
|
|
* ta/ensure_dir_eexist:
filelib_SUITE: strenghten tests of filelib:ensure_dir/1
Don't return a false {error,eexist} in filelib:ensure_dir/1
OTP-8389 Because of a race condition, using filelib:ensure_dir/1 from
multiple processes to create the same path or parts of the same
directory structure, filelib:ensure_dir/1 could return a
meaningless {error,eexist}. That race condition has been
eliminated, and {error,eexist} will now be returned only if there
exists a regular file, device file, or some other non-directory
file with the same name. (Thanks to Tuncer Ayaz.)
|
|
|
|
Don't change any guard tests in the id_transform_SUITE
module, because it intentionally use the old guard tests
to test that id_transform can handle them.
|
|
The Emakefiles in some test suite directories are only appended
to, never created from scratch, which can cause problems
especially when swithching branches in a git repository.
|
|
* rb/stdlib_re_unicode_fixes:
Fix lost unicode option in re:compile()
Refactor out repeated block in re module
Fix re:replace/4 to handle unicode charlist Replacement argument
Fix re:replace/4 to handle unicode charlist RE argument
Fix re:replace/4 to handle binary unicode output when nothing replaced
OTP-8394 A number of bugs concerning re and unicode are corrected:
- re:compile no longer loses unicode option, which also fixes bug
in re:split.
- re:replace now handles unicode charlist replacement argument
- re:replace now handles unicode RE charlist argument correctly
- re:replace now handles binary unicode output correctly when
nothing is replaced.
Most code, testcases and error isolation done by Rory Byrne.
|
|
Noticed-by: Rory Byrne
|
|
|
|
A bug in re:replace/4 causes a badarg exception to be thrown when the
Replacement argument is a charlist containing non-ascii codepoints.
The problem is that the code incorrectly assumes that the Replacement
text is iodata() and calls iolist_to_binary/1 on it. This patch fixes
it to obey the 'unicode' option and handle charlist() Replacement
arguments correctly.
|
|
The real problem is in the re:run/3 BIF.
Noticed-by: Rory Byrne
Tests-by: Rory Byrne
|
|
A bug with re:replace/4 causes an exception when: (a) it's given a
unicode charlist as input; (b) it's set to {return,binary}; and
(c) it finds nothing to replace.
The problem is: when re:replace/4 does not find anything to replace
in its Subject input, it calls iolist_to_binary on this data. This
fails if the original input is a charlist with non-ascii codepoints.
|
|
For example, if an archive (app-vsn.ez) just contains an
app-vsn/ebin/mod.beam file, the file info for the app-vsn and
app-vsn/ebin directories are faked using the file info from the
archive file as origin. The virtual direcories can also be
listed. For short, the top directories are virtual if they does
not exist.
|
|
deletion of files when compiled with debug option. Changed LC_CTYPE for sunos of certain versions.
|
|
environment after a number of bugs are fixed and some features
are added in the documentation build process.
- The arity calculation is updated.
- The module prefix used in the function names for bif's are
removed in the generated links so the links will look like
http://www.erlang.org/doc/man/erlang.html#append_element-2
instead of
http://www.erlang.org/doc/man/erlang.html#erlang:append_element-2
- Enhanced the menu positioning in the html documentation when a
new page is loaded.
- A number of corrections in the generation of man pages (thanks
to Sergei Golovan)
- Moved some man pages to more apropriate sections, pages in
section 4 moved to 5 and pages in 6 moved to 7.
- The legal notice is taken from the xml book file so OTP's
build process can be used for non OTP applications.
|
|
Test that filelib:ensure_dir/1 returns {error,eexist} if
there already exists a regular file with the name as
a directory that should be created.
While at it, slightly strenghten the otp_5960/1 test case
by repeating each call to filelib:ensure_dir/1.
|
|
* uw/shell-tab-completion:
Shell tab completion now works for quoted module and function names
OTP-8383 Shell tab completion now works for quoted module and function
names. (Thanks to Ulf Wiger.)
|
|
This is about the non-atomicity of filelib:ensure_dir/1.
When using filelib:ensure_dir/1 from multiple processes to create
the same path or parts of the same directory structure (which happens
with rebar's worker processes) it happens quite a lot that between
a file:read_file_info/1 and file:make_dir/1 one of the other procs
has already created the directory we want to create.
mkdir(1) says one of the following for -p depending on which Unix
like system you're on:
"no error if existing"
"no error will be reported if a directory given as an operand already
exists"
I've seen more than one Erlang project where the return value of
ensure_dir/1 is ignored completely.
To eliminate the race condition, call file:make_dir/1 without first
testing whether the directory exists. If it succeeds everything
is fine. Otherwise, if the error code is {error,eexists}, check
whether the directory exists. If it does, everything is fine;
if not, return {error,eexist} (which indicates that there
exists a regular file with the same name, or (more unlikely)
that another process removed the directory after the call
to file:make_dir/1).
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
fragments was created. This will mainly benefit NIFs that return
large compound terms.
|
|
* bg/otp_build-improvements:
Fix spelling, remove obsolete command
Support updating preloaded files in a git repository
Support updating the primary bootstrap in a git repository
Determine which VCS is being used
stdlib makefile: Add explicit rule
OTP-8369: bg/otp_build-improvements
|
|
When building a primary bootstrap in a git repository, the file
bootstrap/lib/stdlib/egen/erl_parse.erl would not get updated.
With clearmake, this file is updated.
Adding an explicit rule for the file make it it work with GNU Make.
While at it, remove an out-commented rule.
|
|
While quoted atoms in module and function names are not common,
they are allowed, and sometimes quite useful. In OTP, they are
commonplace in ORBER, and can also be found in XMERL. Tab completion
needs to recognize quoted atoms and act accordingly. This patch
includes changes in edlin:over_word/1. It should be noted that these
changes also affect the 'kill word', 'forward word' and 'backward word'
commands in the line editor. The author thinks that the changes are
for the better. There are also minor changes in edlin_expand.erl -
mainly in regard to the conversion between atoms and strings.
Another change is that the list of matches is now sorted, partly
to simplify testing, but also because it seems sensible to present
the matches that way. A test suite, edlin_expand_SUITE, has been
added to the stdlib test suites.
(amended 2009-12-18 to actually include the modified files too
and again to rename the capitalized test modules for portability.)
|
|
|
|
* as/c_nc-fix:
c_SUITE: Use new style guard tests
Fix c:nc to use outdir or cwd to find compiled object file
OTP-8337 c:nc/{1,2} used to assume that the beam file was created in the
same directory as the source code and failed to load the code if
it was not. Corrected to look for the beam file in the current
directory or in the directory specified by the {outdir,Dir}
option. (Thanks to Alex Suraci.)
|
|
|
|
Before this patch, c:nc would naively assume the object file was created
in the same location as the .erl file. This is often false, for example
when an outdir is specified (often the case in make:all([netload])) or
calling with c:nc("foo/bar") (because compile:file places bar.beam in
the cwd, not foo/).
[ Squashed in minor style changes. /bg ]
|
|
* sv/sys_get_status:
Teach sys:get_status/1,2 to call Mod:format_status/2
gen_fsm: Fix format_status/2 to handle Pids
OTP-8324 The ability for the gen_server and gen_fsm callback modules to
format their own state for display under the sys:get_status/1,2
calls has been restored and documented. (Thanks to Steve
Vinoski.)
|
|
In the transition from SGML to XML (several releases ago),
bugs were introduced in the documentation, for instance
"\n" replaced by newlines. Correct those bugs.
Also correct double backslashes. They seem to have been introduced very
early in the development of OTP. According to Lars they "solved" a bug
in the generation of HTML &c. Now that standard tools are used instead
of docbuilder, the bug has become visible.
|
|
Restore the ability for gen_server and gen_fsm callback
modules to format their own state for display under the
sys:get_status/1,2 calls.
This ability is extremely useful for new behavior modules
based on gen_server or gen_fsm, so that they can display
their status in a more meaningful way than just dumping
the state record. It is also generally useful for applications
wanting to display their gen_server or gen_fsm callback module
state in something other than the default manner.
Also document the previously undocumented the
gen_server:format_status/2 and gen_fsm:format_status/2 optional
callback functions that, if exported by the callback module, are
invoked when sys:get_status/1,2 are called.
Add unit tests to ensure that format_status/2 functions exported
from a gen_fsm callback module and a gen_server callback module
are called when sys:get_status/1,2 are called.
|
|
gen_fsm:format_status/2 currently crashes if Name in the process
state is a Pid.
Handle Name in the same way as in gen_server:format_status/2
to eliminate the crash.
|
|
* refs/remotes/origin/dgud/array_tests:
Added more tests for array:reset/2.
|
|
Code coverage was bad for my new optimizations.
|
|
|
|
|