From 36bc1e12997057b5333403936d5fac8846e57be8 Mon Sep 17 00:00:00 2001 From: Philipp Huebner Date: Mon, 27 Dec 2021 20:09:21 +0100 Subject: [PATCH] New upstream version 3.17.0 --- .editorconfig | 13 + CONTRIBUTING.md | 322 ++ Dockerfile | 43 + LICENSE | 178 + README.md | 170 + THANKS | 148 + _build/default/lib/bbmustache/LICENSE | 22 + _build/default/lib/bbmustache/README.md | 175 + _build/default/lib/bbmustache/rebar.config | 63 + _build/default/lib/bbmustache/rebar.lock | 1 + .../lib/bbmustache/src/bbmustache.app.src | 9 + .../default/lib/bbmustache/src/bbmustache.erl | 799 ++++ _build/default/lib/certifi/LICENSE | 29 + _build/default/lib/certifi/README.md | 33 + _build/default/lib/certifi/priv/cacerts.pem | 4209 +++++++++++++++++ _build/default/lib/certifi/rebar.config | 5 + .../default/lib/certifi/src/certifi.app.src | 11 + _build/default/lib/certifi/src/certifi.erl | 27 + _build/default/lib/certifi/src/certifi_pt.erl | 25 + .../lib/certifi/test/certifi_tests.erl | 18 + _build/default/lib/cf/LICENSE | 29 + _build/default/lib/cf/README.md | 40 + _build/default/lib/cf/rebar.config | 8 + _build/default/lib/cf/rebar.lock | 1 + _build/default/lib/cf/src/cf.app.src | 10 + _build/default/lib/cf/src/cf.erl | 196 + _build/default/lib/cf/src/cf_term.erl | 370 ++ _build/default/lib/cth_readable/LICENSE | 29 + _build/default/lib/cth_readable/README.md | 159 + _build/default/lib/cth_readable/rebar.config | 20 + .../lib/cth_readable/rebar.config.script | 10 + _build/default/lib/cth_readable/rebar.lock | 8 + .../lib/cth_readable/src/cth_readable.app.src | 9 + .../src/cth_readable_compact_shell.erl | 140 + .../src/cth_readable_failonly.erl | 499 ++ .../cth_readable/src/cth_readable_helpers.erl | 163 + .../src/cth_readable_lager_backend.erl | 147 + .../cth_readable/src/cth_readable_nosasl.erl | 100 + .../cth_readable/src/cth_readable_shell.erl | 135 + .../src/cth_readable_transform.erl | 17 + _build/default/lib/cth_readable/src/cthr.erl | 140 + _build/default/lib/erlware_commons/README.md | 142 + .../erlware_commons/include/ec_cmd_log.hrl | 24 + .../erlware_commons/priv/ec_semver_parser.peg | 9 + .../default/lib/erlware_commons/rebar.config | 33 + .../lib/erlware_commons/rebar.config.script | 17 + _build/default/lib/erlware_commons/rebar.lock | 8 + .../lib/erlware_commons/src/ec_assoc_list.erl | 106 + .../lib/erlware_commons/src/ec_cmd_log.erl | 303 ++ .../lib/erlware_commons/src/ec_cnv.erl | 247 + .../lib/erlware_commons/src/ec_compile.erl | 131 + .../lib/erlware_commons/src/ec_date.erl | 1105 +++++ .../lib/erlware_commons/src/ec_dict.erl | 114 + .../lib/erlware_commons/src/ec_dictionary.erl | 176 + .../lib/erlware_commons/src/ec_file.erl | 478 ++ .../lib/erlware_commons/src/ec_gb_trees.erl | 213 + .../lib/erlware_commons/src/ec_git_vsn.erl | 124 + .../lib/erlware_commons/src/ec_lists.erl | 246 + .../lib/erlware_commons/src/ec_orddict.erl | 110 + .../lib/erlware_commons/src/ec_plists.erl | 975 ++++ .../lib/erlware_commons/src/ec_rbdict.erl | 322 ++ .../lib/erlware_commons/src/ec_semver.erl | 763 +++ .../erlware_commons/src/ec_semver_parser.erl | 302 ++ .../lib/erlware_commons/src/ec_talk.erl | 229 + .../lib/erlware_commons/src/ec_vsn.erl | 66 + .../src/erlware_commons.app.src | 11 + _build/default/lib/eunit_formatters/LICENSE | 67 + _build/default/lib/eunit_formatters/README.md | 54 + .../default/lib/eunit_formatters/rebar.config | 3 + .../default/lib/eunit_formatters/rebar.lock | 1 + .../eunit_formatters/src/binomial_heap.erl | 117 + .../src/eunit_formatters.app.src | 9 + .../eunit_formatters/src/eunit_progress.erl | 467 ++ _build/default/lib/getopt/LICENSE.txt | 27 + _build/default/lib/getopt/README.md | 487 ++ _build/default/lib/getopt/rebar.config | 30 + _build/default/lib/getopt/rebar.lock | 1 + _build/default/lib/getopt/src/getopt.app.src | 9 + _build/default/lib/getopt/src/getopt.erl | 947 ++++ _build/default/lib/providers/LICENSE | 202 + _build/default/lib/providers/README.md | 9 + .../lib/providers/include/providers.hrl | 7 + _build/default/lib/providers/rebar.config | 5 + _build/default/lib/providers/rebar.lock | 6 + _build/default/lib/providers/src/provider.erl | 25 + .../lib/providers/src/providers.app.src | 7 + .../default/lib/providers/src/providers.erl | 327 ++ .../lib/providers/src/providers_topo.erl | 109 + _build/default/lib/relx/LICENSE.md | 194 + _build/default/lib/relx/README.md | 44 + _build/default/lib/relx/priv/templates/bin | 95 + .../lib/relx/priv/templates/bin_windows | 108 + .../lib/relx/priv/templates/bin_windows_ps | 48 + .../lib/relx/priv/templates/builtin_hook_pid | 12 + .../relx/priv/templates/builtin_hook_status | 3 + .../templates/builtin_hook_wait_for_process | 17 + .../templates/builtin_hook_wait_for_vm_start | 7 + .../default/lib/relx/priv/templates/erl_ini | 4 + .../lib/relx/priv/templates/erl_script | 13 + .../lib/relx/priv/templates/extended_bin | 1024 ++++ .../relx/priv/templates/extended_bin_windows | 371 ++ .../priv/templates/extended_bin_windows_ps | 465 ++ .../priv/templates/install_upgrade_escript | 337 ++ .../default/lib/relx/priv/templates/nodetool | 197 + _build/default/lib/relx/priv/templates/psutil | 175 + .../lib/relx/priv/templates/sys_config | 9 + .../default/lib/relx/priv/templates/vm_args | 37 + _build/default/lib/relx/rebar.config | 62 + _build/default/lib/relx/rebar.lock | 8 + _build/default/lib/relx/src/relx.app.src | 8 + _build/default/lib/relx/src/relx.erl | 208 + _build/default/lib/relx/src/relx.hrl | 28 + _build/default/lib/relx/src/rlx_app_info.erl | 139 + _build/default/lib/relx/src/rlx_assemble.erl | 1090 +++++ _build/default/lib/relx/src/rlx_config.erl | 295 ++ .../default/lib/relx/src/rlx_file_utils.erl | 399 ++ _build/default/lib/relx/src/rlx_log.erl | 7 + _build/default/lib/relx/src/rlx_log.hrl | 14 + _build/default/lib/relx/src/rlx_overlay.erl | 460 ++ _build/default/lib/relx/src/rlx_release.erl | 371 ++ _build/default/lib/relx/src/rlx_relup.erl | 107 + _build/default/lib/relx/src/rlx_resolve.erl | 217 + _build/default/lib/relx/src/rlx_state.erl | 475 ++ _build/default/lib/relx/src/rlx_string.erl | 37 + _build/default/lib/relx/src/rlx_tar.erl | 241 + _build/default/lib/relx/src/rlx_util.erl | 284 ++ _build/default/lib/ssl_verify_fun/LICENSE | 22 + _build/default/lib/ssl_verify_fun/Makefile | 22 + _build/default/lib/ssl_verify_fun/README.md | 191 + _build/default/lib/ssl_verify_fun/mix.exs | 24 + .../default/lib/ssl_verify_fun/rebar.config | 1 + .../src/ssl_verify_fingerprint.erl | 73 + .../ssl_verify_fun/src/ssl_verify_fun.app.src | 14 + .../src/ssl_verify_fun_cert_helpers.erl | 81 + .../src/ssl_verify_fun_encodings.erl | 84 + .../src/ssl_verify_hostname.erl | 214 + .../lib/ssl_verify_fun/src/ssl_verify_pk.erl | 103 + .../ssl_verify_fun/src/ssl_verify_string.erl | 118 + .../ssl_verify_fun/src/ssl_verify_util.erl | 28 + bootstrap | 843 ++++ bootstrap.bat | 2 + bootstrap.ps1 | 1 + hex/packages.idx | Bin 0 -> 60856 bytes manpages/commands | 25 + manpages/rebar3.1 | 441 ++ pr2relnotes.sh | 25 + priv/shell-completion/bash/rebar3 | 229 + priv/shell-completion/fish/rebar3.fish | 209 + priv/shell-completion/zsh/_rebar3 | 288 ++ priv/templates/LICENSE | 191 + priv/templates/Makefile | 74 + priv/templates/README.md | 9 + priv/templates/app.erl | 18 + priv/templates/app.template | 12 + priv/templates/app_rebar.config | 7 + priv/templates/cmake.template | 2 + priv/templates/escript.template | 11 + priv/templates/escript_README.md | 14 + priv/templates/escript_mod.erl | 17 + priv/templates/escript_rebar.config | 13 + priv/templates/gitignore | 19 + priv/templates/lib.template | 11 + priv/templates/mod.erl | 3 + priv/templates/otp_app.app.src | 16 + priv/templates/otp_lib.app.src | 14 + priv/templates/plugin.erl | 8 + priv/templates/plugin.template | 12 + priv/templates/plugin_README.md | 27 + priv/templates/provider.erl | 32 + priv/templates/rebar.config | 2 + priv/templates/release.template | 14 + priv/templates/relx_rebar.config | 33 + priv/templates/sup.erl | 36 + priv/templates/sys.config | 4 + priv/templates/umbrella.template | 15 + priv/templates/vm.args | 6 + rebar.config | 94 + rebar.config.sample | 279 ++ rebar.config.script | 1 + rebar.lock | 35 + src/cth_fail_fast.erl | 118 + src/cth_retry.erl | 159 + src/r3.erl | 66 + src/rebar.app.src.script | 89 + src/rebar.hrl | 77 + src/rebar3.erl | 464 ++ src/rebar_agent.erl | 348 ++ src/rebar_api.erl | 108 + src/rebar_app_discover.erl | 546 +++ src/rebar_app_info.erl | 726 +++ src/rebar_app_utils.erl | 398 ++ src/rebar_base_compiler.erl | 286 ++ src/rebar_compiler.erl | 419 ++ src/rebar_compiler_dag.erl | 596 +++ src/rebar_compiler_epp.erl | 288 ++ src/rebar_compiler_erl.erl | 480 ++ src/rebar_compiler_mib.erl | 163 + src/rebar_compiler_xrl.erl | 64 + src/rebar_compiler_yrl.erl | 51 + src/rebar_config.erl | 424 ++ src/rebar_core.erl | 184 + src/rebar_dialyzer_format.erl | 456 ++ src/rebar_digraph.erl | 114 + src/rebar_dir.erl | 381 ++ src/rebar_dist_utils.erl | 111 + src/rebar_env.erl | 88 + src/rebar_erlc_compiler.erl | 848 ++++ src/rebar_fetch.erl | 84 + src/rebar_file_utils.erl | 602 +++ src/rebar_git_resource.erl | 393 ++ src/rebar_git_subdir_resource.erl | 93 + src/rebar_hex_repos.erl | 211 + src/rebar_hg_resource.erl | 212 + src/rebar_hooks.erl | 113 + src/rebar_httpc_adapter.erl | 41 + src/rebar_log.erl | 166 + src/rebar_opts.erl | 304 ++ src/rebar_otp_app.erl | 250 + src/rebar_packages.erl | 464 ++ src/rebar_parallel.erl | 56 + src/rebar_paths.erl | 241 + src/rebar_pkg_resource.erl | 299 ++ src/rebar_plugins.erl | 174 + src/rebar_prv_alias.erl | 140 + src/rebar_prv_app_discovery.erl | 69 + src/rebar_prv_as.erl | 108 + src/rebar_prv_bare_compile.erl | 86 + src/rebar_prv_clean.erl | 104 + src/rebar_prv_common_test.erl | 959 ++++ src/rebar_prv_compile.erl | 539 +++ src/rebar_prv_cover.erl | 443 ++ src/rebar_prv_deps.erl | 148 + src/rebar_prv_deps_tree.erl | 93 + src/rebar_prv_dialyzer.erl | 671 +++ src/rebar_prv_do.erl | 117 + src/rebar_prv_edoc.erl | 120 + src/rebar_prv_escriptize.erl | 340 ++ src/rebar_prv_eunit.erl | 581 +++ src/rebar_prv_get_deps.erl | 37 + src/rebar_prv_help.erl | 82 + src/rebar_prv_install_deps.erl | 447 ++ src/rebar_prv_local_install.erl | 104 + src/rebar_prv_local_upgrade.erl | 142 + src/rebar_prv_lock.erl | 72 + src/rebar_prv_new.erl | 161 + src/rebar_prv_packages.erl | 102 + src/rebar_prv_path.erl | 132 + src/rebar_prv_plugins.erl | 92 + src/rebar_prv_plugins_upgrade.erl | 127 + src/rebar_prv_release.erl | 40 + src/rebar_prv_relup.erl | 40 + src/rebar_prv_report.erl | 103 + src/rebar_prv_repos.erl | 47 + src/rebar_prv_shell.erl | 668 +++ src/rebar_prv_state.erl | 44 + src/rebar_prv_tar.erl | 39 + src/rebar_prv_unlock.erl | 82 + src/rebar_prv_update.erl | 59 + src/rebar_prv_upgrade.erl | 280 ++ src/rebar_prv_version.erl | 41 + src/rebar_prv_xref.erl | 313 ++ src/rebar_relx.erl | 283 ++ src/rebar_resource.erl | 54 + src/rebar_resource_v2.erl | 155 + src/rebar_state.erl | 548 +++ src/rebar_string.erl | 55 + src/rebar_templater.erl | 483 ++ src/rebar_uri.erl | 212 + src/rebar_user.erl | 757 +++ src/rebar_utils.erl | 1240 +++++ src/vendored/r3_hex_api.erl | 142 + src/vendored/r3_hex_api_key.erl | 159 + src/vendored/r3_hex_api_package.erl | 51 + src/vendored/r3_hex_api_package_owner.erl | 98 + src/vendored/r3_hex_api_release.erl | 173 + src/vendored/r3_hex_api_user.erl | 98 + src/vendored/r3_hex_core.erl | 95 + src/vendored/r3_hex_core.hrl | 3 + src/vendored/r3_hex_erl_tar.erl | 2016 ++++++++ src/vendored/r3_hex_erl_tar.hrl | 411 ++ src/vendored/r3_hex_filename.erl | 60 + src/vendored/r3_hex_http.erl | 53 + src/vendored/r3_hex_http_httpc.erl | 41 + src/vendored/r3_hex_pb_names.erl | 879 ++++ src/vendored/r3_hex_pb_package.erl | 1932 ++++++++ src/vendored/r3_hex_pb_signed.erl | 701 +++ src/vendored/r3_hex_pb_versions.erl | 1102 +++++ src/vendored/r3_hex_registry.erl | 133 + src/vendored/r3_hex_repo.erl | 176 + src/vendored/r3_hex_tarball.erl | 574 +++ src/vendored/r3_safe_erl_term.xrl | 79 + systest/all_SUITE.erl | 117 + .../all_SUITE_data/alias_clash/rebar.config | 4 + .../alias_clash/src/alias_clash.app.src | 15 + .../alias_clash/src/alias_clash.erl | 13 + .../all_SUITE_data/compile_deps/rebar.config | 8 + .../compile_deps/rebar.config.script | 2 + .../vendored/fake_dep/rebar.config | 2 + .../vendored/fake_dep/src/fake_dep.app.src | 15 + .../vendored/fake_dep/src/fake_dep.erl | 13 + .../all_SUITE_data/grisp_explode/rebar.config | 16 + .../all_SUITE_data/grisp_explode/rebar.lock | 8 + .../grisp_explode/src/mygrispproject.app.src | 17 + .../grisp_explode/src/mygrispproject.erl | 15 + .../grisp_explode/src/mygrispproject_sup.erl | 19 + .../resource_plugins/rebar.config | 23 + test/mock_git_resource.erl | 139 + test/mock_git_subdir_resource.erl | 142 + test/mock_pkg_resource.erl | 199 + test/rebar_alias_SUITE.erl | 165 + test/rebar_as_SUITE.erl | 201 + test/rebar_compile_SUITE.erl | 3074 ++++++++++++ test/rebar_compiler_dag_SUITE.erl | 468 ++ test/rebar_compiler_epp_SUITE.erl | 300 ++ test/rebar_cover_SUITE.erl | 322 ++ test/rebar_ct_SUITE.erl | 1680 +++++++ test/rebar_deps_SUITE.erl | 594 +++ test/rebar_dialyzer_SUITE.erl | 473 ++ test/rebar_dir_SUITE.erl | 335 ++ test/rebar_disable_app_SUITE.erl | 49 + test/rebar_discover_SUITE.erl | 113 + test/rebar_dist_utils_SUITE.erl | 74 + test/rebar_edoc_SUITE.erl | 135 + .../bad/apps/bad_bar1/src/bad_bar1.app.src | 16 + .../bad/apps/bad_bar1/src/bad_bar1.erl | 9 + .../bad/apps/bad_bar1/src/bad_bar1_app.erl | 26 + .../bad/apps/bad_bar1/src/bad_bar1_sup.erl | 35 + .../bad/apps/bad_bar2/src/bad_bar2.app.src | 16 + .../bad/apps/bad_bar2/src/bad_bar2.erl | 12 + .../bad/apps/bad_bar2/src/bad_bar2_app.erl | 26 + .../bad/apps/bad_bar2/src/bad_bar2_sup.erl | 35 + .../bad/apps/bad_foo/src/bad_foo.app.src | 18 + .../bad/apps/bad_foo/src/bad_foo.erl | 19 + .../bad/apps/bad_foo/src/bad_foo_app.erl | 26 + .../bad/apps/bad_foo/src/bad_foo_sup.erl | 35 + .../foo/apps/bar1/src/bar1.app.src | 16 + .../foo/apps/bar1/src/bar1.erl | 9 + .../foo/apps/bar1/src/bar1_app.erl | 26 + .../foo/apps/bar1/src/bar1_sup.erl | 35 + .../foo/apps/bar2/src/bar2.app.src | 16 + .../foo/apps/bar2/src/bar2.erl | 9 + .../foo/apps/bar2/src/bar2_app.erl | 26 + .../foo/apps/bar2/src/bar2_sup.erl | 35 + .../foo/apps/foo/rebar.config | 1 + .../foo/apps/foo/src/foo.app.src | 17 + .../foo/apps/foo/src/foo.erl | 19 + .../foo/apps/foo/src/foo_app.erl | 26 + .../foo/apps/foo/src/foo_sup.erl | 35 + test/rebar_edoc_SUITE_data/foo/rebar.config | 1 + test/rebar_escriptize_SUITE.erl | 95 + test/rebar_eunit_SUITE.erl | 667 +++ test/rebar_eunit_SUITE_data/basic_app.zip | Bin 0 -> 1735 bytes test/rebar_eunit_SUITE_data/deflate | 15 + test/rebar_eunit_SUITE_data/inflate | 15 + test/rebar_eunit_SUITE_data/multi_app.zip | Bin 0 -> 5482 bytes test/rebar_eunit_SUITE_data/syscfg_app.zip | Bin 0 -> 2289 bytes test/rebar_file_utils_SUITE.erl | 383 ++ test/rebar_hooks_SUITE.erl | 267 ++ test/rebar_install_deps_SUITE.erl | 493 ++ test/rebar_localfs_resource.erl | 44 + test/rebar_localfs_resource_v2.erl | 50 + test/rebar_lock_SUITE.erl | 115 + test/rebar_namespace_SUITE.erl | 149 + test/rebar_new_SUITE.erl | 171 + .../.rebar3/templates/app/LICENSE.dtl | 29 + .../.rebar3/templates/app/README.md.dtl | 9 + .../.rebar3/templates/app/app.erl.dtl | 27 + .../.rebar3/templates/app/gitignore.dtl | 18 + .../.rebar3/templates/app/otp_app.app.src.dtl | 12 + .../.rebar3/templates/app/rebar.config.dtl | 2 + .../.rebar3/templates/app/sup.erl.dtl | 35 + .../.rebar3/templates/app/test_app.template | 12 + .../.rebar3/templates/bad_index/LICENSE.dtl | 29 + .../.rebar3/templates/bad_index/README.md.dtl | 9 + .../.rebar3/templates/bad_index/app.erl.dtl | 27 + .../templates/bad_index/bad_index.template | 13 + .../.rebar3/templates/bad_index/gitignore.dtl | 18 + .../templates/bad_index/otp_app.app.src.dtl | 12 + .../templates/bad_index/rebar.config.dtl | 2 + .../.rebar3/templates/bad_index/sup.erl.dtl | 35 + .../_checkouts/tpl/priv/module.erl.dtl | 2 + .../_checkouts/tpl/priv/tpl.template | 7 + .../plugin_tpl/_checkouts/tpl/rebar.config | 2 + .../plugin_tpl/_checkouts/tpl/src/tpl.app.src | 15 + .../plugin_tpl/_checkouts/tpl/src/tpl.erl | 8 + .../plugin_tpl/_checkouts/tpl/src/tpl_prv.erl | 32 + .../plugin_tpl/rebar.config | 3 + .../plugin_tpl/src/plugin_tpl.app.src | 15 + .../plugin_tpl/src/plugin_tpl.erl | 13 + test/rebar_opts_parser_SUITE.erl | 54 + test/rebar_paths_SUITE.erl | 296 ++ test/rebar_pkg_SUITE.erl | 349 ++ .../badindexchk-1.0.0.tar | Bin 0 -> 10240 bytes test/rebar_pkg_SUITE_data/badpkg-1.0.0.tar | Bin 0 -> 10240 bytes test/rebar_pkg_SUITE_data/goodpkg-1.0.0.tar | Bin 0 -> 10240 bytes test/rebar_pkg_alias_SUITE.erl | 282 ++ test/rebar_pkg_repos_SUITE.erl | 489 ++ test/rebar_plugins_SUITE.erl | 405 ++ test/rebar_profiles_SUITE.erl | 644 +++ test/rebar_release_SUITE.erl | 351 ++ test/rebar_resource_SUITE.erl | 43 + test/rebar_src_dirs_SUITE.erl | 326 ++ test/rebar_templater_SUITE.erl | 63 + test/rebar_test_utils.erl | 542 +++ test/rebar_unlock_SUITE.erl | 80 + test/rebar_unlock_SUITE_data/pkg.rebar.lock | 24 + test/rebar_unlock_SUITE_data/rebar.lock | 40 + test/rebar_upgrade_SUITE.erl | 810 ++++ test/rebar_uri_SUITE.erl | 50 + test/rebar_utils_SUITE.erl | 321 ++ test/rebar_xref_SUITE.erl | 256 + .../recursive/apps/rebar_issue1/rebar.config | 12 + .../rebar_issue1/src/rebar_issue1.app.src | 16 + .../rebar_issue1/src/rebar_issue1_app.erl | 26 + .../rebar_issue1/src/rebar_issue1_sup.erl | 35 + .../rebar_issue2/src/rebar_issue2.app.src | 17 + .../rebar_issue2/src/rebar_issue2_app.erl | 26 + .../rebar_issue2/src/rebar_issue2_sup.erl | 35 + vendor_hex_core.sh | 18 + 419 files changed, 79421 insertions(+) create mode 100644 .editorconfig create mode 100644 CONTRIBUTING.md create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md create mode 100644 THANKS create mode 100644 _build/default/lib/bbmustache/LICENSE create mode 100644 _build/default/lib/bbmustache/README.md create mode 100644 _build/default/lib/bbmustache/rebar.config create mode 100644 _build/default/lib/bbmustache/rebar.lock create mode 100644 _build/default/lib/bbmustache/src/bbmustache.app.src create mode 100644 _build/default/lib/bbmustache/src/bbmustache.erl create mode 100644 _build/default/lib/certifi/LICENSE create mode 100644 _build/default/lib/certifi/README.md create mode 100644 _build/default/lib/certifi/priv/cacerts.pem create mode 100644 _build/default/lib/certifi/rebar.config create mode 100644 _build/default/lib/certifi/src/certifi.app.src create mode 100644 _build/default/lib/certifi/src/certifi.erl create mode 100644 _build/default/lib/certifi/src/certifi_pt.erl create mode 100644 _build/default/lib/certifi/test/certifi_tests.erl create mode 100644 _build/default/lib/cf/LICENSE create mode 100644 _build/default/lib/cf/README.md create mode 100644 _build/default/lib/cf/rebar.config create mode 100644 _build/default/lib/cf/rebar.lock create mode 100644 _build/default/lib/cf/src/cf.app.src create mode 100644 _build/default/lib/cf/src/cf.erl create mode 100644 _build/default/lib/cf/src/cf_term.erl create mode 100644 _build/default/lib/cth_readable/LICENSE create mode 100644 _build/default/lib/cth_readable/README.md create mode 100644 _build/default/lib/cth_readable/rebar.config create mode 100644 _build/default/lib/cth_readable/rebar.config.script create mode 100644 _build/default/lib/cth_readable/rebar.lock create mode 100644 _build/default/lib/cth_readable/src/cth_readable.app.src create mode 100644 _build/default/lib/cth_readable/src/cth_readable_compact_shell.erl create mode 100644 _build/default/lib/cth_readable/src/cth_readable_failonly.erl create mode 100644 _build/default/lib/cth_readable/src/cth_readable_helpers.erl create mode 100644 _build/default/lib/cth_readable/src/cth_readable_lager_backend.erl create mode 100644 _build/default/lib/cth_readable/src/cth_readable_nosasl.erl create mode 100644 _build/default/lib/cth_readable/src/cth_readable_shell.erl create mode 100644 _build/default/lib/cth_readable/src/cth_readable_transform.erl create mode 100644 _build/default/lib/cth_readable/src/cthr.erl create mode 100644 _build/default/lib/erlware_commons/README.md create mode 100644 _build/default/lib/erlware_commons/include/ec_cmd_log.hrl create mode 100644 _build/default/lib/erlware_commons/priv/ec_semver_parser.peg create mode 100644 _build/default/lib/erlware_commons/rebar.config create mode 100644 _build/default/lib/erlware_commons/rebar.config.script create mode 100644 _build/default/lib/erlware_commons/rebar.lock create mode 100644 _build/default/lib/erlware_commons/src/ec_assoc_list.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_cmd_log.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_cnv.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_compile.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_date.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_dict.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_dictionary.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_file.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_gb_trees.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_git_vsn.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_lists.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_orddict.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_plists.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_rbdict.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_semver.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_semver_parser.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_talk.erl create mode 100644 _build/default/lib/erlware_commons/src/ec_vsn.erl create mode 100644 _build/default/lib/erlware_commons/src/erlware_commons.app.src create mode 100644 _build/default/lib/eunit_formatters/LICENSE create mode 100644 _build/default/lib/eunit_formatters/README.md create mode 100644 _build/default/lib/eunit_formatters/rebar.config create mode 100644 _build/default/lib/eunit_formatters/rebar.lock create mode 100644 _build/default/lib/eunit_formatters/src/binomial_heap.erl create mode 100644 _build/default/lib/eunit_formatters/src/eunit_formatters.app.src create mode 100644 _build/default/lib/eunit_formatters/src/eunit_progress.erl create mode 100644 _build/default/lib/getopt/LICENSE.txt create mode 100644 _build/default/lib/getopt/README.md create mode 100644 _build/default/lib/getopt/rebar.config create mode 100644 _build/default/lib/getopt/rebar.lock create mode 100644 _build/default/lib/getopt/src/getopt.app.src create mode 100644 _build/default/lib/getopt/src/getopt.erl create mode 100644 _build/default/lib/providers/LICENSE create mode 100644 _build/default/lib/providers/README.md create mode 100644 _build/default/lib/providers/include/providers.hrl create mode 100644 _build/default/lib/providers/rebar.config create mode 100644 _build/default/lib/providers/rebar.lock create mode 100644 _build/default/lib/providers/src/provider.erl create mode 100644 _build/default/lib/providers/src/providers.app.src create mode 100644 _build/default/lib/providers/src/providers.erl create mode 100644 _build/default/lib/providers/src/providers_topo.erl create mode 100644 _build/default/lib/relx/LICENSE.md create mode 100644 _build/default/lib/relx/README.md create mode 100644 _build/default/lib/relx/priv/templates/bin create mode 100644 _build/default/lib/relx/priv/templates/bin_windows create mode 100644 _build/default/lib/relx/priv/templates/bin_windows_ps create mode 100644 _build/default/lib/relx/priv/templates/builtin_hook_pid create mode 100644 _build/default/lib/relx/priv/templates/builtin_hook_status create mode 100644 _build/default/lib/relx/priv/templates/builtin_hook_wait_for_process create mode 100644 _build/default/lib/relx/priv/templates/builtin_hook_wait_for_vm_start create mode 100644 _build/default/lib/relx/priv/templates/erl_ini create mode 100644 _build/default/lib/relx/priv/templates/erl_script create mode 100644 _build/default/lib/relx/priv/templates/extended_bin create mode 100644 _build/default/lib/relx/priv/templates/extended_bin_windows create mode 100644 _build/default/lib/relx/priv/templates/extended_bin_windows_ps create mode 100644 _build/default/lib/relx/priv/templates/install_upgrade_escript create mode 100644 _build/default/lib/relx/priv/templates/nodetool create mode 100644 _build/default/lib/relx/priv/templates/psutil create mode 100644 _build/default/lib/relx/priv/templates/sys_config create mode 100644 _build/default/lib/relx/priv/templates/vm_args create mode 100644 _build/default/lib/relx/rebar.config create mode 100644 _build/default/lib/relx/rebar.lock create mode 100644 _build/default/lib/relx/src/relx.app.src create mode 100644 _build/default/lib/relx/src/relx.erl create mode 100644 _build/default/lib/relx/src/relx.hrl create mode 100644 _build/default/lib/relx/src/rlx_app_info.erl create mode 100644 _build/default/lib/relx/src/rlx_assemble.erl create mode 100644 _build/default/lib/relx/src/rlx_config.erl create mode 100644 _build/default/lib/relx/src/rlx_file_utils.erl create mode 100644 _build/default/lib/relx/src/rlx_log.erl create mode 100644 _build/default/lib/relx/src/rlx_log.hrl create mode 100644 _build/default/lib/relx/src/rlx_overlay.erl create mode 100644 _build/default/lib/relx/src/rlx_release.erl create mode 100644 _build/default/lib/relx/src/rlx_relup.erl create mode 100644 _build/default/lib/relx/src/rlx_resolve.erl create mode 100644 _build/default/lib/relx/src/rlx_state.erl create mode 100644 _build/default/lib/relx/src/rlx_string.erl create mode 100644 _build/default/lib/relx/src/rlx_tar.erl create mode 100644 _build/default/lib/relx/src/rlx_util.erl create mode 100644 _build/default/lib/ssl_verify_fun/LICENSE create mode 100644 _build/default/lib/ssl_verify_fun/Makefile create mode 100644 _build/default/lib/ssl_verify_fun/README.md create mode 100644 _build/default/lib/ssl_verify_fun/mix.exs create mode 100644 _build/default/lib/ssl_verify_fun/rebar.config create mode 100644 _build/default/lib/ssl_verify_fun/src/ssl_verify_fingerprint.erl create mode 100644 _build/default/lib/ssl_verify_fun/src/ssl_verify_fun.app.src create mode 100644 _build/default/lib/ssl_verify_fun/src/ssl_verify_fun_cert_helpers.erl create mode 100644 _build/default/lib/ssl_verify_fun/src/ssl_verify_fun_encodings.erl create mode 100644 _build/default/lib/ssl_verify_fun/src/ssl_verify_hostname.erl create mode 100644 _build/default/lib/ssl_verify_fun/src/ssl_verify_pk.erl create mode 100644 _build/default/lib/ssl_verify_fun/src/ssl_verify_string.erl create mode 100644 _build/default/lib/ssl_verify_fun/src/ssl_verify_util.erl create mode 100755 bootstrap create mode 100644 bootstrap.bat create mode 100644 bootstrap.ps1 create mode 100644 hex/packages.idx create mode 100644 manpages/commands create mode 100644 manpages/rebar3.1 create mode 100755 pr2relnotes.sh create mode 100644 priv/shell-completion/bash/rebar3 create mode 100644 priv/shell-completion/fish/rebar3.fish create mode 100644 priv/shell-completion/zsh/_rebar3 create mode 100644 priv/templates/LICENSE create mode 100644 priv/templates/Makefile create mode 100644 priv/templates/README.md create mode 100644 priv/templates/app.erl create mode 100644 priv/templates/app.template create mode 100644 priv/templates/app_rebar.config create mode 100644 priv/templates/cmake.template create mode 100644 priv/templates/escript.template create mode 100644 priv/templates/escript_README.md create mode 100644 priv/templates/escript_mod.erl create mode 100644 priv/templates/escript_rebar.config create mode 100644 priv/templates/gitignore create mode 100644 priv/templates/lib.template create mode 100644 priv/templates/mod.erl create mode 100644 priv/templates/otp_app.app.src create mode 100644 priv/templates/otp_lib.app.src create mode 100644 priv/templates/plugin.erl create mode 100644 priv/templates/plugin.template create mode 100644 priv/templates/plugin_README.md create mode 100644 priv/templates/provider.erl create mode 100644 priv/templates/rebar.config create mode 100644 priv/templates/release.template create mode 100644 priv/templates/relx_rebar.config create mode 100644 priv/templates/sup.erl create mode 100644 priv/templates/sys.config create mode 100644 priv/templates/umbrella.template create mode 100644 priv/templates/vm.args create mode 100644 rebar.config create mode 100644 rebar.config.sample create mode 100644 rebar.config.script create mode 100644 rebar.lock create mode 100644 src/cth_fail_fast.erl create mode 100644 src/cth_retry.erl create mode 100644 src/r3.erl create mode 100644 src/rebar.app.src.script create mode 100644 src/rebar.hrl create mode 100644 src/rebar3.erl create mode 100644 src/rebar_agent.erl create mode 100644 src/rebar_api.erl create mode 100644 src/rebar_app_discover.erl create mode 100644 src/rebar_app_info.erl create mode 100644 src/rebar_app_utils.erl create mode 100644 src/rebar_base_compiler.erl create mode 100644 src/rebar_compiler.erl create mode 100644 src/rebar_compiler_dag.erl create mode 100644 src/rebar_compiler_epp.erl create mode 100644 src/rebar_compiler_erl.erl create mode 100644 src/rebar_compiler_mib.erl create mode 100644 src/rebar_compiler_xrl.erl create mode 100644 src/rebar_compiler_yrl.erl create mode 100644 src/rebar_config.erl create mode 100644 src/rebar_core.erl create mode 100644 src/rebar_dialyzer_format.erl create mode 100644 src/rebar_digraph.erl create mode 100644 src/rebar_dir.erl create mode 100644 src/rebar_dist_utils.erl create mode 100644 src/rebar_env.erl create mode 100644 src/rebar_erlc_compiler.erl create mode 100644 src/rebar_fetch.erl create mode 100644 src/rebar_file_utils.erl create mode 100644 src/rebar_git_resource.erl create mode 100644 src/rebar_git_subdir_resource.erl create mode 100644 src/rebar_hex_repos.erl create mode 100644 src/rebar_hg_resource.erl create mode 100644 src/rebar_hooks.erl create mode 100644 src/rebar_httpc_adapter.erl create mode 100644 src/rebar_log.erl create mode 100644 src/rebar_opts.erl create mode 100644 src/rebar_otp_app.erl create mode 100644 src/rebar_packages.erl create mode 100644 src/rebar_parallel.erl create mode 100644 src/rebar_paths.erl create mode 100644 src/rebar_pkg_resource.erl create mode 100644 src/rebar_plugins.erl create mode 100644 src/rebar_prv_alias.erl create mode 100644 src/rebar_prv_app_discovery.erl create mode 100644 src/rebar_prv_as.erl create mode 100644 src/rebar_prv_bare_compile.erl create mode 100644 src/rebar_prv_clean.erl create mode 100644 src/rebar_prv_common_test.erl create mode 100644 src/rebar_prv_compile.erl create mode 100644 src/rebar_prv_cover.erl create mode 100644 src/rebar_prv_deps.erl create mode 100644 src/rebar_prv_deps_tree.erl create mode 100644 src/rebar_prv_dialyzer.erl create mode 100644 src/rebar_prv_do.erl create mode 100644 src/rebar_prv_edoc.erl create mode 100644 src/rebar_prv_escriptize.erl create mode 100644 src/rebar_prv_eunit.erl create mode 100644 src/rebar_prv_get_deps.erl create mode 100644 src/rebar_prv_help.erl create mode 100644 src/rebar_prv_install_deps.erl create mode 100644 src/rebar_prv_local_install.erl create mode 100644 src/rebar_prv_local_upgrade.erl create mode 100644 src/rebar_prv_lock.erl create mode 100644 src/rebar_prv_new.erl create mode 100644 src/rebar_prv_packages.erl create mode 100644 src/rebar_prv_path.erl create mode 100644 src/rebar_prv_plugins.erl create mode 100644 src/rebar_prv_plugins_upgrade.erl create mode 100644 src/rebar_prv_release.erl create mode 100644 src/rebar_prv_relup.erl create mode 100644 src/rebar_prv_report.erl create mode 100644 src/rebar_prv_repos.erl create mode 100644 src/rebar_prv_shell.erl create mode 100644 src/rebar_prv_state.erl create mode 100644 src/rebar_prv_tar.erl create mode 100644 src/rebar_prv_unlock.erl create mode 100644 src/rebar_prv_update.erl create mode 100644 src/rebar_prv_upgrade.erl create mode 100644 src/rebar_prv_version.erl create mode 100644 src/rebar_prv_xref.erl create mode 100644 src/rebar_relx.erl create mode 100644 src/rebar_resource.erl create mode 100644 src/rebar_resource_v2.erl create mode 100644 src/rebar_state.erl create mode 100644 src/rebar_string.erl create mode 100644 src/rebar_templater.erl create mode 100644 src/rebar_uri.erl create mode 100644 src/rebar_user.erl create mode 100644 src/rebar_utils.erl create mode 100644 src/vendored/r3_hex_api.erl create mode 100644 src/vendored/r3_hex_api_key.erl create mode 100644 src/vendored/r3_hex_api_package.erl create mode 100644 src/vendored/r3_hex_api_package_owner.erl create mode 100644 src/vendored/r3_hex_api_release.erl create mode 100644 src/vendored/r3_hex_api_user.erl create mode 100644 src/vendored/r3_hex_core.erl create mode 100644 src/vendored/r3_hex_core.hrl create mode 100644 src/vendored/r3_hex_erl_tar.erl create mode 100644 src/vendored/r3_hex_erl_tar.hrl create mode 100644 src/vendored/r3_hex_filename.erl create mode 100644 src/vendored/r3_hex_http.erl create mode 100644 src/vendored/r3_hex_http_httpc.erl create mode 100644 src/vendored/r3_hex_pb_names.erl create mode 100644 src/vendored/r3_hex_pb_package.erl create mode 100644 src/vendored/r3_hex_pb_signed.erl create mode 100644 src/vendored/r3_hex_pb_versions.erl create mode 100644 src/vendored/r3_hex_registry.erl create mode 100644 src/vendored/r3_hex_repo.erl create mode 100644 src/vendored/r3_hex_tarball.erl create mode 100644 src/vendored/r3_safe_erl_term.xrl create mode 100644 systest/all_SUITE.erl create mode 100644 systest/all_SUITE_data/alias_clash/rebar.config create mode 100644 systest/all_SUITE_data/alias_clash/src/alias_clash.app.src create mode 100644 systest/all_SUITE_data/alias_clash/src/alias_clash.erl create mode 100644 systest/all_SUITE_data/compile_deps/rebar.config create mode 100644 systest/all_SUITE_data/compile_deps/rebar.config.script create mode 100644 systest/all_SUITE_data/compile_deps/vendored/fake_dep/rebar.config create mode 100644 systest/all_SUITE_data/compile_deps/vendored/fake_dep/src/fake_dep.app.src create mode 100644 systest/all_SUITE_data/compile_deps/vendored/fake_dep/src/fake_dep.erl create mode 100644 systest/all_SUITE_data/grisp_explode/rebar.config create mode 100644 systest/all_SUITE_data/grisp_explode/rebar.lock create mode 100644 systest/all_SUITE_data/grisp_explode/src/mygrispproject.app.src create mode 100644 systest/all_SUITE_data/grisp_explode/src/mygrispproject.erl create mode 100644 systest/all_SUITE_data/grisp_explode/src/mygrispproject_sup.erl create mode 100644 systest/all_SUITE_data/resource_plugins/rebar.config create mode 100644 test/mock_git_resource.erl create mode 100644 test/mock_git_subdir_resource.erl create mode 100644 test/mock_pkg_resource.erl create mode 100644 test/rebar_alias_SUITE.erl create mode 100644 test/rebar_as_SUITE.erl create mode 100644 test/rebar_compile_SUITE.erl create mode 100644 test/rebar_compiler_dag_SUITE.erl create mode 100644 test/rebar_compiler_epp_SUITE.erl create mode 100644 test/rebar_cover_SUITE.erl create mode 100644 test/rebar_ct_SUITE.erl create mode 100644 test/rebar_deps_SUITE.erl create mode 100644 test/rebar_dialyzer_SUITE.erl create mode 100644 test/rebar_dir_SUITE.erl create mode 100644 test/rebar_disable_app_SUITE.erl create mode 100644 test/rebar_discover_SUITE.erl create mode 100644 test/rebar_dist_utils_SUITE.erl create mode 100644 test/rebar_edoc_SUITE.erl create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1.app.src create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1.erl create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1_app.erl create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1_sup.erl create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.app.src create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.erl create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_app.erl create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_sup.erl create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo.app.src create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo.erl create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo_app.erl create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo_sup.erl create mode 100644 test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1.app.src create mode 100644 test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1.erl create mode 100644 test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1_app.erl create mode 100644 test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1_sup.erl create mode 100644 test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2.app.src create mode 100644 test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2.erl create mode 100644 test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2_app.erl create mode 100644 test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2_sup.erl create mode 100644 test/rebar_edoc_SUITE_data/foo/apps/foo/rebar.config create mode 100644 test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo.app.src create mode 100644 test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo.erl create mode 100644 test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo_app.erl create mode 100644 test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo_sup.erl create mode 100644 test/rebar_edoc_SUITE_data/foo/rebar.config create mode 100644 test/rebar_escriptize_SUITE.erl create mode 100644 test/rebar_eunit_SUITE.erl create mode 100644 test/rebar_eunit_SUITE_data/basic_app.zip create mode 100755 test/rebar_eunit_SUITE_data/deflate create mode 100755 test/rebar_eunit_SUITE_data/inflate create mode 100644 test/rebar_eunit_SUITE_data/multi_app.zip create mode 100644 test/rebar_eunit_SUITE_data/syscfg_app.zip create mode 100644 test/rebar_file_utils_SUITE.erl create mode 100644 test/rebar_hooks_SUITE.erl create mode 100644 test/rebar_install_deps_SUITE.erl create mode 100644 test/rebar_localfs_resource.erl create mode 100644 test/rebar_localfs_resource_v2.erl create mode 100644 test/rebar_lock_SUITE.erl create mode 100644 test/rebar_namespace_SUITE.erl create mode 100644 test/rebar_new_SUITE.erl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/app/LICENSE.dtl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/app/README.md.dtl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/app/app.erl.dtl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/app/gitignore.dtl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/app/otp_app.app.src.dtl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/app/rebar.config.dtl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/app/sup.erl.dtl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/app/test_app.template create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/bad_index/LICENSE.dtl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/bad_index/README.md.dtl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/bad_index/app.erl.dtl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/bad_index/bad_index.template create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/bad_index/gitignore.dtl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/bad_index/otp_app.app.src.dtl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/bad_index/rebar.config.dtl create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/bad_index/sup.erl.dtl create mode 100644 test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/priv/module.erl.dtl create mode 100644 test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/priv/tpl.template create mode 100644 test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/rebar.config create mode 100644 test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl.app.src create mode 100644 test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl.erl create mode 100644 test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl_prv.erl create mode 100644 test/rebar_new_SUITE_data/plugin_tpl/rebar.config create mode 100644 test/rebar_new_SUITE_data/plugin_tpl/src/plugin_tpl.app.src create mode 100644 test/rebar_new_SUITE_data/plugin_tpl/src/plugin_tpl.erl create mode 100644 test/rebar_opts_parser_SUITE.erl create mode 100644 test/rebar_paths_SUITE.erl create mode 100644 test/rebar_pkg_SUITE.erl create mode 100644 test/rebar_pkg_SUITE_data/badindexchk-1.0.0.tar create mode 100644 test/rebar_pkg_SUITE_data/badpkg-1.0.0.tar create mode 100644 test/rebar_pkg_SUITE_data/goodpkg-1.0.0.tar create mode 100644 test/rebar_pkg_alias_SUITE.erl create mode 100644 test/rebar_pkg_repos_SUITE.erl create mode 100644 test/rebar_plugins_SUITE.erl create mode 100644 test/rebar_profiles_SUITE.erl create mode 100644 test/rebar_release_SUITE.erl create mode 100644 test/rebar_resource_SUITE.erl create mode 100644 test/rebar_src_dirs_SUITE.erl create mode 100644 test/rebar_templater_SUITE.erl create mode 100644 test/rebar_test_utils.erl create mode 100644 test/rebar_unlock_SUITE.erl create mode 100644 test/rebar_unlock_SUITE_data/pkg.rebar.lock create mode 100644 test/rebar_unlock_SUITE_data/rebar.lock create mode 100644 test/rebar_upgrade_SUITE.erl create mode 100644 test/rebar_uri_SUITE.erl create mode 100644 test/rebar_utils_SUITE.erl create mode 100644 test/rebar_xref_SUITE.erl create mode 100644 test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/rebar.config create mode 100644 test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1.app.src create mode 100644 test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1_app.erl create mode 100644 test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1_sup.erl create mode 100644 test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2.app.src create mode 100644 test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2_app.erl create mode 100644 test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2_sup.erl create mode 100755 vendor_hex_core.sh diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7e2f83d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# EditorConfig file: http://EditorConfig.org + +# Top-most EditorConfig file. +root = true + +# Unix-style, newlines, indent style of 4 spaces, with a newline ending every file. +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +trim_trailing_whitespace = true +indent_style = space +indent_size = 4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..1d90bd8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,322 @@ +# Contributing to Rebar3 + +1. [License](#license) +2. [Submitting a bug](#submitting-a-bug) +3. [Requesting or implementing a feature](#requesting-or-implementing-a-feature) +4. [Project Structure](#project-structure) +5. [Tests](#tests) +6. [Submitting your changes](#submitting-your-changes) + 1. [Code Style](#code-style) + 2. [Committing your changes](#committing-your-changes) + 3. [Pull Requests and Branching](#pull-requests-and-branching) + 4. [Credit](#credit) + +## License ## + +Rebar3 is licensed under the [Apache License 2.0](LICENSE) for all new code. +However, since it is built from older code bases, some files still hold other +free licenses (such as BSD). Where it is the case, the license is added in +comments. + +All files without specific headers can safely be assumed to be under Apache +2.0. + +## Submitting a Bug + +Bugs can be submitted to the [Github issue page](https://github.com/erlang/rebar3/issues). + +Rebar3 is not perfect software and will be buggy. When submitting a bug, be +careful to know the following: + +- The Erlang version you are running +- The Rebar3 version you are using +- The command you were attempting to run + +This information can be automatically generated to put into your bug report +by calling `rebar3 report "my command"`. + +You may be asked for further information regarding: + +- Your environment, including the Erlang version used to compile rebar3, + details about your operating system, where your copy of Erlang was installed + from, and so on; +- Your project, including its structure, and possibly to remove build + artifacts to start from a fresh build +- What it is you are trying to do exactly; we may provide alternative + means to do so. + +If you can provide an example code base to reproduce the issue on, we will +generally be able to provide more help, and faster. + +All contributors and rebar3 maintainers are generally unpaid developers +working on the project in their own free time with limited resources. We +ask for respect and understanding and will try to provide the same back. + +## Requesting or implementing a feature + +Before requesting or implementing a new feature, please do the following: + +- Take a look at our [list of plugins](https://rebar3.org/docs/configuration/plugins#recommended-plugins) + to know if the feature isn't already supported by the community. +- Verify in existing [tickets](https://github.com/erlang/rebar3/issues) whether + the feature might already is in the works, has been moved to a plugin, or + has already been rejected. + +If this is done, open up a ticket. Tell us what is the feature you want, +why you need it, and why you think it should be in rebar3 itself. + +We may discuss details with you regarding the implementation, its inclusion +within the project or as a plugin. Depending on the feature, we may provide +full support for it, or ask you to help implement and/or commit to maintaining +it in the future. We're dedicated to providing a stable build tool, and may +also ask features to exist as a plugin before being included in core rebar3 -- +the migration path from one to the other is fairly simple and little to no code +needs rewriting. + +## Project Structure + +Rebar3 is an escript built around the concept of providers. Providers are the +modules that do the work to fulfill a user's command. They are documented in +[the official documentation website](http://www.rebar3.org/docs/plugins#section-provider-interface). + +Example provider: + +```erlang +-module(rebar_prv_something). + +-behaviour(rebar_provider). + +-export([init/1, + do/1, + format_error/1]). + +-define(PROVIDER, something). +-define(DEPS, []). + +%% =================================================================== +%% Public API +%% =================================================================== + +-spec init(rebar_state:state()) -> {ok, rebar_state:state()}. +init(State) -> + State1 = rebar_state:add_provider(State, rebar_provider:create([ + {name, ?PROVIDER}, + {module, ?MODULE}, + {bare, true}, + {deps, ?DEPS}, + {example, "rebar dummy"}, + {short_desc, "dummy plugin."}, + {desc, ""}, + {opts, []} + ])), + {ok, State1}. + +-spec do(rebar_state:state()) -> {ok, rebar_state:state()}. +do(State) -> + %% Do something + {ok, State}. + +-spec format_error(any()) -> iolist(). +format_error(Reason) -> + io_lib:format("~p", [Reason]). +``` + +Providers are then listed in `rebar.app.src`, and can be called from +the command line or as a programmatical API. + +All commands are therefore implemented in standalone modules. If you call +`rebar3 `, the module in charge of it is likely located in +`src/rebar_prv_.erl`. + +Templates are included in `priv/templates/` + +The official test suite is Common Test, and tests are located in `test/`. + +Useful modules include: +- `rebar_api`, providing an interface for plugins to call into core rebar3 + functionality +- `rebar_core`, for initial boot and setup of a project +- `rebar_config`, handling the configuration of each project. +- `rebar_app_info`, giving access to the metadata of a specific OTP application + in a project. +- `rebar_base_compiler`, giving a uniform interface to compile `.erl` files. +- `rebar_dir` for directory handling and management +- `rebar_file_util` for cross-platform file handling +- `rebar_state`, the glue holding together a specific build or task run; + includes canonical versions of the configuration, profiles, applications, + dependencies, and so on. +- `rebar_utils` for generic tasks and functionality required across + multiple providers or modules. + +## Tests + +Rebar3 tries to have as many of its features tested as possible. Everything +that a user can do and should be repeatable in any way should be tested. + +Tests are written using the Common Test framework. Tests for rebar3 can be run +by calling: + +```bash +$ rebar3 escriptize # or bootstrap +$ ./rebar3 ct +``` + +Most tests are named according to their module name followed by the `_SUITE` +suffix. Providers are made shorter, such that `rebar_prv_new` is tested in +`rebar_new_SUITE`. + +Most tests in the test suite will rely on calling Rebar3 in its API form, +then investigating the build output. Because most tests have similar +requirements, the `test/rebar_test_utils` file contains common code +to set up test projects, run tasks, and verify artifacts at once. + +A basic example can look like: + +```erlang +-module(rebar_some_SUITE). +-compile(export_all). +-include_lib("common_test/include/ct.hrl"). +-include_lib("eunit/include/eunit.hrl"). + +all() -> [checks_success, checks_failure]. + +init_per_testcase(Case, Config0) -> + %% Create a project directory in the test run's priv_dir + Config = rebar_test_utils:init_rebar_state(Config0), + %% Create toy applications + AppDir = ?config(apps, Config), + Name = rebar_test_utils:create_random_name("app1_"++atom_to_list(Case)), + Vsn = rebar_test_utils:create_random_vsn(), + rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]), + %% Add the data to the test config + [{name, Name} | Config]. + +end_per_testcase(_, Config) -> + Config. + +checks_success(Config) -> + %% Validates that the application in `name' is successfully compiled + Name = ?config(name, Config), + rebar_test_utils:run_and_check(Config, [], + ["compile"], + {ok, [{app, Name}]}). + +checks_failure(Config) -> + %% Checks that a result fails + Command = ["fakecommand", "fake-arg"], + rebar_test_utils:run_and_check( + Config, [], Command, + {error, io_lib:format("Command ~p not found", [fakecommand])} + ). +``` + +The general interface to `rebar_test_utils:run_and_check` is +`run_and_check(CTConfig, RebarConfig, Command, Expect)` where `Expect` can +be any of: + +```erlang +{ok, OKRes} +{ok, OKRes, ProfilesUsed} +{error, Reason} + +% where: +ProfilesUsed :: string() % matching the profiles to validate (defaults to "*") +OKRes :: {app, Name} % name of an app that is in the build directory + | {app, Name, valid} % name of an app that is in the build directory and compiled properly + | {app, Name, invalid} % name of an app that didn't compile properly + | {dep, Name} % name of a dependency in the build directory + | {dep, Name, Vsn} % name of a dependency in the build directory with a specific version + | {dep_not_exist, Name} % name of a dependency missing from the build directory + | {checkout, Name} % name of an app that is a checkout dependency + | {plugin, Name} % name of a plugin in the build directory + | {plugin, Name, Vsn} % name of a plugin in the build directory with a specific version + | {global_plugin, Name} % name of a global plugin in the build directory + | {global_plugin, Name, Vsn} % name of a global plugin in the build directory with a specific version + | {lock, Name} % name of a locked dependency + | {lock, Name, Vsn} % name of a locked dependency of a specific version + | {lock, pkg, Name, Vsn}% name of a locked package of a specific version + | {lock, src, Name, Vsn}% name of a locked source dependency of a specific version + | {release, Name, Vsn, ExpectedDevMode} % validates a release + | {tar, Name, Vsn} % validates a tarball's existence + | {file, Filename} % validates the presence of a given file + | {dir, Dirname} % validates the presence of a given directory +Reason :: term() % the exception thrown by rebar3 +``` + +This generally lets most features be tested fine. Ask for help if you cannot +figure out how to write tests for your feature or patch. + +## Submitting your changes + +While we're not too formal when it comes to pull requests to the project, +we do appreciate users taking the time to conform to the guidelines that +follow. + +We do expect all pull requests submitted to come with [tests](#tests) before +they are merged. If you cannot figure out how to write your tests properly, ask +in the pull request for guidance. + +### Code Style + + * Do not introduce trailing whitespace + * Indentation is 4 spaces wide, no tabs. + * Try not to introduce lines longer than 80 characters + * Write small functions whenever possible, and use descriptive names for + functions and variables. + * Avoid having too many clauses containing clauses containing clauses. + Basically, avoid deeply nested `case ... of` or `try ... catch` expressions. + Break them out into functions if possible. + * Comment tricky or non-obvious decisions made to explain their rationale. + +### Committing your changes + +It helps if your commits are structured as follows: + +- Fixing a bug is one commit. +- Adding a feature is one commit. +- Adding two features is two commits. +- Two unrelated changes is two commits (and likely two Pull requests) + +If you fix a (buggy) commit, squash (`git rebase -i`) the changes as a fixup +commit into the original commit, unless the patch was following a +maintainer's code review. In such cases, it helps to have separate commits. + +The reviewer may ask you to later squash the commits together to provide +a clean commit history before merging in the feature. + +It's important to write a proper commit title and description. The commit title +should be no more than 50 characters; it is the first line of the commit text. The +second line of the commit text must be left blank. The third line and beyond is +the commit message. You should write a commit message. If you do, wrap all +lines at 72 characters. You should explain what the commit does, what +references you used, and any other information that helps understanding your +changes. + +### Pull Requests and Branching + +All fixes to rebar end up requiring a +1 from one or more of the project's +maintainers. When opening a pull request, explain what the patch is doing +and if it makes sense, why the proposed implementation was chosen. + +Try to use well-defined commits (one feature per commit) so that reading +them and testing them is easier for reviewers and while bisecting the code +base for issues. + +During the review process, you may be asked to correct or edit a few things +before a final rebase to merge things. Do send edits as individual commits +to allow for gradual and partial reviews to be done by reviewers. Once the +1s +are given, rebasing is appreciated but not mandatory. + +Please work in feature branches, and do not commit to `master` in your fork. + +Provide a clean branch without merge commits. + +If you can, pick a descriptive title for your pull request. When we generate +changelogs before cutting a release, a script uses the pull request names +to populate the entries. + + +### Credit + +To give everyone proper credit in addition to the git history, please feel free to append +your name to `THANKS` in your first contribution. diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b0c4165 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,43 @@ +# https://docs.docker.com/engine/reference/builder/#from +# "The FROM instruction initializes a new build stage and sets the +# Base Image for subsequent instructions." +FROM erlang:20.3.8.1-alpine as builder +# https://docs.docker.com/engine/reference/builder/#label +# "The LABEL instruction adds metadata to an image." +LABEL stage=builder + +# Install git for fetching non-hex depenencies. Also allows rebar3 +# to find it's own git version. +# Add any other Alpine libraries needed to compile the project here. +# See https://wiki.alpinelinux.org/wiki/Local_APK_cache for details +# on the local cache and need for the symlink +RUN ln -s /var/cache/apk /etc/apk/cache && \ + apk update && \ + apk add --update openssh-client git + +# WORKDIR is located in the image +# https://docs.docker.com/engine/reference/builder/#workdir +WORKDIR /root/rebar3 + +# copy the entire src over and build +COPY . . +RUN ./bootstrap + +# this is the final runner layer, notice how it diverges from the original erlang +# alpine layer, this means this layer won't have any of the other stuff that was +# generated previously (deps, build, etc) +FROM erlang:20.3.8.1-alpine as runner + +# copy the generated `rebar3` binary over here +COPY --from=builder /root/rebar3/_build/prod/bin/rebar3 . + +# and install it +RUN HOME=/opt ./rebar3 local install \ + && rm -f /usr/local/bin/rebar3 \ + && ln /opt/.cache/rebar3/bin/rebar3 /usr/local/bin/rebar3 \ + && rm -rf rebar3 + +# simply print out the version for visibility +ENTRYPOINT ["/usr/local/bin/rebar3"] +CMD ["--version"] + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e454a52 --- /dev/null +++ b/LICENSE @@ -0,0 +1,178 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/README.md b/README.md new file mode 100644 index 0000000..9b97791 --- /dev/null +++ b/README.md @@ -0,0 +1,170 @@ +# Rebar3 + +[![Build Status](https://github.com/erlang/rebar3/workflows/Common%20Test/badge.svg)](https://github.com/erlang/rebar3/actions?query=branch%3Amaster+workflow%3A"Common+Test") [![Erlang Versions](https://img.shields.io/badge/Supported%20Erlang%2FOTP-22.0%20to%2024.0-blue)](http://www.erlang.org) + +1. [What is Rebar3?](#what-is-rebar3) +2. [Why Rebar3?](#why-rebar3) +3. [Should I Use Rebar3?](#should-i-use-rebar3) +4. [Getting Started](#getting-started) +5. [Documentation](#documentation) +6. [Features](#features) +7. [Migrating from rebar2](#migrating-from-rebar2) +8. [Additional Resources](#additional-resources) + +## What is Rebar3 + +Rebar3 is an Erlang tool that makes it easy to create, develop, and +release Erlang libraries, applications, and systems in a repeatable manner. + +Rebar3 will: +- respect and enforce standard Erlang/OTP conventions for project + structure so they are easily reusable by the community; +- manage source dependencies and Erlang [packages](https://hex.pm) + while ensuring repeatable builds; +- handle build artifacts, paths, and libraries such that standard + development tools can be used without a headache; +- adapt to projects of all sizes on almost any platform; +- treat [documentation](https://rebar3.org/docs/) as a feature, + and errors or lack of documentation as a bug. + +Rebar3 is also a self-contained Erlang script. It is easy to distribute or +embed directly in a project. Tasks or behaviours can be modified or expanded +with a [plugin system](https://rebar3.org/docs/configuration/plugins) +[flexible enough](https://github.com/lfe-rebar3/rebar3_lfe) that even other languages +on the Erlang VM will use it as a build tool. + +## Why Rebar3 + +Rebar3 is the spiritual successor to [rebar +2.x](https://github.com/rebar/rebar), which was the first usable build tool +for Erlang that ended up seeing widespread community adoption. It however +had several shortcomings that made it difficult to use with larger projects +or with teams with users new to Erlang. + +Rebar3 was our attempt at improving over the legacy of Rebar 2.x, providing the +features we felt it was missing, and to provide a better environment in which +newcomers joining our teams could develop. + +## Should I use Rebar3? + +If your main language for your system is Erlang, that you value repeatable builds +and want your various tools to integrate together, we do believe Rebar3 is the +best experience you can get. + +## Getting Started + +A [getting started guide is maintained on the official documentation website](https://rebar3.org/docs/getting-started), +but installing rebar3 can be done by any of the ways described below + +Latest stable compiled version: +```bash +$ wget https://s3.amazonaws.com/rebar3/rebar3 && chmod +x rebar3 +``` + +From Source (assuming you have a full Erlang install): + +```bash +$ git clone https://github.com/erlang/rebar3.git +$ cd rebar3 +$ ./bootstrap +``` + +Stable versions can also be obtained from the [releases page](https://github.com/erlang/rebar3/releases). + +The rebar3 escript can also extract itself with a run script under the user's home directory: + +```bash +$ ./rebar3 local install +===> Extracting rebar3 libs to ~/.cache/rebar3/lib... +===> Writing rebar3 run script ~/.cache/rebar3/bin/rebar3... +===> Add to $PATH for use: export PATH=~/.cache/rebar3/bin:$PATH +``` + +To keep it up to date after you've installed rebar3 this way you can use `rebar3 local upgrade` which +fetches the latest stable release and extracts to the same place as above. A [nightly version can +also be obtained](https://s3.amazonaws.com/rebar3-nightly/rebar3) if desired. + +Rebar3 may also be available on various OS-specific package managers such as +FreeBSD Ports. Those are maintained by the community and Rebar3 maintainers +themselves are generally not involved in that process. + +If you do not have a full Erlang install, we recommend using [erln8](https://erln8.github.io/erln8/) +or [kerl](https://github.com/yrashk/kerl). For binary packages, use those provided +by [Erlang Solutions](https://www.erlang-solutions.com/resources/download.html), +but be sure to choose the "Standard" download option or you'll have issues building +projects. + +Do note that if you are planning to work with multiple Erlang versions on the same machine, you will want to build Rebar3 with the oldest one of them. The 3 newest major Erlang releases are supported at any given time: if the newest version is OTP-24, building with versions as old as OTP-22 will be supported, and produce an executable that will work with those that follow. + +## Documentation + +Rebar3 documentation is maintained on [https://rebar3.org/docs](https://rebar3.org/docs) + +## Features + +Rebar3 supports the following features or tools by default, and may provide many +others via the plugin ecosystem: + +| features | Description | +|--------------------- |------------ | +| Command composition | Rebar3 allows multiple commands to be run in sequence by calling `rebar3 do ,,...,`. | +| Command dependencies | Rebar3 commands know their own dependencies. If a test run needs to fetch dependencies and build them, it will do so. | +| Command namespaces | Allows multiple tools or commands to share the same name. | +| Compiling | Build the project, including fetching all of its dependencies by calling `rebar3 compile` | +| Clean up artifacts | Remove the compiled beam files from a project with `rebar3 clean` or just remove the `_build` directory to remove *all* compilation artifacts | +| Code Coverage | Various commands can be instrumented to accumulate code coverage data (such as `eunit` or `ct`). Reports can be generated with `rebar3 cover` | +| Common Test | The test framework can be run by calling `rebar3 ct` | +| Dependencies | Rebar3 maintains local copies of dependencies on a per-project basis. They are fetched deterministically, can be locked, upgraded, fetched from source, packages, or from local directories. See [Dependencies on the documentation website](https://rebar3.org/docs/configuration/dependencies/). Call `rebar3 tree` to show the whole dependency tree. | +| Documentation | Print help for rebar3 itself (`rebar3 help`) or for a specific task (`rebar3 help `). Full reference at [rebar3.org](https://rebar3.org/docs). | +| Dialyzer | Run the Dialyzer analyzer on the project with `rebar3 dialyzer`. Base PLTs for each version of the language will be cached and reused for faster analysis | +| Edoc | Generate documentation using edoc with `rebar3 edoc` | +| Escript generation | Rebar3 can be used to generate [escripts](http://www.erlang.org/doc/man/escript.html) providing an easy way to run all your applications on a system where Erlang is installed | +| Eunit | The test framework can be run by calling `rebar3 eunit` | +| Locked dependencies | Dependencies are going to be automatically locked to ensure repeatable builds. Versions can be changed with `rebar3 upgrade` or `rebar3 upgrade `, or locks can be released altogether with `rebar3 unlock`. | +| Packages | A given [Hex package](https://hex.pm) can be inspected `rebar3 pkgs `. This will output its description and available versions | +| Path | While paths are managed automatically, you can print paths to the current build directories with `rebar3 path`. | +| Plugins | Rebar3 can be fully extended with [plugins](https://rebar3.org/docs/configuration/plugins/). List or upgrade plugins by using the plugin namespace (`rebar3 plugins`). | +| Profiles | Rebar3 can have subconfiguration options for different profiles, such as `test` or `prod`. These allow specific dependencies or compile options to be used in specific contexts. See [Profiles](https://rebar3.org/docs/configuration/profiles) in the docs. | +| Releases | Rebar3 supports [building releases](https://rebar3.org/docs/deployment/releases) with the `relx` tool, providing a way to ship fully self-contained Erlang systems. Release update scripts for live code updates can also be generated. | +| Shell | A full shell with your applications available can be started with `rebar3 shell`. From there, call tasks as `r3:do(compile)` to automatically recompile and reload the code without interruption | +| Tarballs | Releases can be packaged into tarballs ready to be deployed. | +| Templates | Configurable templates ship out of the box (try `rebar3 new` for a list or `rebar3 new help