summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | Unicode support in all the placesFred Hebert2017-08-0647-413/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Don't crash when determining the source of undefined functions in stripped ↵Guilherme Andrade2017-08-051-4/+13
|/ | | | | | | | | | 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.
* Fix cleanup_code_path for xref compile hookMikhail Kalashnikov2017-07-261-1/+2
|
* [#149002995] fix flipped variablesSam Sawan2017-07-171-5/+6
|
* [#149002995] stop eating edoc path configSam Sawan2017-07-171-6/+5
| | | | | | be a little smarter when generating edocs; loof for some sort of doc path and then replace w/e was there with the updated doc paths
* Back to git-based versioningFred Hebert2017-07-141-1/+1
|
* Bump to 3.4.2Fred Hebert2017-07-141-1/+1
|
* add compile_only option to ct providerTristan Sloughter2017-07-131-2/+12
|
* recompile only if new option effects code generationTristan Sloughter2017-07-131-2/+17
|
* Bare compile: support multiple paths wildcards.Gleb Peregud2017-06-201-3/+5
| | | | | | | | | Similarly to PATH env variable, this allows to pass paths to bare compiler which do not fit nicely into a single wildcard structure. Colon (":") is used as separator. This provides more flexibility when rebar is run in offline/hermetic environment, e.g. #958 and #1281.
* Application type of none was not working.Anthony Molinaro2017-06-151-1/+4
| | | | | | | | | | | | I noticed this when trying to include entop in a release. Entop uses cecho which takes over the terminal, so you do not want it loaded or started. According to http://erlang.org/doc/man/rel.html, when you specify a Type of none it should not load or start, but the code for it's modules should be loaded. This patch ensures the code is not loaded or started, but doesn't do anything with the code paths. At the very least this allows me to start a shell in the case where I have an application of type none, and the application is neither loaded nor started.
* Prevent xref crashes with undef behavioursFred Hebert2017-06-131-2/+9
| | | | | | | | | 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.
* the new added PATH value should be in the first position, in case there be ↵getong2017-06-131-1/+1
| | | | other same name cmd
* Fix xref compile hook on depsFred Hebert2017-06-071-2/+5
| | | | | | | | | | | 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.
* Merge pull request #1564 from tsloughter/reset_profile_hooksTristan Sloughter2017-06-021-9/+24
|\ | | | | reset hooks under profiles for application opts
| * reset hooks under profiles for application optsTristan Sloughter2017-06-021-9/+24
| |
* | Avoid reversing relx overlays.Anthony Molinaro2017-06-011-1/+5
|/ | | | | This mostly moves a lists:reverse/1 which ensures that profile overlays are run first but keeps the order of overlays otherwise.
* Back to git-based versioningFred Hebert2017-05-241-1/+1
|
* Bump to 3.4.1Fred Hebert2017-05-241-1/+1
| | | | | | Includes Relx fixes Signed-off-by: Fred Hebert <mononcqc@ferd.ca>
* Back to git-based versioningFred Hebert2017-05-221-1/+1
|
* Bump to 3.4.0Fred Hebert2017-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Patches: - Try to start epmd when distribution fails - Allow non-default profile deps upgrade - Switch default license in templates to Apache 2.0, and hook it up in the .app file - Fix git SHA comparisons for dep update - Let relx know about rebar-specified erl_opts - Use rm_rf instead of ec_file:delete, fixing some deps-related issues on Windows - Handle internal CT failures - Fix profile merging of erl_first_files options - Fix CT output in skipped test cases and failing end of function hooks - Officially drop R15 support, since its SSL libs can no longer talk to hex.pm - REBAR_COLOR supports all ec_cmd_log intensity options, allowing the none value to disable all colors without dropping termcap support - Bump relx to 3.22.4 The one new feature supported here is for the interactive shell: - Support commands in the shell such as r3:Command(), r3:Command("--args=as a string"), or r3:Command(Namespace, "--args=as a string"), instead of just r3:do(Command).
* Try to start epmd when distribution failsFred Hebert2017-05-211-6/+19
| | | | | We do it by calling os:cmd on a named shell so that the automated daemon rules work for rebar3 as well.
* Merge pull request #1540 from ferd/allow-profile-deps-upgradeFred Hebert2017-05-191-7/+39
|\ | | | | Allow profile deps upgrade
| * Cull default dep names in non-default upgradeFred Hebert2017-05-191-10/+28
| | | | | | | | | | | | Prevents showing false upgrade messages when upgrading in a non-default profile. Also shows an info message explaining default deps don't get updated in a non-default upgrade.
| * Allow to upgrade profile-specific dependenciesFred Hebert2017-05-071-7/+21
| | | | | | | | | | | | Only happens when calling `rebar3 as <profiles> upgrade <dep>`, with the caveat that all profile deps get upgraded and lined up with the rebar config.
* | Merge pull request #1513 from alinpopa/masterTristan Sloughter2017-05-191-9/+7
|\ \ | | | | | | Fix git SHAs comparison for update.
| * | Fix git SHAs comparison for update.Alin Popa2017-03-121-9/+7
| | | | | | | | | | | | | | | | | | | | | 86e883b8d8d1d16487e245fff02eba8c83da2cdd always returns the full length SHA, therefore when using a dependency having the short SHA, it'll always consider that the SHAs are different, hence it'll alway return true for .
* | | Merge pull request #1520 from lrascao/feature/relx_warnings_as_errorsTristan Sloughter2017-05-191-2/+4
|\ \ \ | | | | | | | | Let relx know about application erl opts
| * | | Let relx know about application erl optsLuis Rascao2017-05-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | This is so that some of them can be enforced (such as warnings_as_errors) on relx's task like generating a release or a release upgrade.
* | | | Use rm_rf instead of ec_file:delete.Benedikt Reinartz2017-05-171-1/+1
|/ / / | | | | | | | | | | | | | | | In contrast to `ec_file:delete`, `rebar_file_utils:rm_rf` will also delete write-protected files on Windows which is needed for git object files. Fixes #1483.
* | | Handle internal CT failuresFred Hebert2017-05-111-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is based on issue #1517 where out of nowhere, CT has returned a user's error code directly. This in turn caused a crashdump in rebar3 itself. This patch handles the unexpected cases by: a) not trying to format them b) converting them to an error whenever they happen The execution flow is still interrupted, but we should fail with a clearer error than a crashdump.
* | | Issue #1416: Merge erl_files_first separately and avoid sorting.Thomas O'Dowd2017-05-111-0/+4
| |/ |/| | | | | | | | | The order of the files listed in "erl_files_first" option is important and should not be sorted. By handling the merge similarly to mib_files_first, the sort order is preserved.
* | Drop R15 supportFred Hebert2017-05-031-3/+0
| | | | | | | | | | | | It can't even fetch packages from Hex anymore because of old SSL/TLS libraries, and so it can't bootstrap anymore either. Plus R20 comes out soon, and 5 major versions is quite enough.
* | REBAR_COLOR supports all ec_cmd_log intensity optionsAnthony Molinaro2017-04-261-0/+2
| |
* | Abuse error_handler to get free metacalls in r3Fred Hebert2017-04-242-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses the very risky '$handle_undefined_function'/2 export from the r3 and rebar_agent modules to allow meta-calls that can support plugins and all other rebar3 extensions. This is nasty but very tempting. Currently we only support: - r3:do(Command) - r3:do(Namespace, Command) There is currently no way to pass arguments to the function such that we can, for example, run cover analysis or tests on a subset of suites. With the new abuse of '$handle_undefined_function'/2, we can detect the unused commands (since they are not exported) and re-route them: - r3:Command() - r3:Command("--args=as a string") - r3:Command(Namespace, "--args=as a string") Of course, in doing so, we make it impossible to use the 'do' provider (as in 'rebar3 do ct -c, cover') since the 'do' function is already required for things to work. Since the previous function had very strict guards, we can, without conflict, add manual overrides that simulate the meta-calls fine. Sample run: https://gist.github.com/ferd/2c06d59c7083c146d25e4ee301de0073
* | Fix typo, occured -> occurredLuis Rascao2017-04-122-2/+2
| |
* | Typo: seperate -> separateMichiel Beijen2017-03-274-39/+39
| |
* | Back to git-based versioningFred Hebert2017-03-231-1/+1
| |
* | Bump to 3.3.6Fred Hebert2017-03-231-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - [OSX tests added to CI](https://github.com/erlang/rebar3/pull/1471), joining linux and windows 10 - [upgrade relx to 3.22.3](https://github.com/erlang/rebar3/pull/1518), [fixing multiple issues](https://github.com/erlware/relx/releases/tag/v3.22.3) - [Fixing eunit errors in 19.3 when `init_per_*` isn't paired with `end_per_*`](https://github.com/erlang/rebar3/pull/1516) - [Allow single test spec in ct_opts](https://github.com/erlang/rebar3/pull/1506) - [Properly warn when missing inets at runtime](https://github.com/erlang/rebar3/pull/1505) - [rebar_utils:escape_chars handles quotes in paths](https://github.com/erlang/rebar3/pull/1504) - [Fix typo in help text for upgrade command](https://github.com/erlang/rebar3/pull/1503) - [change package version warnings to debug level](https://github.com/erlang/rebar3/pull/1502) - [Path-type sensitive .cmd creation for escripts](https://github.com/erlang/rebar3/pull/1500) - [Windows escripts get cmd autogenerated](https://github.com/erlang/rebar3/pull/1494) - [REBAR_CONFIG impacts config file for project root only](https://github.com/erlang/rebar3/pull/1497) - [Fix wildcard usage in rebar3 clean](https://github.com/erlang/rebar3/pull/1498) - [Bump cth_readable to 1.2.4](https://github.com/erlang/rebar3/pull/1496) (fixing some erroneous reports when suites get skipped) - [Add respect for src_dirs option in app_discover and app_info](https://github.com/erlang/rebar3/pull/1486) - [Add support for global plugin-defined templates](https://github.com/erlang/rebar3/pull/1473) - [catch badarg exception from eunit in `rebar_prv_eunit`](https://github.com/erlang/rebar3/pull/1472)
* fix "apps" nameVlad Dumitrescu2017-03-061-1/+1
|
* minor fix: name of internal functionVlad Dumitrescu2017-03-061-3/+3
|
* Allow single test spec in ct_optsSiri Hansen2017-03-061-12/+15
| | | | | | The option {spec,Specs} is allowed in ct_opts, but rebar_prv_common_test:test_dirs did not take into account that Specs could also be a string only, i.e. not a list of strings.
* Properly warn on missing rebar3 deps: add inetsCarlo Carraro2017-03-051-1/+1
|
* rebar_utils:escape_chars handles quotesVlad Dumitrescu2017-03-041-1/+1
| | | | | rebar_file_utils:cp_r uses rebar_utils:escape_chars to ensure that the file names are safe to use, but it doesn't escape double and single quotes. If the file name includes those characters, they disappear when the shell processes them and we get "file not found" errors. The main culprit here is eunit, that creates reports whose names are `TEST-file_"myfile.app".xml`, and I wish it didn't but I think escape_chars should still do its job all the way.
* Fix typo in help text for upgrade commandJuan Facorro2017-03-031-1/+1
|
* change package version warning to debugTristan Sloughter2017-03-021-2/+2
|
* Path-type sensitive .cmd creationFred Hebert2017-02-281-1/+4
|
* Merge pull request #1494 from ferd/escript-generate-cmd-win32alisdair sullivan2017-02-271-3/+17
|\ | | | | Windows escripts get cmd autogenerated
| * WIP windows escripts get cmd autogeneratedFred Hebert2017-02-241-3/+17
| |
* | Merge pull request #1499 from ferd/avoid-clean-wildcard-appsFred Hebert2017-02-261-3/+3
|\ \ | | | | | | More fixes for bad calls to find_apps