| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Although fairly irregular, the presence of a subdirectory in ebin/ while
running rebar3 escriptize would crash the run and generate a dump.
Since ebin subdirectories are generally not supported (adding a path for
an application only adds ebin/ and no subdirectories to the VM's path
set), we just silently ignore the directory altogether.
Fixes #1693
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During the building of escripts, multiple passes are done. Two of them
may end up duplicating content: one that gathers all of the beam files
that will be needed for the app to work, and a second one that goes over
the ebin/ directory of the root application to grab all the stuff in
there, prior to the run.
This allows to grab whatever could be required for runtime without
breaking the rest (or so I think), and sticks them at the front of the
archive, where it needs to sit for things to work fine.
Whenever the ebin/ directory contains a pre-compile .beam file, it gets
fetched both from the first pass described and the latter one. This
results in duplicate entries in the resulting zip files used for the
escript and makes the executable larger than it needs to be.
The patch is a simple 1:1 removal of duplicate values. Since
large pre-populated ebin/ directories are pretty rare, this should not
be too costly for the vast majority of users.
Fixes #1577
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
This will allow to move and modify the generated files
|
|\
| |
| | |
Fix filtering of system libraries in escriptize
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
https://github.com/erlang/rebar3/pull/1249 introduced a mechanism by
which escript dependencies of applications only would be included; this
required adding a filter to skip system libraries in the OTP root
because that tends to break escripts in very nasty ways.
However, the problem came that some libraries are just not in the
escript path but may still be included; for these libraries the path
prefix check failed as they return `{error, bad_name}` from
`code:lib_dir(Dep)` rather than just the path they're in --
specifically, this happens with top level apps.
The issue was reported in https://github.com/erlang/rebar3/issues/1294
and the current patch fixes it by accepting a `bad_name` dep as valid,
since it is obviously not in the root path.
|
|/
|
|
|
| |
When rebar.config contains a `escript_main_app` option, but the
specified app doesn't exist in the build directory, print an error.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this patch, the escriptize command flat out selected all
declared dependencies.
This patch instead looks at the app files and only includes the
dependencies of the top level app and the extra ones, avoiding to
package more apps than required.
This required a version bump on cth_readable as it mistakenly included
'syntax_lib' instead of 'syntax_tools' as a dependency.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- 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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|