| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is done through 3 main change groups:
- replacing `~s` by `~ts` in format strings, so that strings that
contain unicode are properly printed rather than crashing
- adding the `unicode` argument to all function of the `re` module to
ensure transformations on strings containing unicode data are valid
instead of crashing (see issue #1302)
- replacing `ec_cnv:to_binary/1` and `ec_cnv:to_list/1` with matching
functions in `rebar_utils`.
The last point has been done, rather than modifying and updating erlware
commons, because binary and list conversions can be a contentious
subject. For example, if what is being handled is actually bytes from a
given binary stream, then forcing a byte-oriented interpretation of the
data can corrupt it. As such, it does not appear safe to modify erlware
commons' conversion functions since it may not be safe for all its
users.
Instead, rebar3 reimplements a subset of them (only converting
atoms and chardata, ignoring numbers) with the explicit purpose of
handling unicode string data.
Tests were left as unchanged as possible. This may impact the ability to
run rebar3's own suites in a unicode path, but respects a principle of
least change for such a large patch.
|
|
|
|
|
|
|
|
|
|
| |
modules
This can be reproduced by running xref analysis against a rebar3
plugin project which doesn't list rebar3 as an explicit dependency
-- calls to certain bundled modules ('rebar_state', 'rebar_api',
'ec_cnv', ...) will result in a failed pattern match as these modules
appear to have had their abstract code stripped.
|
| |
|
|
|
|
|
|
|
|
|
| |
When a given behaviour module does not exist, rebar3 brutally crashes.
This patch makes it so instead, there is a warning output menitoning the
missing behaviour, and this one is omitted from the unused function
calls check. This means that unused calls will instead be shown for the
module implementing a non-existing behaviour, as if no behaviour were
declared in the first place.
|
|
|
|
|
|
|
|
|
|
|
| |
If xref analysis is being run by a dependency during its compilation
phase, the xref provider will try to add that deps' parents to the check
job while the ebin/ directories for them do not exist. This causes a
crash.
This patch makes it so directories are only added if they are existing,
preventing failure on any compile hook for dependencies and allowing
successful compilation as a best effort.
|
|
|
|
| |
Some tricky changes in there but should be okay
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- Crashes in providers lib when no providers in a namespace are bare
- Making sure bareness matches semantics; i.e. a bare provider is
visible, a non-bare provider is hidden.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also expose it in rebar_api
|
| |
|
|
|
|
|
|
|
| |
Add xref support for multi-app projects. Instead of only adding the
top-level ebin directory to the xref server use
rebar_state:project_apps/1 to enumerate the applications for the
project and add the ebin directory for each one.
|
|
* Add a provider for the xref tool for running cross reference
analysis on a project. Most of the code has been ported directly
from the rebar2 rebar_xref module with some modification and cleanup
to support testing.
* Port over the eunit test suite from rebar2, but convert it to
common_test. The testing is the same, but now the
erlang term output is examined to determine if the test run is successful
instead of scanning the console output for the expected strings.
|