Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:20
rebar
rebar-2.6.4-git.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rebar-2.6.4-git.patch of Package rebar
diff --git a/.travis.yml b/.travis.yml index e4a3149..8be6814 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,28 @@ otp_release: - R14B03 - 17.0 - 18.0 + - 19.1 + - 20.0.5 + - 20.1.5 +env: MAKE_TARGET=ci before_script: - hostname -f - cc -v - ld -v -script: "make travis" + - find .rebar +after_script: + - find .rebar +matrix: + include: + - otp_release: 20.1.5 + env: MAKE_TARGET=ci-dialyze + allow_failures: + - otp_release: 20.1.5 + env: MAKE_TARGET=ci-dialyze +script: make $MAKE_TARGET +cache: + directories: + - .rebar +before_cache: + - rm -fv .rebar/erlcinfo + - rm -fv $HOME/.cache/.rebar/erlcinfo diff --git a/Makefile b/Makefile index d0d16f8..106e289 100644 --- a/Makefile +++ b/Makefile @@ -22,11 +22,11 @@ check: debug xref dialyzer deps test xref: @./rebar xref -build_plt: - @./rebar build-plt +maybe_build_plt: + @./rebar -vv check-plt || ./rebar -vv build-plt -dialyzer: - @./rebar dialyze +dialyze: maybe_build_plt + @./rebar -vv dialyze binary: VSN = $(shell ./rebar -V) binary: clean all @@ -45,4 +45,6 @@ test_eunit: all test_inttest: all deps @$(RETEST) -l $(LOG_LEVEL) $(RT_TARGETS) -travis: clean debug xref clean all deps test +ci: clean debug xref clean all deps test + +ci-dialyze: clean debug dialyze diff --git a/THANKS b/THANKS index ab7935c..943ad94 100644 --- a/THANKS +++ b/THANKS @@ -150,3 +150,4 @@ John Daily Yury Gargay Frank Hunleth Matwey Kornilov +Julius Andrikonis diff --git a/inttest/app_src/app_src.erl b/inttest/app_src/app_src.erl index dec7307..a6c53d1 100644 --- a/inttest/app_src/app_src.erl +++ b/inttest/app_src/app_src.erl @@ -1,6 +1,6 @@ -module(app_src). --compile(export_all). +-export([test/0]). test() -> ok. diff --git a/inttest/app_src/app_src_rt.erl b/inttest/app_src/app_src_rt.erl index 2b5a87e..c8240d2 100644 --- a/inttest/app_src/app_src_rt.erl +++ b/inttest/app_src/app_src_rt.erl @@ -26,7 +26,7 @@ %% ------------------------------------------------------------------- -module(app_src_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). -include_lib("eunit/include/eunit.hrl"). diff --git a/inttest/app_src_script/app_src_script.erl b/inttest/app_src_script/app_src_script.erl index 6372c92..3f2a19b 100644 --- a/inttest/app_src_script/app_src_script.erl +++ b/inttest/app_src_script/app_src_script.erl @@ -1,6 +1,6 @@ -module(app_src_script). --compile(export_all). +-export([test/0]). test() -> ok. diff --git a/inttest/app_src_script/app_src_script_rt.erl b/inttest/app_src_script/app_src_script_rt.erl index c0de128..377f929 100644 --- a/inttest/app_src_script/app_src_script_rt.erl +++ b/inttest/app_src_script/app_src_script_rt.erl @@ -26,7 +26,7 @@ %% ------------------------------------------------------------------- -module(app_src_script_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). -include_lib("eunit/include/eunit.hrl"). diff --git a/inttest/app_src_script_2/app_src_script_2.erl b/inttest/app_src_script_2/app_src_script_2.erl index 26b8364..88eee51 100644 --- a/inttest/app_src_script_2/app_src_script_2.erl +++ b/inttest/app_src_script_2/app_src_script_2.erl @@ -1,6 +1,6 @@ -module(app_src_script_2). --compile(export_all). +-export([test/0]). test() -> ok. diff --git a/inttest/app_src_script_2/app_src_script_2_rt.erl b/inttest/app_src_script_2/app_src_script_2_rt.erl index 613e3f9..78cd761 100644 --- a/inttest/app_src_script_2/app_src_script_2_rt.erl +++ b/inttest/app_src_script_2/app_src_script_2_rt.erl @@ -26,7 +26,7 @@ %% ------------------------------------------------------------------- -module(app_src_script_2_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). -include_lib("eunit/include/eunit.hrl"). diff --git a/inttest/appup_src/appup_src_rt.erl b/inttest/appup_src/appup_src_rt.erl index 7530aa4..0131972 100644 --- a/inttest/appup_src/appup_src_rt.erl +++ b/inttest/appup_src/appup_src_rt.erl @@ -26,7 +26,7 @@ %% ------------------------------------------------------------------- -module(appup_src_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). -include_lib("eunit/include/eunit.hrl"). diff --git a/inttest/appup_src/src/appup_src.erl b/inttest/appup_src/src/appup_src.erl index 6f4d0d7..26b1812 100644 --- a/inttest/appup_src/src/appup_src.erl +++ b/inttest/appup_src/src/appup_src.erl @@ -1,6 +1,6 @@ -module(appup_src). --compile(export_all). +-export([test/0]). test() -> ok. diff --git a/inttest/appup_src_2/appup_src_2_rt.erl b/inttest/appup_src_2/appup_src_2_rt.erl index 99e6248..4b621b1 100644 --- a/inttest/appup_src_2/appup_src_2_rt.erl +++ b/inttest/appup_src_2/appup_src_2_rt.erl @@ -26,7 +26,7 @@ %% ------------------------------------------------------------------- -module(appup_src_2_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). -include_lib("eunit/include/eunit.hrl"). diff --git a/inttest/appup_src_2/appup_src_rt_2.erl b/inttest/appup_src_2/appup_src_rt_2.erl index fff6f62..e855a96 100644 --- a/inttest/appup_src_2/appup_src_rt_2.erl +++ b/inttest/appup_src_2/appup_src_rt_2.erl @@ -26,7 +26,7 @@ %% ------------------------------------------------------------------- -module(appup_src_rt_2). --compile(export_all). +-export([setup/1, files/0, run/1]). -include_lib("eunit/include/eunit.hrl"). diff --git a/inttest/appup_src_2/src/appup_src.erl b/inttest/appup_src_2/src/appup_src.erl index 6f4d0d7..26b1812 100644 --- a/inttest/appup_src_2/src/appup_src.erl +++ b/inttest/appup_src_2/src/appup_src.erl @@ -1,6 +1,6 @@ -module(appup_src). --compile(export_all). +-export([test/0]). test() -> ok. diff --git a/inttest/appup_src_script/appup_src_script_rt.erl b/inttest/appup_src_script/appup_src_script_rt.erl index 1aeb680..5dab165 100644 --- a/inttest/appup_src_script/appup_src_script_rt.erl +++ b/inttest/appup_src_script/appup_src_script_rt.erl @@ -26,7 +26,7 @@ %% ------------------------------------------------------------------- -module(appup_src_script_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). -include_lib("eunit/include/eunit.hrl"). diff --git a/inttest/appup_src_script/src/appup_src.erl b/inttest/appup_src_script/src/appup_src.erl index 6f4d0d7..26b1812 100644 --- a/inttest/appup_src_script/src/appup_src.erl +++ b/inttest/appup_src_script/src/appup_src.erl @@ -1,6 +1,6 @@ -module(appup_src). --compile(export_all). +-export([test/0]). test() -> ok. diff --git a/inttest/bug_5_rt.erl b/inttest/bug_5_rt.erl index f198d40..7f00e4a 100644 --- a/inttest/bug_5_rt.erl +++ b/inttest/bug_5_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(bug_5_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/inttest/ct1/ct1_rt.erl b/inttest/ct1/ct1_rt.erl index 03b4ed8..97d77f9 100644 --- a/inttest/ct1/ct1_rt.erl +++ b/inttest/ct1/ct1_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(ct1_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/inttest/ct1/test_SUITE.erl b/inttest/ct1/test_SUITE.erl index e8a2bb8..3d86a6a 100644 --- a/inttest/ct1/test_SUITE.erl +++ b/inttest/ct1/test_SUITE.erl @@ -1,6 +1,6 @@ -module(test_SUITE). --compile(export_all). +-export([all/0, simple_test/1, app_config_file_test/1]). -include_lib("ct.hrl"). diff --git a/inttest/ct2/ct2_rt.erl b/inttest/ct2/ct2_rt.erl index b3138d4..06d7abb 100644 --- a/inttest/ct2/ct2_rt.erl +++ b/inttest/ct2/ct2_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(ct2_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/inttest/ct2/foo_SUITE.erl b/inttest/ct2/foo_SUITE.erl index d03aedf..be089c7 100644 --- a/inttest/ct2/foo_SUITE.erl +++ b/inttest/ct2/foo_SUITE.erl @@ -2,7 +2,7 @@ -include_lib("common_test/include/ct.hrl"). --compile(export_all). +-export([all/0, foo/1]). all() -> [foo]. diff --git a/inttest/ct3/ct3_rt.erl b/inttest/ct3/ct3_rt.erl index b5739db..32ded4c 100644 --- a/inttest/ct3/ct3_rt.erl +++ b/inttest/ct3/ct3_rt.erl @@ -26,7 +26,7 @@ %% ------------------------------------------------------------------- -module(ct3_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/inttest/ct3/test_SUITE.erl b/inttest/ct3/test_SUITE.erl index efd930d..610c14c 100644 --- a/inttest/ct3/test_SUITE.erl +++ b/inttest/ct3/test_SUITE.erl @@ -26,7 +26,7 @@ %% ------------------------------------------------------------------- -module(test_SUITE). --compile(export_all). +-export([all/0, simple_test/1, app_config_file_test/1, check_path/1]). -include_lib("ct.hrl"). diff --git a/inttest/ct4/ct4_rt.erl b/inttest/ct4/ct4_rt.erl index bc010e8..b393bc7 100644 --- a/inttest/ct4/ct4_rt.erl +++ b/inttest/ct4/ct4_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(ct4_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/inttest/ct4/foo_SUITE.erl b/inttest/ct4/foo_SUITE.erl index fb4f56a..931ca50 100644 --- a/inttest/ct4/foo_SUITE.erl +++ b/inttest/ct4/foo_SUITE.erl @@ -2,7 +2,7 @@ -include_lib("common_test/include/ct.hrl"). --compile(export_all). +-export([all/0, simple/1]). all() -> [simple]. diff --git a/inttest/ct_cover/ct_cover_rt.erl b/inttest/ct_cover/ct_cover_rt.erl index 361d85b..8bff9df 100644 --- a/inttest/ct_cover/ct_cover_rt.erl +++ b/inttest/ct_cover/ct_cover_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(ct_cover_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/inttest/ct_cover/mock/dummy/itest/test_SUITE.erl b/inttest/ct_cover/mock/dummy/itest/test_SUITE.erl index 0d9a065..25dde6a 100644 --- a/inttest/ct_cover/mock/dummy/itest/test_SUITE.erl +++ b/inttest/ct_cover/mock/dummy/itest/test_SUITE.erl @@ -1,6 +1,6 @@ -module(test_SUITE). --compile(export_all). +-export([all/0, simple_test/1, app_config_file_test/1]). -include_lib("ct.hrl"). diff --git a/inttest/ct_cover/test_SUITE.erl b/inttest/ct_cover/test_SUITE.erl index e8a2bb8..3d86a6a 100644 --- a/inttest/ct_cover/test_SUITE.erl +++ b/inttest/ct_cover/test_SUITE.erl @@ -1,6 +1,6 @@ -module(test_SUITE). --compile(export_all). +-export([all/0, simple_test/1, app_config_file_test/1]). -include_lib("ct.hrl"). diff --git a/inttest/ct_make_fails/ct_make_fails_rt.erl b/inttest/ct_make_fails/ct_make_fails_rt.erl index a7959a7..e2abb9a 100644 --- a/inttest/ct_make_fails/ct_make_fails_rt.erl +++ b/inttest/ct_make_fails/ct_make_fails_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(ct_make_fails_rt). --compile(export_all). +-export([files/0, run/1]). files() -> diff --git a/inttest/ct_make_fails/test_SUITE.erl b/inttest/ct_make_fails/test_SUITE.erl index 343aa5a..068e926 100644 --- a/inttest/ct_make_fails/test_SUITE.erl +++ b/inttest/ct_make_fails/test_SUITE.erl @@ -1,6 +1,6 @@ -module(test_SUITE). --compile(export_all). +-export([all/0, simple_test/1, app_config_file_test/1]). -include_lib("ct.hrl"). diff --git a/inttest/ct_test_fails/ct_test_fails_rt.erl b/inttest/ct_test_fails/ct_test_fails_rt.erl index a556891..69ee382 100644 --- a/inttest/ct_test_fails/ct_test_fails_rt.erl +++ b/inttest/ct_test_fails/ct_test_fails_rt.erl @@ -2,8 +2,7 @@ %% ex: ts=4 sw=4 et -module(ct_test_fails_rt). --compile(export_all). - +-export([files/0, run/1]). files() -> [{create, "ebin/a1.app", app(a1)}, @@ -14,11 +13,11 @@ files() -> {copy, "test_SUITE.erl", "itest/test_SUITE.erl"}, {copy, "test2_SUITE.erl", "itest/test2_SUITE.erl"}]. -run(Dir) -> +run(_Dir) -> ok = case catch retest:sh("./rebar compile ct -v 3") of - {error, {stopped, _}} -> ok; - _ -> expected_to_fail - end. + {error, {stopped, _}} -> ok; + _ -> expected_to_fail + end. %% %% Generate the contents of a simple .app file diff --git a/inttest/ct_test_fails/test2_SUITE.erl b/inttest/ct_test_fails/test2_SUITE.erl index 4b9299f..7db1d22 100644 --- a/inttest/ct_test_fails/test2_SUITE.erl +++ b/inttest/ct_test_fails/test2_SUITE.erl @@ -1,6 +1,6 @@ -module(test2_SUITE). --compile(export_all). +-export([all/0, simple_test/1]). all() -> [simple_test]. diff --git a/inttest/ct_test_fails/test_SUITE.erl b/inttest/ct_test_fails/test_SUITE.erl index 124fbe8..047631c 100644 --- a/inttest/ct_test_fails/test_SUITE.erl +++ b/inttest/ct_test_fails/test_SUITE.erl @@ -1,6 +1,6 @@ -module(test_SUITE). --compile(export_all). +-export([all/0, simple_test/1]). all() -> [simple_test]. diff --git a/inttest/depplugins/depplugins_rt.erl b/inttest/depplugins/depplugins_rt.erl index fc72dec..c2cb76a 100644 --- a/inttest/depplugins/depplugins_rt.erl +++ b/inttest/depplugins/depplugins_rt.erl @@ -17,7 +17,7 @@ %%% </ol> -module(depplugins_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). -include_lib("eunit/include/eunit.hrl"). diff --git a/inttest/inttest_utils.erl b/inttest/inttest_utils.erl index d896f4d..addac5f 100644 --- a/inttest/inttest_utils.erl +++ b/inttest/inttest_utils.erl @@ -2,7 +2,10 @@ %% ex: ts=4 sw=4 et -module(inttest_utils). --compile(export_all). +-export([ rebar_setup/1 + , rebar_setup/2 + , rebar_setup/0 + ]). rebar_setup({win32, nt}, Dir) -> [{copy, filename:join(Dir, "rebar.cmd"), "rebar.cmd"}]; diff --git a/inttest/neotoma1/neotoma_src_rt.erl b/inttest/neotoma1/neotoma_src_rt.erl index 6f7c6ff..568bc31 100644 --- a/inttest/neotoma1/neotoma_src_rt.erl +++ b/inttest/neotoma1/neotoma_src_rt.erl @@ -26,7 +26,7 @@ %% ------------------------------------------------------------------- -module(neotoma_src_rt). --compile(export_all). +-export([files/0, run/1]). -include_lib("eunit/include/eunit.hrl"). -include_lib("deps/retest/include/retest.hrl"). diff --git a/inttest/rebar3_deps1/a.erl b/inttest/rebar3_deps1/a.erl index 835522a..897b963 100644 --- a/inttest/rebar3_deps1/a.erl +++ b/inttest/rebar3_deps1/a.erl @@ -1,6 +1,6 @@ -module(a). --compile(export_all). +-export([hello/0]). -include_lib("b/include/b.hrl"). diff --git a/inttest/rebar3_deps1/rebar3_deps1_rt.erl b/inttest/rebar3_deps1/rebar3_deps1_rt.erl index e84b6ba..92a1628 100644 --- a/inttest/rebar3_deps1/rebar3_deps1_rt.erl +++ b/inttest/rebar3_deps1/rebar3_deps1_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(rebar3_deps1_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/inttest/rgen1/rgen1_rt.erl b/inttest/rgen1/rgen1_rt.erl index 5847f4a..7641ca4 100644 --- a/inttest/rgen1/rgen1_rt.erl +++ b/inttest/rgen1/rgen1_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(rgen1_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). %% Exercise release generation w/ templating diff --git a/inttest/t_custom_config/custom_config.erl b/inttest/t_custom_config/custom_config.erl index 8656201..de964b4 100644 --- a/inttest/t_custom_config/custom_config.erl +++ b/inttest/t_custom_config/custom_config.erl @@ -1,6 +1,6 @@ -module(custom_config). --compile(export_all). +-export([test/0]). test() -> ok. diff --git a/inttest/t_custom_config/t_custom_config_rt.erl b/inttest/t_custom_config/t_custom_config_rt.erl index 1f21927..bda229e 100644 --- a/inttest/t_custom_config/t_custom_config_rt.erl +++ b/inttest/t_custom_config/t_custom_config_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(t_custom_config_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). -include_lib("eunit/include/eunit.hrl"). diff --git a/inttest/tdeps1/a.erl b/inttest/tdeps1/a.erl index 835522a..897b963 100644 --- a/inttest/tdeps1/a.erl +++ b/inttest/tdeps1/a.erl @@ -1,6 +1,6 @@ -module(a). --compile(export_all). +-export([hello/0]). -include_lib("b/include/b.hrl"). diff --git a/inttest/tdeps1/tdeps1_rt.erl b/inttest/tdeps1/tdeps1_rt.erl index 849403b..b291b54 100644 --- a/inttest/tdeps1/tdeps1_rt.erl +++ b/inttest/tdeps1/tdeps1_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(tdeps1_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/inttest/tdeps2/tdeps2_rt.erl b/inttest/tdeps2/tdeps2_rt.erl index a5665ad..33a8c15 100644 --- a/inttest/tdeps2/tdeps2_rt.erl +++ b/inttest/tdeps2/tdeps2_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(tdeps2_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/inttest/tdeps3/tdeps3_rt.erl b/inttest/tdeps3/tdeps3_rt.erl index bc47772..e30b64e 100644 --- a/inttest/tdeps3/tdeps3_rt.erl +++ b/inttest/tdeps3/tdeps3_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(tdeps3_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/inttest/tdeps_prefer/tdeps_prefer_rt.erl b/inttest/tdeps_prefer/tdeps_prefer_rt.erl index 94c9b8f..aca0b96 100644 --- a/inttest/tdeps_prefer/tdeps_prefer_rt.erl +++ b/inttest/tdeps_prefer/tdeps_prefer_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(tdeps_prefer_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/inttest/tdeps_update/tdeps_update_rt.erl b/inttest/tdeps_update/tdeps_update_rt.erl index b4919c5..2710534 100644 --- a/inttest/tdeps_update/tdeps_update_rt.erl +++ b/inttest/tdeps_update/tdeps_update_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(tdeps_update_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/inttest/thooks/fish.erl b/inttest/thooks/fish.erl index 739cb94..f22194a 100644 --- a/inttest/thooks/fish.erl +++ b/inttest/thooks/fish.erl @@ -1,5 +1,5 @@ -module(fish). --compile(export_all). +-export([fish/0]). fish() -> fish. diff --git a/inttest/thooks/thooks_rt.erl b/inttest/thooks/thooks_rt.erl index f1e7fa4..5501323 100644 --- a/inttest/thooks/thooks_rt.erl +++ b/inttest/thooks/thooks_rt.erl @@ -3,7 +3,7 @@ -module(thooks_rt). -include_lib("eunit/include/eunit.hrl"). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/inttest/tplugins/bad_plugin.erl b/inttest/tplugins/bad_plugin.erl index 77ec01b..5730a6d 100644 --- a/inttest/tplugins/bad_plugin.erl +++ b/inttest/tplugins/bad_plugin.erl @@ -1,5 +1,6 @@ -module(bad_plugin). --compile(export_all). + +-export([fwibble/2]). %% this plugin contains numerous DELIBERATE syntax errors diff --git a/inttest/tplugins/fish.erl b/inttest/tplugins/fish.erl index 739cb94..aa0639d 100644 --- a/inttest/tplugins/fish.erl +++ b/inttest/tplugins/fish.erl @@ -1,5 +1,5 @@ -module(fish). --compile(export_all). +-expoort([fish/0]). fish() -> fish. diff --git a/inttest/tplugins/test_plugin.erl b/inttest/tplugins/test_plugin.erl index 461247c..5b8494f 100644 --- a/inttest/tplugins/test_plugin.erl +++ b/inttest/tplugins/test_plugin.erl @@ -1,5 +1,6 @@ -module(test_plugin). --compile(export_all). + +-export([fwibble/2]). fwibble(Config, _) -> Pwd = rebar_utils:get_cwd(), diff --git a/inttest/tplugins/tplugins_rt.erl b/inttest/tplugins/tplugins_rt.erl index d36afdd..c833f62 100644 --- a/inttest/tplugins/tplugins_rt.erl +++ b/inttest/tplugins/tplugins_rt.erl @@ -1,7 +1,7 @@ %% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*- %% ex: ts=4 sw=4 et -module(tplugins_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). -include_lib("eunit/include/eunit.hrl"). diff --git a/inttest/vsn_cache/vsn_cache_rt.erl b/inttest/vsn_cache/vsn_cache_rt.erl index b482888..18c98ab 100644 --- a/inttest/vsn_cache/vsn_cache_rt.erl +++ b/inttest/vsn_cache/vsn_cache_rt.erl @@ -2,7 +2,7 @@ %% ex: ts=4 sw=4 et -module(vsn_cache_rt). --compile(export_all). +-export([setup/1, files/0, run/1]). setup([Target]) -> retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), diff --git a/priv/templates/ctsuite.erl b/priv/templates/ctsuite.erl index 33a8fac..bed2ae6 100644 --- a/priv/templates/ctsuite.erl +++ b/priv/templates/ctsuite.erl @@ -3,7 +3,20 @@ -module({{testmod}}_SUITE). -include_lib("common_test/include/ct.hrl"). --compile(export_all). +-export([ suite/0 + , groups/0 + , all/0 + , init_per_suite/1 + , end_per_suite/1 + , init_per_group/2 + , end_per_group/2 + , init_per_testcase/2 + , end_per_testcase/2 + ]). + +-export([ test_{{testmod}}/0 + , test_{{testmod}}/1 + ]). %%-------------------------------------------------------------------- %% Function: suite() -> Info @@ -57,12 +70,16 @@ groups() -> []. %% NB: By default, we export all 1-arity user defined functions %%-------------------------------------------------------------------- all() -> - [ {exports, Functions} | _ ] = ?MODULE:module_info(), + { exports, Functions } = lists:keyfind(exports, 1, ?MODULE:module_info()), [ FName || {FName, _} <- lists:filter( fun ({module_info,_}) -> false; ({all,_}) -> false; ({init_per_suite,1}) -> false; ({end_per_suite,1}) -> false; + ({init_per_group,2}) -> false; + ({end_per_group,2}) -> false; + ({init_per_testcase,2}) -> false; + ({end_per_testcase,2}) -> false; ({_,1}) -> true; ({_,_}) -> false end, Functions)]. @@ -108,7 +125,7 @@ end_per_suite(_Config) -> %% %% Description: Initialization before each test case group. %%-------------------------------------------------------------------- -init_per_group(_group, Config) -> +init_per_group(_GroupName, Config) -> Config. %%-------------------------------------------------------------------- @@ -122,7 +139,7 @@ init_per_group(_group, Config) -> %% %% Description: Cleanup after each test case group. %%-------------------------------------------------------------------- -end_per_group(_group, Config) -> +end_per_group(_GroupName, Config) -> Config. %%-------------------------------------------------------------------- @@ -141,7 +158,7 @@ end_per_group(_group, Config) -> %% Note: This function is free to add any key/value pairs to the Config %% variable, but should NOT alter/remove any existing entries. %%-------------------------------------------------------------------- -init_per_testcase(TestCase, Config) -> +init_per_testcase(_TestCase, Config) -> Config. %%-------------------------------------------------------------------- @@ -157,7 +174,7 @@ init_per_testcase(TestCase, Config) -> %% %% Description: Cleanup after each test case. %%-------------------------------------------------------------------- -end_per_testcase(TestCase, Config) -> +end_per_testcase(_TestCase, Config) -> Config. test_{{testmod}}() -> diff --git a/rebar.config.script b/rebar.config.script index eacd510..67389b0 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -1,7 +1,7 @@ %% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- %% ex: ts=4 sw=4 ft=erlang et -ExtraDeps = [{retest, ".*", {git, "git://github.com/rebar/retest.git", +ExtraDeps = [{retest, ".*", {git, "https://github.com/rebar/retest", {tag, "1.1.0"}}}], case os:getenv("REBAR_EXTRA_DEPS") of diff --git a/src/rebar.erl b/src/rebar.erl index 2eb608d..d35e492 100644 --- a/src/rebar.erl +++ b/src/rebar.erl @@ -156,9 +156,6 @@ init_config1(BaseConfig) -> rebar_config:set_xconf(BaseConfig1, base_dir, AbsCwd). profile(BaseConfig1, Commands) -> - ?CONSOLE("Please take note that profiler=[fprof|eflame] is preliminary" - " and will be~nreplaced with a different command line flag" - " in the next release.~n", []), Profiler = rebar_config:get_global(BaseConfig1, profiler, "fprof"), profile(BaseConfig1, Commands, list_to_atom(Profiler)). @@ -593,7 +590,7 @@ unabbreviate_command_names([Command | Commands]) -> [FullCommand] -> [FullCommand | unabbreviate_command_names(Commands)]; Candidates -> - ?ABORT("Found more than one match for abbreviated command name " + ?ABORT("Found more than one match for abbreviated command name" " '~s',~nplease be more specific. Possible candidates:~n" " ~s~n", [Command, string:join(Candidates, ", ")]) diff --git a/src/rebar_core.erl b/src/rebar_core.erl index 6cc8d38..747fe97 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -190,8 +190,8 @@ skip_or_process_dir(Dir, Command, Config, DirSet, CurrentCodePath, WouldCd); skip_or_process_dir(Dir, Command, Config, DirSet, CurrentCodePath, {_, File}=ModuleSet, WouldCd) -> - case lists:suffix(".app.src", File) - orelse lists:suffix(".app", File) of + case lists:suffix(".app", File) + orelse rebar_app_utils:is_app_src(File) of true -> %% .app or .app.src file, check if is_skipped_app skip_or_process_dir1(Dir, Command, Config, DirSet, CurrentCodePath, diff --git a/src/rebar_cover_utils.erl b/src/rebar_cover_utils.erl index 3fcba63..7b85f1c 100644 --- a/src/rebar_cover_utils.erl +++ b/src/rebar_cover_utils.erl @@ -35,6 +35,8 @@ -include("rebar.hrl"). +-dialyzer({no_opaque, has_header/2}). + %% ==================================================================== %% Internal functions %% ==================================================================== diff --git a/src/rebar_ct.erl b/src/rebar_ct.erl index b27f661..c033c58 100644 --- a/src/rebar_ct.erl +++ b/src/rebar_ct.erl @@ -193,7 +193,7 @@ check_log(Config,RawLogFilename,Fun) -> ?FAIL; true -> - Fun(Msg) + Fun(string:join(Msg, "\n")) end. diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl index f4d7b76..ebf76bc 100644 --- a/src/rebar_eunit.erl +++ b/src/rebar_eunit.erl @@ -54,8 +54,8 @@ %% </li> %% <li> %% tests="baz"- For every existing suite, run the first test whose -%% name starts with bar and, if no such test exists, run the test -%% whose name starts with bar in the suite's _tests module +%% name starts with baz and, if no such test exists, run the test +%% whose name starts with baz in the suite's _tests module %% </li> %% </ul> %% Additionally, for projects that have separate folders for the core diff --git a/src/rebar_neotoma_compiler.erl b/src/rebar_neotoma_compiler.erl index f93d492..e35dfc4 100644 --- a/src/rebar_neotoma_compiler.erl +++ b/src/rebar_neotoma_compiler.erl @@ -78,12 +78,18 @@ clean(Config, _AppFile) -> %% ============================================================================ info(help, compile) -> + info_help("Build Neotoma (*.peg) sources.~n"); +info(help, clean) -> + info_help("Delete *.peg build results"). + +info_help(Description) -> ?CONSOLE( - "Build Neotoma (*.peg) sources.~n" + "~s.~n" "~n" "Valid rebar.config options:~n" " ~p~n", [ + Description, {neotoma_opts, [{doc_root, "src"}, {out_dir, "src"}, {source_ext, ".peg"}, diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index a5cc0ff..6a62d34 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -296,7 +296,7 @@ vcs_vsn(Config, Vsn, Dir) -> VsnString = vcs_vsn_1(Vsn, Dir), Cache1 = dict:store(Key, VsnString, Cache), Config1 = rebar_config:set_xconf(Config, vsn_cache, Cache1), - save_vsn_cache(Config1), + _ = save_vsn_cache(Config1), {Config1, VsnString}; {ok, VsnString} -> {Config, VsnString} diff --git a/src/rebar_xref.erl b/src/rebar_xref.erl index ee3414d..ddfb029 100644 --- a/src/rebar_xref.erl +++ b/src/rebar_xref.erl @@ -40,6 +40,8 @@ %% for internal use only -export([info/2]). +-dialyzer({no_opaque, find_function_source/4}). + %% =================================================================== %% Public API %% =================================================================== diff --git a/test/rebar_compiler_tests.erl b/test/rebar_compiler_tests.erl index 104a7d8..2afbc92 100644 --- a/test/rebar_compiler_tests.erl +++ b/test/rebar_compiler_tests.erl @@ -30,8 +30,6 @@ %% ------------------------------------------------------------------- -module(rebar_compiler_tests). --compile(export_all). - -include_lib("eunit/include/eunit.hrl"). %% Assuming this test is run inside the rebar 'eunit' @@ -167,19 +165,11 @@ prepare_rebar_script() -> ?TMP_DIR ++ "rebar.cmd") end. -rebar() -> - rebar([]). - rebar(Args) when is_list(Args) -> Out = os:cmd(filename:nativename("./rebar") ++ " " ++ Args), %% ?debugMsg("**** Begin"), ?debugMsg(Out), ?debugMsg("**** End"), Out. -assert_dirs_in(Name, [Dir|T]) -> - [{Name ++ " has directory: " ++ Dir, ?_assert(filelib:is_dir(Dir))} | - assert_dirs_in(Name, T)]; -assert_dirs_in(_, []) -> []. - assert_files_in(Name, [File|T]) -> [{Name ++ " has file: " ++ File, ?_assert(filelib:is_regular(File))} | assert_files_in(Name, T)]; diff --git a/test/rebar_dia_tests.erl b/test/rebar_dia_tests.erl index 556a552..0561bbb 100644 --- a/test/rebar_dia_tests.erl +++ b/test/rebar_dia_tests.erl @@ -2,8 +2,6 @@ %% ex: ts=4 sw=4 et -module(rebar_dia_tests). --compile([export_all]). - -include_lib("eunit/include/eunit.hrl"). -define(REBAR_SCRIPT, "../rebar"). @@ -12,7 +10,7 @@ dia_test_() -> case supported_otp_version() of - true -> + true -> {"Test the dia compiler", setup, fun() -> setup_project(), rebar("compile") end, fun teardown/1, @@ -22,7 +20,7 @@ dia_test_() -> {"Check include is created", ?_assert(filelib:is_dir("include") =:= true)}, - + {"Check dia/a.dia is compiled", ?_assert(string:str(RebarOut, "Compiled dia/a.dia") /= 0)}, @@ -62,7 +60,7 @@ dia_test_() -> supported_otp_version() -> Min = rebar_require_vsn:version_tuple(keep_going, "15", "configured"), - Otp = rebar_require_vsn:version_tuple(keep_going, + Otp = rebar_require_vsn:version_tuple(keep_going, erlang:system_info(otp_release), "OTP Release"), Otp >= Min. @@ -108,9 +106,5 @@ prepare_rebar_script() -> ?TMP_DIR ++ "rebar.cmd") end. -rebar() -> - rebar([]). - rebar(Args) when is_list(Args) -> - Out = os:cmd(filename:nativename("./rebar") ++ " " ++ Args), - Out. + os:cmd(filename:nativename("./rebar") ++ " " ++ Args). diff --git a/test/rebar_eunit_tests.erl b/test/rebar_eunit_tests.erl index d481dae..cf1e696 100644 --- a/test/rebar_eunit_tests.erl +++ b/test/rebar_eunit_tests.erl @@ -30,8 +30,6 @@ %% ------------------------------------------------------------------- -module(rebar_eunit_tests). --compile(export_all). - -include_lib("eunit/include/eunit.hrl"). %% Assuming this test is run inside the rebar 'eunit' @@ -412,7 +410,6 @@ code_path_test_() -> -define(myapp_mymod_tests, ["-module(myapp_mymod_tests).\n", - "-compile([export_all]).\n", "-include_lib(\"eunit/include/eunit.hrl\").\n", "myfunc_test() -> ?assertMatch(ok, myapp_mymod:myfunc()).\n"]). @@ -426,7 +423,6 @@ code_path_test_() -> -define(myapp_mymod2_tests, ["-module(myapp_mymod2_tests).\n", - "-compile([export_all]).\n", "-include_lib(\"eunit/include/eunit.hrl\").\n", "myfunc2_test() -> ?assertMatch(ok, myapp_mymod2:myfunc2()).\n", "common_name_test() -> ?assert(true).\n"]). @@ -459,7 +455,6 @@ code_path_test_() -> -define(myapp_mymod_defined_in_mysuite_tests, ["-module(myapp_mymod_defined_in_mysuite_tests).\n", - "-compile([export_all]).\n", "-include_lib(\"eunit/include/eunit.hrl\").\n", "myfunc_test() -> ?assertMatch(ok, myapp_mymod:myfunc()).\n"]). @@ -537,9 +532,6 @@ prepare_rebar_script() -> ?TMP_DIR ++ "rebar.cmd") end. -rebar() -> - rebar([]). - rebar(Args) when is_list(Args) -> Out = os:cmd(filename:nativename("./rebar") ++ " " ++ Args), %% ?debugMsg("**** Begin"), ?debugMsg(Out), ?debugMsg("**** End"), diff --git a/test/rebar_file_utils_tests.erl b/test/rebar_file_utils_tests.erl index c9b4192..ca5edf0 100644 --- a/test/rebar_file_utils_tests.erl +++ b/test/rebar_file_utils_tests.erl @@ -30,8 +30,6 @@ %% ------------------------------------------------------------------- -module(rebar_file_utils_tests). --compile(export_all). - -include_lib("eunit/include/eunit.hrl"). -define(TMP_DIR, "tmp_file_utils"). diff --git a/test/rebar_require_vsn_tests.erl b/test/rebar_require_vsn_tests.erl index a934e8e..43333d3 100644 --- a/test/rebar_require_vsn_tests.erl +++ b/test/rebar_require_vsn_tests.erl @@ -2,8 +2,6 @@ %% ex: ts=4 sw=4 et -module(rebar_require_vsn_tests). --compile(export_all). - -include_lib("eunit/include/eunit.hrl"). version_tuple_test_() -> diff --git a/test/rebar_utils_tests.erl b/test/rebar_utils_tests.erl index 9bc393a..81f5c92 100644 --- a/test/rebar_utils_tests.erl +++ b/test/rebar_utils_tests.erl @@ -30,8 +30,6 @@ %% ------------------------------------------------------------------- -module(rebar_utils_tests). --compile(export_all). - -include_lib("eunit/include/eunit.hrl"). expand_env_variable_test_() -> diff --git a/test/rebar_xref_eunit.erl b/test/rebar_xref_eunit.erl index f32ea46..13d8a5e 100644 --- a/test/rebar_xref_eunit.erl +++ b/test/rebar_xref_eunit.erl @@ -2,8 +2,6 @@ %% ex: ts=4 sw=4 et -module(rebar_xref_eunit). --compile(export_all). - -include_lib("eunit/include/eunit.hrl"). -define(REBAR_SCRIPT, "../rebar"). @@ -16,31 +14,31 @@ xref_test_() -> fun teardown/1, fun(RebarOut) -> [ - {"Undefined function", ?_assert(string:str(RebarOut, + {"Undefined function", ?_assert(string:str(RebarOut, "myapp_somemod:notavailable/1 is undefined function") =/= 0)}, - {"Undefined function call", ?_assert(string:str(RebarOut, + {"Undefined function call", ?_assert(string:str(RebarOut, "myapp_othermod:somefunc/0 calls undefined function myapp_somemod:notavailable/1") =/= 0)}, - {"Deprecated function", ?_assert(string:str(RebarOut, + {"Deprecated function", ?_assert(string:str(RebarOut, "myapp_mymod:fdeprecated/0 is deprecated function") =/= 0)}, - {"Deprecated function call", ?_assert(string:str(RebarOut, + {"Deprecated function call", ?_assert(string:str(RebarOut, "myapp_othermod:somefunc/0 calls deprecated function myapp_mymod:fdeprecated/0") =/= 0)}, - {"Unused local", ?_assert(string:str(RebarOut, + {"Unused local", ?_assert(string:str(RebarOut, "myapp_mymod:localfunc2/0 is unused local function") =/= 0)}, - {"Unused export 1", ?_assert(string:str(RebarOut, + {"Unused export 1", ?_assert(string:str(RebarOut, "myapp_behaviour1:behaviour_info/1 is unused export") =/= 0)}, - {"Unused export 2", ?_assert(string:str(RebarOut, + {"Unused export 2", ?_assert(string:str(RebarOut, "myapp_behaviour2:behaviour_info/1 is unused export") =/= 0)}, - {"Unused export 3", ?_assert(string:str(RebarOut, + {"Unused export 3", ?_assert(string:str(RebarOut, "myapp_mymod:other2/1 is unused export") =/= 0)}, - {"Unused export 4", ?_assert(string:str(RebarOut, + {"Unused export 4", ?_assert(string:str(RebarOut, "myapp_othermod:somefunc/0 is unused export") =/= 0)}, - {"Suppressed behaviour export 1", ?_assert(string:str(RebarOut, + {"Suppressed behaviour export 1", ?_assert(string:str(RebarOut, "myapp_mymod:bh1_a/1 is unused export") =:= 0)}, - {"Suppressed behaviour export 2", ?_assert(string:str(RebarOut, + {"Suppressed behaviour export 2", ?_assert(string:str(RebarOut, "myapp_mymod:bh1_b/1 is unused export") =:= 0)}, - {"Suppressed behaviour export 3", ?_assert(string:str(RebarOut, + {"Suppressed behaviour export 3", ?_assert(string:str(RebarOut, "myapp_mymod:bh2_a/1 is unused export") =:= 0)}, - {"Suppressed behaviour export 4", ?_assert(string:str(RebarOut, + {"Suppressed behaviour export 4", ?_assert(string:str(RebarOut, "myapp_mymod:bh2_b/1 is unused export") =:= 0)} ] end}. @@ -51,31 +49,31 @@ xref_ignore_test_() -> fun teardown/1, fun(RebarOut) -> [ - {"Undefined function can not be suppressed.", ?_assert(string:str(RebarOut, + {"Undefined function can not be suppressed.", ?_assert(string:str(RebarOut, "myapp_somemod:notavailable/1 is undefined function") =/= 0)}, - {"Supppressed undefined function call", ?_assert(string:str(RebarOut, + {"Supppressed undefined function call", ?_assert(string:str(RebarOut, "myapp_othermod:somefunc/0 calls undefined function myapp_somemod:notavailable/1") =:= 0)}, - {"Supppressed deprecated function", ?_assert(string:str(RebarOut, + {"Supppressed deprecated function", ?_assert(string:str(RebarOut, "myapp_mymod:fdeprecated/0 is deprecated function") =:= 0)}, - {"Supppressed deprecated function call", ?_assert(string:str(RebarOut, + {"Supppressed deprecated function call", ?_assert(string:str(RebarOut, "myapp_othermod:somefunc/0 calls deprecated function myapp_mymod:fdeprecated/0") =:= 0)}, - {"Supppressed unused local", ?_assert(string:str(RebarOut, + {"Supppressed unused local", ?_assert(string:str(RebarOut, "myapp_mymod:localfunc2/0 is unused local function") =:= 0)}, - {"Supppressed unused export 1", ?_assert(string:str(RebarOut, + {"Supppressed unused export 1", ?_assert(string:str(RebarOut, "myapp_behaviour1:behaviour_info/1 is unused export") =:= 0)}, - {"Supppressed unused export 2", ?_assert(string:str(RebarOut, + {"Supppressed unused export 2", ?_assert(string:str(RebarOut, "myapp_behaviour2:behaviour_info/1 is unused export") =:= 0)}, - {"Supppressed unused export 3", ?_assert(string:str(RebarOut, + {"Supppressed unused export 3", ?_assert(string:str(RebarOut, "myapp_mymod:other2/1 is unused export") =:= 0)}, - {"Supppressed unused export 4", ?_assert(string:str(RebarOut, + {"Supppressed unused export 4", ?_assert(string:str(RebarOut, "myapp_othermod:somefunc/0 is unused export") =:= 0)}, - {"Suppressed behaviour export 1", ?_assert(string:str(RebarOut, + {"Suppressed behaviour export 1", ?_assert(string:str(RebarOut, "myapp_mymod:bh1_a/1 is unused export") =:= 0)}, - {"Suppressed behaviour export 2", ?_assert(string:str(RebarOut, + {"Suppressed behaviour export 2", ?_assert(string:str(RebarOut, "myapp_mymod:bh1_b/1 is unused export") =:= 0)}, - {"Suppressed behaviour export 3", ?_assert(string:str(RebarOut, + {"Suppressed behaviour export 3", ?_assert(string:str(RebarOut, "myapp_mymod:bh2_a/1 is unused export") =:= 0)}, - {"Suppressed behaviour export 4", ?_assert(string:str(RebarOut, + {"Suppressed behaviour export 4", ?_assert(string:str(RebarOut, "myapp_mymod:bh2_b/1 is unused export") =:= 0)} ] @@ -116,7 +114,7 @@ xref_ignore_test_() -> "bh2_a(A) -> localfunc1(bh2_a, A).\n", "bh2_b(A) -> localfunc1(bh2_b, A).\n", "other1(A) -> localfunc1(other1, A).\n", % regular exported functions - "other2(A) -> localfunc1(other2, A).\n", + "other2(A) -> localfunc1(other2, A).\n", "localfunc1(A, B) -> {A, B}.\n", % used local "localfunc2() -> ok.\n", % unused local "fdeprecated() -> ok.\n" % deprecated function @@ -155,7 +153,7 @@ setup_environment() -> prepare_project() -> setup_environment(), rebar("create-app appid=myapp"), - ok = file:make_dir("ebin"). + ok = file:make_dir("ebin"). setup_project(ignore_xref) -> prepare_project(), @@ -196,9 +194,6 @@ prepare_rebar_script() -> ?TMP_DIR ++ "rebar.cmd") end. -rebar() -> - rebar([]). - rebar(Args) when is_list(Args) -> Out = os:cmd(filename:nativename("./rebar") ++ " " ++ Args), %% ?debugMsg("**** Begin"), ?debugMsg(Out), ?debugMsg("**** End"),
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor