summaryrefslogtreecommitdiff
path: root/src/rebar_core.erl
Commit message (Collapse)AuthorAgeFilesLines
* Work around OTP-21 deprecation of get_stacktrace()Fred Hebert2018-05-031-2/+1
| | | | Based off a macro by @okeuday at https://github.com/erlang/otp/pull/1783
* Prevent hard crash on duplicate plugin pathsFred Hebert2017-10-201-0/+1
| | | | | | | | | | | | | | | When a global plugin is used both locally and within the project, there are cases when the rebar3 program will hard crash (killed in do_boot). This has been traced to plugin-handling in compilation, where the same code path may be purged twice in a row without further reloading for the compile operation. This of course yields the result where the code handling on the VM kills all processes holding references to the module in memory, in this case the rebar3 process itself. By deduplicating the paths first, we ensure at most one purge before reloading plugins and paths, and this prevents a hard crash.
* Unicode support in all the placesFred Hebert2017-08-061-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Type specifications and edocs improvementsFred Hebert2016-11-271-2/+32
| | | | | | Includes improvments and function documentation for all modules (in alphabetical order) up to rebar_core, and may have included more in other modules as I saw fit to dig and understand more of the internals.
* add DEBUG statement of the command sequence that'll be runTristan Sloughter2015-09-191-0/+1
|
* fix dialyzer warnings, except 'no local return' warningsTristan Sloughter2015-08-081-2/+2
|
* Fix reporting of error:undef exceptionsFred Hebert2015-07-091-3/+9
| | | | | | | | | The wide-cast catching of undef errors would make it so any provider calling an undefined function would be reported as a missing 'do' for the provider. This patch inspects the stacktrace to know if `Provider:do/1` is indeed the missing callback, and reports the rest properly.
* Add error message for bad provider hook, fixes #521Tristan Sloughter2015-06-191-1/+3
|
* print nice error message if do is undef for providerTristan Sloughter2015-06-161-2/+13
|
* store plugin providers in app_info's state for depsTristan Sloughter2015-05-281-0/+1
|
* install dep plugins & run provider hooks the same as shell hooksTristan Sloughter2015-04-041-1/+1
|
* handle additional errors returned from `getopt:parse/2`alisdair sullivan2015-03-231-1/+5
|
* support args on tasks passed to 'as'Tristan Sloughter2015-03-231-0/+2
|
* Fix #267, refactor as/do/namespace interactionsFred Hebert2015-03-131-51/+38
| | | | | | | | | | Breaking up initial call to parse from the ones deep inside the provider parsing to do smarter namespace detection, added 'as' the ability to look into these also, and cleaned up the code a whole lot that would depend on implicit assumptions. A side-effect is that 'do' is now valid for all namespaces, although it can be overriden.
* update erlydtl compiler to output to _build, add simple testTristan Sloughter2015-03-071-1/+1
|
* Fix namespace regressionsFred Hebert2015-03-071-4/+34
| | | | | | | This adds some more convolution to command parsing, unfortunately, but makes some cases clearer (`rebar3 as as as as` is no longer valid). It unfortunately disallows using $REBAR_PROFILE along with `as` in a rebar command.
* fix code path update for depsTristan Sloughter2015-03-061-37/+1
|
* apply profiles and overrides for an app's opts to the base optsTristan Sloughter2015-03-051-4/+5
|
* fix for profiles_remain_applied_with_config_presentTristan Sloughter2015-03-041-5/+3
|
* support for provider_hooks in configTristan Sloughter2015-01-311-11/+12
|
* replace single profile atom in providers with list of profilesTristan Sloughter2015-01-111-2/+2
|
* Tests and fixes for namespacesFred Hebert2014-12-211-2/+7
|
* Dynamic 'do' provider for namespacesFred Hebert2014-12-211-13/+31
| | | | | | | | | | | Using a namespace such as 'rebar3 lfe new' will look for the 'new' command in 'lfe' namespace without the need for a 'do' provider to be registered in that namespace. Manually checked that 'rebar3 as <profile> <namespace> command' works, as well with 'default' and 'do'. Test suite still needed.
* Add support for namespace-based metacommandsFred Hebert2014-12-211-3/+12
| | | | And more general namespace support
* don't include all */ebin dirs in code pathTristan Sloughter2014-12-161-1/+8
|
* add 'as' higher order taskTristan Sloughter2014-12-161-5/+7
|
* rewrite profilesTristan Sloughter2014-12-161-11/+9
|
* move dir functions from utils to new module rebar_dirTristan Sloughter2014-12-011-4/+4
|
* fixes for dialyzer findingsTristan Sloughter2014-11-301-1/+1
|
* add use of REBAR_PROFILE os var to set default profileTristan Sloughter2014-11-301-4/+3
|
* wip: profilesTristan Sloughter2014-11-291-13/+16
|
* prepend base_dir when expanding code pathTristan Sloughter2014-11-081-2/+3
|
* return error on not found provider for commandTristan Sloughter2014-10-221-12/+16
|
* formattingTristan Sloughter2014-10-111-2/+1
|
* support compile jobs optionTristan Sloughter2014-10-101-6/+11
|
* split options up by taskTristan Sloughter2014-10-101-2/+11
|
* move providers to separate appTristan Sloughter2014-10-031-4/+4
|
* return error messages from providersTristan Sloughter2014-09-271-6/+14
|
* slowly widdling away at dialyzer errorsTristan Sloughter2014-09-201-2/+0
|
* install plugins to plugins/Tristan Sloughter2014-09-201-8/+12
|
* add plugin templateTristan Sloughter2014-09-201-1/+2
|
* add do taskTristan Sloughter2014-09-181-4/+4
|
* improved dep handling and add package list taskTristan Sloughter2014-08-241-1/+1
|
* simplify dep download and buildingTristan Sloughter2014-08-231-1/+1
|
* refactoring and remove unused providers for nowTristan Sloughter2014-08-231-1/+2
|
* only build unbuilt depsTristan Sloughter2014-08-181-4/+4
|
* start of moving to splitting state from config parsingTristan Sloughter2014-08-171-41/+12
|
* add rebar update providerTristan Sloughter2014-08-161-2/+2
|
* move back to single command with arguments for comamnd after itTristan Sloughter2014-08-161-3/+3
|
* large refactoringTristan Sloughter2014-08-161-594/+35
| | | | | | | | Removed separate compilers Resolves apps to build Finds avail deps before pulling/building Includes relx Simplifies build commands