summaryrefslogtreecommitdiff
path: root/src/rebar_prv_escriptize.erl
Commit message (Collapse)AuthorAgeFilesLines
* Fix broken windows buildFred Hebert2018-04-201-1/+1
| | | | Let's bundle this with another PR
* Fix various Dialyzer warningsFred Hebert2018-04-201-3/+1
| | | | | | | | | Some still remain from erl_type calls from Dialyzer, but most of them are handled. Decided to just ignore rebar_alias since playing with the type specs of abstract code format is just a nightmare and hard to do cross-versions I guess.
* Fix escriptize failure when ebin/ has subdirsFred Hebert2017-12-141-1/+2
| | | | | | | | | | | 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
* Remove duplicate ebins from escriptsFred Hebert2017-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* Unicode support in all the placesFred Hebert2017-08-061-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Path-type sensitive .cmd creationFred Hebert2017-02-281-1/+4
|
* WIP windows escripts get cmd autogeneratedFred Hebert2017-02-241-3/+17
|
* Make the escriptize provider hookableFred Hebert2016-08-131-2/+7
| | | | This will allow to move and modify the generated files
* Merge pull request #1298 from ferd/escript-filter-paths-fixFred Hebert2016-08-101-1/+3
|\ | | | | Fix filtering of system libraries in escriptize
| * Fix filtering of system libraries in escriptizeFred Hebert2016-08-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Handle `escriptize` when the specified app is missingNathaniel Waisbrot2016-08-041-2/+6
|/ | | | | When rebar.config contains a `escript_main_app` option, but the specified app doesn't exist in the build directory, print an error.
* Escriptize based on configured apps onlyFred Hebert2016-06-261-5/+19
| | | | | | | | | | | | 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.
* escript should append the ebin dirs to the code path not prependTristan Sloughter2015-09-141-1/+1
|
* improve escriptize providerTristan Sloughter2015-06-021-3/+3
|
* keep all_deps list in state created for building depsTristan Sloughter2015-05-301-1/+2
|
* fix bareness issuesFred Hebert2015-05-311-1/+1
| | | | | | - 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.
* improve erlydtl source and out dir discoveryTristan Sloughter2015-04-191-25/+37
|
* restructure escriptize provider so the error is properly returnedTristan Sloughter2015-04-171-17/+17
|
* Fixes #306: help text consistencyFred Hebert2015-04-021-1/+1
|
* Fix dialyzer warningsJames Fish2015-03-181-1/+1
|
* update erlydtl compiler to output to _build, add simple testTristan Sloughter2015-03-071-0/+1
|
* update all examples in providers to use rebar3Tristan Sloughter2015-03-071-1/+1
|
* Add escriptize provider and a minimal testPierre Fenoll2015-03-061-0/+221