summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/ISSUE_TEMPLATE.md31
-rw-r--r--priv/templates/gitignore1
-rw-r--r--rebar.config4
-rw-r--r--rebar.lock4
-rw-r--r--src/rebar.app.src2
-rw-r--r--src/rebar_prv_dialyzer.erl2
-rw-r--r--src/rebar_prv_escriptize.erl8
-rw-r--r--test/rebar_escriptize_SUITE.erl26
-rw-r--r--test/rebar_unlock_SUITE_data/pkg.rebar.lock56
9 files changed, 94 insertions, 40 deletions
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..6d5a0c2
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,31 @@
+### Pre-Check ###
+
+- If you are filing for a bug, please do a quick search in current issues first
+- For bugs, mention if you are willing or interested in helping fix the issue
+- For questions or support, it helps to include context around your project or problem
+- Think of a descriptive title (more descriptive than 'feature X is broken' unless it is fully broken)
+
+### Environment ###
+
+- Add the result of `rebar3 report` to your message:
+
+```
+$ rebar3 report "my failing command"
+...
+```
+
+- Verify whether the version of rebar3 you're running is the latest release (see https://github.com/erlang/rebar3/releases)
+- If possible, include information about your project and its structure. Open source projects or examples are always easier to debug.
+ If you can provide an example code base to reproduce the issue on, we will generally be able to provide more help, and faster.
+
+### Current behaviour ###
+
+Describe the current behaviour. In case of a failure, crash, or exception, please include the result of running the command with debug information:
+
+```
+DEBUG=1 rebar3 <my failing command>
+```
+
+### Expected behaviour ###
+
+Describe what you expected to happen.
diff --git a/priv/templates/gitignore b/priv/templates/gitignore
index ced0c5e..121a4de 100644
--- a/priv/templates/gitignore
+++ b/priv/templates/gitignore
@@ -13,3 +13,4 @@ erl_crash.dump
.rebar
logs
_build
+.idea
diff --git a/rebar.config b/rebar.config
index f033694..f91d61b 100644
--- a/rebar.config
+++ b/rebar.config
@@ -2,7 +2,7 @@
%% ex: ts=4 sw=4 ft=erlang et
{deps, [{erlware_commons, "0.21.0"},
- {ssl_verify_hostname, "1.0.5"},
+ {ssl_verify_fun, "1.1.1"},
{certifi, "0.4.0"},
{providers, "1.6.0"},
{getopt, "0.8.2"},
@@ -37,7 +37,7 @@
{bootstrap, []},
{dialyze, [{overrides, [{add, erlware_commons, [{erl_opts, [debug_info]}]},
- {add, ssl_verify_hostname, [{erl_opts, [debug_info]}]},
+ {add, ssl_verify_fun, [{erl_opts, [debug_info]}]},
{add, certifi, [{erl_opts, [debug_info]}]},
{add, providers, [{erl_opts, [debug_info]}]},
{add, getopt, [{erl_opts, [debug_info]}]},
diff --git a/rebar.lock b/rebar.lock
index d5a61d7..231e266 100644
--- a/rebar.lock
+++ b/rebar.lock
@@ -8,7 +8,7 @@
{<<"getopt">>,{pkg,<<"getopt">>,<<"0.8.2">>},0},
{<<"providers">>,{pkg,<<"providers">>,<<"1.6.0">>},0},
{<<"relx">>,{pkg,<<"relx">>,<<"3.20.0">>},0},
- {<<"ssl_verify_hostname">>,{pkg,<<"ssl_verify_hostname">>,<<"1.0.5">>},0}]}.
+ {<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.1">>},0}]}.
[
{pkg_hash,[
{<<"bbmustache">>, <<"7BA94F971C5AFD7B6617918A4BB74705E36CAB36EB84B19B6A1B7EE06427AA38">>},
@@ -20,5 +20,5 @@
{<<"getopt">>, <<"B17556DB683000BA50370B16C0619DF1337E7AF7ECBF7D64FBF8D1D6BCE3109B">>},
{<<"providers">>, <<"DB0E2F9043AE60C0155205FCD238D68516331D0E5146155E33D1E79DC452964A">>},
{<<"relx">>, <<"B515B8317D25B3A1508699294C3D1FA6DC0527851DFFC87446661BCE21A36710">>},
- {<<"ssl_verify_hostname">>, <<"2E73E068CD6393526F9FA6D399353D7C9477D6886BA005F323B592D389FB47BE">>}]}
+ {<<"ssl_verify_fun">>, <<"28A4D65B7F59893BC2C7DE786DEC1E1555BD742D336043FE644AE956C3497FBE">>}]}
].
diff --git a/src/rebar.app.src b/src/rebar.app.src
index bd0f871..5b735cf 100644
--- a/src/rebar.app.src
+++ b/src/rebar.app.src
@@ -23,7 +23,7 @@
erlware_commons,
providers,
bbmustache,
- ssl_verify_hostname,
+ ssl_verify_fun,
certifi,
cth_readable,
relx,
diff --git a/src/rebar_prv_dialyzer.erl b/src/rebar_prv_dialyzer.erl
index 82d2d07..fc13de1 100644
--- a/src/rebar_prv_dialyzer.erl
+++ b/src/rebar_prv_dialyzer.erl
@@ -260,6 +260,8 @@ read_plt(_State, Plt) ->
Result;
{error, no_such_file} ->
error;
+ {error, not_valid} ->
+ error;
{error, read_error} ->
Error = io_lib:format("Could not read the PLT file ~p", [Plt]),
throw({dialyzer_error, Error})
diff --git a/src/rebar_prv_escriptize.erl b/src/rebar_prv_escriptize.erl
index d8704f6..6e10947 100644
--- a/src/rebar_prv_escriptize.erl
+++ b/src/rebar_prv_escriptize.erl
@@ -72,8 +72,12 @@ do(State) ->
end;
Name ->
AllApps = rebar_state:all_deps(State)++rebar_state:project_apps(State),
- {ok, AppInfo} = rebar_app_utils:find(ec_cnv:to_binary(Name), AllApps),
- escriptize(State, AppInfo)
+ case rebar_app_utils:find(ec_cnv:to_binary(Name), AllApps) of
+ {ok, AppInfo} ->
+ escriptize(State, AppInfo);
+ _ ->
+ ?PRV_ERROR({bad_name, Name})
+ end
end.
escriptize(State0, App) ->
diff --git a/test/rebar_escriptize_SUITE.erl b/test/rebar_escriptize_SUITE.erl
index 1817d6b..139d5cd 100644
--- a/test/rebar_escriptize_SUITE.erl
+++ b/test/rebar_escriptize_SUITE.erl
@@ -5,6 +5,8 @@
end_per_suite/1,
init_per_testcase/2,
all/0,
+ escriptize_with_name/1,
+ escriptize_with_bad_name/1,
build_and_clean_app/1]).
-include_lib("common_test/include/ct.hrl").
@@ -24,7 +26,11 @@ init_per_testcase(_, Config) ->
rebar_test_utils:init_rebar_state(Config).
all() ->
- [build_and_clean_app].
+ [
+ build_and_clean_app,
+ escriptize_with_name,
+ escriptize_with_bad_name
+ ].
%% Test escriptize builds and runs the app's escript
build_and_clean_app(Config) ->
@@ -35,3 +41,21 @@ build_and_clean_app(Config) ->
rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]),
rebar_test_utils:run_and_check(Config, [], ["escriptize"],
{ok, [{app, Name, valid}]}).
+
+escriptize_with_name(Config) ->
+ AppDir = ?config(apps, Config),
+
+ Name = rebar_test_utils:create_random_name("app1_"),
+ Vsn = rebar_test_utils:create_random_vsn(),
+ rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]),
+ rebar_test_utils:run_and_check(Config, [{escript_main_app, Name}], ["escriptize"],
+ {ok, [{app, Name, valid}]}).
+
+escriptize_with_bad_name(Config) ->
+ AppDir = ?config(apps, Config),
+
+ Name = rebar_test_utils:create_random_name("app1_"),
+ Vsn = rebar_test_utils:create_random_vsn(),
+ rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]),
+ rebar_test_utils:run_and_check(Config, [{escript_main_app, boogers}], ["escriptize"],
+ {error,{rebar_prv_escriptize, {bad_name, boogers}}}).
diff --git a/test/rebar_unlock_SUITE_data/pkg.rebar.lock b/test/rebar_unlock_SUITE_data/pkg.rebar.lock
index 38e22e5..231e266 100644
--- a/test/rebar_unlock_SUITE_data/pkg.rebar.lock
+++ b/test/rebar_unlock_SUITE_data/pkg.rebar.lock
@@ -1,32 +1,24 @@
-{"1.1.0",[{<<"bbmustache">>,{pkg,<<"bbmustache">>,<<"1.0.4">>},0},
- {<<"certifi">>,{pkg,<<"certifi">>,<<"0.4.0">>},0},
- {<<"cf">>,{pkg,<<"cf">>,<<"0.2.1">>},0},
- {<<"cth_readable">>,{pkg,<<"cth_readable">>,<<"1.2.2">>},0},
- {<<"erlware_commons">>,{pkg,<<"erlware_commons">>,<<"0.21.0">>},0},
- {<<"eunit_formatters">>,{pkg,<<"eunit_formatters">>,<<"0.3.1">>},0},
- {<<"getopt">>,{pkg,<<"getopt">>,<<"0.8.2">>},0},
- {<<"providers">>,{pkg,<<"providers">>,<<"1.6.0">>},0},
- {<<"relx">>,{pkg,<<"relx">>,<<"3.19.0">>},0},
- {<<"ssl_verify_hostname">>,
- {pkg,<<"ssl_verify_hostname">>,<<"1.0.5">>},
- 0}]}.
-[{pkg_hash,[{<<"bbmustache">>,
- <<"7BA94F971C5AFD7B6617918A4BB74705E36CAB36EB84B19B6A1B7EE06427AA38">>},
- {<<"certifi">>,
- <<"A7966EFB868B179023618D29A407548F70C52466BF1849B9E8EBD0E34B7EA11F">>},
- {<<"cf">>,
- <<"69D0B1349FD4D7D4DC55B7F407D29D7A840BF9A1EF5AF529F1EBE0CE153FC2AB">>},
- {<<"cth_readable">>,
- <<"983913A8E8572310B7EAF5F2631148B7D70B3C090D2120DCFE777A93AA4165FB">>},
- {<<"erlware_commons">>,
- <<"A04433071AD7D112EDEFC75AC77719DD3E6753E697AC09428FC83D7564B80B15">>},
- {<<"eunit_formatters">>,
- <<"7A6FC351EB5B873E2356B8852EB751E20C13A72FBCA03393CF682B8483509573">>},
- {<<"getopt">>,
- <<"B17556DB683000BA50370B16C0619DF1337E7AF7ECBF7D64FBF8D1D6BCE3109B">>},
- {<<"providers">>,
- <<"DB0E2F9043AE60C0155205FCD238D68516331D0E5146155E33D1E79DC452964A">>},
- {<<"relx">>,
- <<"286DD5244B4786F56AAC75D5C8E2D1FB4CFD306810D4EC8548F3AE1B3AADB8F7">>},
- {<<"ssl_verify_hostname">>,
- <<"2E73E068CD6393526F9FA6D399353D7C9477D6886BA005F323B592D389FB47BE">>}]}].
+{"1.1.0",
+[{<<"bbmustache">>,{pkg,<<"bbmustache">>,<<"1.0.4">>},0},
+ {<<"certifi">>,{pkg,<<"certifi">>,<<"0.4.0">>},0},
+ {<<"cf">>,{pkg,<<"cf">>,<<"0.2.1">>},0},
+ {<<"cth_readable">>,{pkg,<<"cth_readable">>,<<"1.2.3">>},0},
+ {<<"erlware_commons">>,{pkg,<<"erlware_commons">>,<<"0.21.0">>},0},
+ {<<"eunit_formatters">>,{pkg,<<"eunit_formatters">>,<<"0.3.1">>},0},
+ {<<"getopt">>,{pkg,<<"getopt">>,<<"0.8.2">>},0},
+ {<<"providers">>,{pkg,<<"providers">>,<<"1.6.0">>},0},
+ {<<"relx">>,{pkg,<<"relx">>,<<"3.20.0">>},0},
+ {<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.1">>},0}]}.
+[
+{pkg_hash,[
+ {<<"bbmustache">>, <<"7BA94F971C5AFD7B6617918A4BB74705E36CAB36EB84B19B6A1B7EE06427AA38">>},
+ {<<"certifi">>, <<"A7966EFB868B179023618D29A407548F70C52466BF1849B9E8EBD0E34B7EA11F">>},
+ {<<"cf">>, <<"69D0B1349FD4D7D4DC55B7F407D29D7A840BF9A1EF5AF529F1EBE0CE153FC2AB">>},
+ {<<"cth_readable">>, <<"293120673DFF82F0768612C5282E35C40CACC1B6F94FE99077438FD3749D0E27">>},
+ {<<"erlware_commons">>, <<"A04433071AD7D112EDEFC75AC77719DD3E6753E697AC09428FC83D7564B80B15">>},
+ {<<"eunit_formatters">>, <<"7A6FC351EB5B873E2356B8852EB751E20C13A72FBCA03393CF682B8483509573">>},
+ {<<"getopt">>, <<"B17556DB683000BA50370B16C0619DF1337E7AF7ECBF7D64FBF8D1D6BCE3109B">>},
+ {<<"providers">>, <<"DB0E2F9043AE60C0155205FCD238D68516331D0E5146155E33D1E79DC452964A">>},
+ {<<"relx">>, <<"B515B8317D25B3A1508699294C3D1FA6DC0527851DFFC87446661BCE21A36710">>},
+ {<<"ssl_verify_fun">>, <<"28A4D65B7F59893BC2C7DE786DEC1E1555BD742D336043FE644AE956C3497FBE">>}]}
+].