Jon
391f3b3bec
Let DEBUG="" and QUIET="" mean disable the option
Setting DEBUG/QUIET environment variable to the empty string now acts
the same as unsetting it. Unsetting is not always easy/possible.
9 vuotta sitten
Péter Gömöri
cc2e5f7876
Handle control sequences in formatted errors
Formatted errors can accidentally contain substrings which are control
sequences for io:format/2. This is a naive attempt to handle such cases.
One example is running xref on the following module
(assuming module m does not exist)
```
-module(handle_error).
-export([f/0]).
f() -> m:'bobby~stables'().
```
```
$ rebar3 xref
===> Verifying dependencies...
===> Compiling myapp
===> Running cross reference analysis...
escript: exception error: bad argument
in function io:format/3
called as io:format(<0.23.0>,
"\e[0;31m===> \e[1mWarning: handle_error:f/0 is unused export (Xref)\nWarning: handle_error:f/0 calls undefined function m:bobby~stables/0 (Xref)\n\n\e[0m\e[0m",
[])
in call from rebar3:handle_error/1 (/Users/gomoripeti/git/rebar3/_build/default/lib/rebar/src/rebar3.erl, line 279)
```
9 vuotta sitten
Heinz N. Gies
5945251fc0
Make sure not to dump in api mode
9 vuotta sitten
Heinz N. Gies
bc9746881f
Write rebar3.crashdump on errors
9 vuotta sitten
Francisco Rojas
243e94391a
Read env var REBAR_CACHE_DIR on rebar3 only once
Instead of reading every time that rebar_dir:global_cache_dir/1 is
called
9 vuotta sitten
alisdair sullivan
d75fa758d8
Revert "define the 'EUNIT' macro in the test profile"
This reverts commit 4c32c52b55
.
9 vuotta sitten
alisdair sullivan
4c32c52b55
define the 'EUNIT' macro in the test profile
9 vuotta sitten
Tristan Sloughter
8cea177377
add project_providers after initing default providers but allow overrides
9 vuotta sitten
Tristan Sloughter
53866e148c
give new opt project_plugins providers precedence over default providers
9 vuotta sitten
Serge Aleynikov
9cd7880069
Remove --state argument option per Tristan's comment
9 vuotta sitten
Serge Aleynikov
cf03345486
Add a state display provider
The provider is used for debugging to help displaying current rebar's state.
Usage:
rebar3 state
9 vuotta sitten
Tristan Sloughter
270066c296
check top level config for minimum or blacklisted otps at start
9 vuotta sitten
Tristan Sloughter
414dd344e9
install project app plugins after discovering them not before
9 vuotta sitten
Tristan Sloughter
c4c7ca4244
support temporary cdn change with HEX_CDN os var
9 vuotta sitten
alisdair sullivan
3fc51b912c
move test profile bootstrap into core
9 vuotta sitten
Tristan Sloughter
0839efda57
fix dialyzer warnings
9 vuotta sitten
Fred Hebert
6a4b5428b3
Properly warn on missing rebar3 deps
The current code could not cope with missing dependencies, as they would
prevent the rebar3 app from loading or properly building its config,
which prevented the log state from being carried along with default
values. This in turn would turn in an escript-level error that
obfuscated the true source of failure.
This patch bypasses the whole state setup and logging macros and logs an
error message manually when a dependency such as crypto or SSL is
missing from the Erlang install.
9 vuotta sitten
Tristan Sloughter
da3d8a69cc
add providers 'local upgrade' and 'local install' for installing/upgrading
9 vuotta sitten
Tristan Sloughter
8c7bed454d
add current_app attribute for setting before calling hooks
9 vuotta sitten
Fred Hebert
c57177fde8
Revert "Revert "only load packages when needed""
9 vuotta sitten
Fred Hebert
3f83b3a382
Revert "only load packages when needed"
9 vuotta sitten
Tristan Sloughter
8732b7d5bd
only load packages when needed
9 vuotta sitten
Tristan Sloughter
cf5390f018
replace use of dict of packages and registry with single ets table
9 vuotta sitten
Tristan Sloughter
ecf6ad5524
fix no_return warnings
9 vuotta sitten
Tristan Sloughter
0097a841a3
handle global config file that can't be read
9 vuotta sitten
CarlosEDP
38cc32c40a
Added rebar profile to httpc initialization and calls.
10 vuotta sitten
CarlosEDP
8de84f1af0
Added support for proxy on rebar3 based on environment variables.
10 vuotta sitten
Tristan Sloughter
1c66f0eb9f
setup hex httpc profile and http opts. needed also for proxy
10 vuotta sitten
Tristan Sloughter
f7ff07a87d
plugins provider
10 vuotta sitten
Tristan Sloughter
cd8c03e1c4
check format of config file and print the bad section in the error
10 vuotta sitten
Tristan Sloughter
ea07a7c65c
set default providers before installing plugins
10 vuotta sitten
Viacheslav Kovalev
c2c1079ba2
Show stacktrace to errors caught in rebar3 module.
10 vuotta sitten
Tristan Sloughter
fdc1267f67
start httpc in run/1 so it is available to download global plugins
10 vuotta sitten
Tristan Sloughter
0bd49634ce
don't lose global plugin providers
10 vuotta sitten
Tristan Sloughter
3a201230fe
install plugins from the global config to ~/.cache/plugins
10 vuotta sitten
Tristan Sloughter
fa95321774
remove uses of 'case catch'
10 vuotta sitten
Tristan Sloughter
bfd08c129d
set resources of state in state initialize functions
10 vuotta sitten
Tristan Sloughter
e5988f69e0
R15 support, replace unsetenv with putenv empty string
10 vuotta sitten
Tristan Sloughter
4374999d95
real bootstrapping
10 vuotta sitten
Tristan Sloughter
a3d4cc1259
track and cleanup code paths for different contexts
10 vuotta sitten
Fred Hebert
8f1bfcb596
Rename wtf->report, add all dep versions
10 vuotta sitten
Tristan Sloughter
743b24883d
removing installing of global plugins
10 vuotta sitten
Tristan Sloughter
79e2d6006c
install each deps plugins after handling dep, instead of at the end
10 vuotta sitten
Tristan Sloughter
38de29ae42
move resource modules list to rebar_state, no longer static
10 vuotta sitten
Tilman Holschuh
af5ba45f27
Decapitalize short option for 'version'
10 vuotta sitten
Fred Hebert
ad18970cd7
Fix #267 , refactor as/do/namespace interactions
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.
10 vuotta sitten
Tristan Sloughter
ae7fe65a75
halt with 0 on successful run
10 vuotta sitten
Tristan Sloughter
d623b39642
fix code path update for deps
10 vuotta sitten
Tristan Sloughter
0638c85634
store base opts after initialization of providers
10 vuotta sitten
Tristan Sloughter
d4c2332aab
make base_dir for a run include the profiles in path, link to shared deps
10 vuotta sitten