summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * check last modified time on erl files for xrl and yrl files before compilingTristan Sloughter2018-11-095-12/+25
| |
* | Merge pull request #1942 from aboroska/fix-plugins-listFred Hebert2018-11-171-1/+2
|\ \ | | | | | | Fix plugins list display to include project plugins
| * | Fix plugins list display to include project pluginsAndrás Boroska2018-11-111-1/+2
| |/
* | Support alias format {Namespace, Cmd} and {Namespace, Cmd, Args} (#1940)tothlac2018-11-172-4/+35
| |
* | Fix package upgrade (issue #1945) (#1946)András Boroska2018-11-161-2/+1
| |
* | merge from upstream/mastersimonxu722018-11-138-13/+137
|\ \ | |/
| * fix compilation of global plugins (#1935)Tristan Sloughter2018-11-081-4/+7
| |
| * set app's dir before setting app_info deps (#1928)Tristan Sloughter2018-10-291-1/+2
| |
| * Allow Breakpoints during task runsFred Hebert2018-10-222-2/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly useful for tests, where a test suite of any kind can be interrupted halfway through so that the user can probe the running system to see what is happening. This is done as follows: 1. the user must call `r3:break()` in a test suite 2. the user runs the task as `r3:async_do(ct)` 3. the test holds up and the user can do whatever 4. the user calls `r3:resume()` and the test proceeds as normal A safeguard is added so that breakpoints are only triggered in the shell in async mode Sample session: $ rebar3 shell ... 1> rebar_agent:async_do(ct). ok ... Running Common Test suites... %%% rebar_alias_SUITE: . === BREAK === 2> % <do some checks> 2> r3:resume(). ok 3> ..... %%% rebar_as_SUITE: ........... %%% rebar_compile_SUITE: ...... ...
| * check if git/hg is installedFred Hebert2018-10-202-0/+38
| | | | | | | | | | | | | | | | | | | | This PR is a simpler and mergeable version of #1853 by @shamis, since the provider changed format enough to make merging difficult. Compared to #1853, this also puts the responsibility on each resource to check rather than adding a new optional callback. The process dictionary is use as a warning/check cache.
| * Fallback when logging isn't initializedFred Hebert2018-10-201-4/+11
| | | | | | | | | | | | | | | | In some cases, such as when the global rebar.config file contains typoes and invalid terms, the rebar3 executable fails when trying to log the error since it hasn't been set yet, such as in #1792 This patch fixes that by going for a fallback mechanism.
| * Fix shell hook expansion on windowsFred Hebert2018-10-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | Dollar Variable expansion (`$VAR`) was inadvertently disabled for windows variables, although %VARIABLES% already worked. This reduced the portability of hooks in general. Additionally, tests would fail on windows due to bad quoting of paths: the path C:/a/b/c would fail when passed to the command `cmd /q /c C:/a/b/c` because it would interpret /a /b and /c as 3 options. Using quotes makes the tests pass.
* | Merge remote-tracking branch 'upstream/master'simonxu722018-10-1651-1234/+3108
|\ \ | |/
| * Merge pull request #1907 from ferd/refactor-env-pathsFred Hebert2018-10-1513-52/+279
| |\ | | | | | | Refactor env path handling and fix some bugs related to it
| | * Drop outdated commentsFred Hebert2018-10-141-2/+0
| | |
| | * Optimize path handlingFred Hebert2018-10-116-45/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Only set paths that need to be put as a priority - Clean up paths before leaving API mode The first point accounted for some performance cost, but the latter one explains the 40% overhead in test runs: since rebar3 calls rebar3 a lot with a bunch of fake apps, and that the new mechanism for path handling by default does not _remove_ paths, it just _orders_ them, we would end up in a situation where as the tests ran, more and more fake paths would get added to the VM. By the time the run was over, all path handling would take longer since more paths needed filtering every time. By resetting paths at the end of an API run, we prevent a given 'project' from polluting another one's runtime and performance once the API successfully returns.
| | * Clean path code, add tests, add clash detectionFred Hebert2018-10-111-6/+41
| | | | | | | | | | | | Some finishing touch to that code
| | * Fix a bug in compiler path handlingFred Hebert2018-10-113-12/+10
| | | | | | | | | | | | Also handle some formatting
| | * Abstracted path managementFred Hebert2018-10-1111-45/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move path management out of rebar_utils manual code path function handling (which we leave there for backwards compat), and centralize them to allow easier coordination of paths between plugins and deps. On top of path handling, do a check of loaded modules to only purge and reload those that actually need it done in order to prevent all kinds of weird interaction and accidental purge kills. It also allows the possible cohabitation of both at once, with a "in case of conflict pick X" as a policy Changing path handling in providers also highlighted a bunch of bugs in some tests and appears to fix some in other providers, specifically around plugins.
| * | fix resolving versions from vcs (#1915)Tristan Sloughter2018-10-144-8/+21
| | | | | | | | | | | | | | | | | | app_info was turning any vsn into a binary which the vcs_vsn function interprets as being an actual version and not something like <<"git">>. original_vsn shouldn't be converted as it is then not longer "original".
| * | fix finding transitive deps with prerelease versions (#1914)Tristan Sloughter2018-10-141-9/+11
| |/
| * throw builder error when returned from project build (#1909)Tristan Sloughter2018-10-101-2/+6
| |
| * Re-add erlc compiler; plugins need itFred Hebert2018-10-071-0/+841
| | | | | | | | | | However, we add a once-printed deprecation warning for the new interface.
| * fix yrl compiler and add test (#1906)Tristan Sloughter2018-10-061-1/+1
| |
| * remove unused app_compilers app env setting (#1903)Tristan Sloughter2018-10-061-2/+2
| |
| * Back to git-based versioningTristan Sloughter2018-10-051-1/+1
| |
| * Bump to 3.7.0-rc2Tristan Sloughter2018-10-051-1/+1
| |
| * compiler behaviour (#1893)Tristan Sloughter2018-10-0520-905/+1080
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add compile type for dynamic project compilation * new rebar_compiler abstraction for running multiple compilers rebar_compiler is a new behaviour that a plugin can implement to be called on any ues of the compile provider to compile source files and keep track of their dependencies. * fix check that modules in .app modules list are from src_dirs * use project_type to find module for building projects * allow plugins to add project builders and compilers
| * upgrade relx and set base_dir in overlay_vars (#1902)Tristan Sloughter2018-10-051-1/+2
| |
| * warn if the matched package is retired, skip prerelease (#1897)Tristan Sloughter2018-10-013-33/+58
| | | | | | | | | | | | | | retired packages are now used the same as any other but a warning will be printed when it is resolved. prerelease versions are skipped unless explicitly given as the version in the constraint or lock file.
| * properly support top level app erl_opts from REBAR_CONFIG os var (#1889)Tristan Sloughter2018-09-214-39/+54
| | | | | | | | | | | | When REBAR_CONFIG was set it would not effect the top level app's configuration because app_discover was rereading the top level rebar.config which ignored REBAR_CONFIG. Instead this patch has it use the existing configuration from REBAR_CONFIG.
| * add option to compiler provider to only build dependencies (#1888)Tristan Sloughter2018-09-191-7/+25
| |
| * only print skip warning if version is different (#1886)Tristan Sloughter2018-09-171-6/+18
| |
| * reset default profile app plugins to empty if at the top level (#1885)Tristan Sloughter2018-09-172-23/+45
| | | | | | | | | | | | | | | | | | | | | | top level default profile plugins are installed in the run_aux function. This commit removes the plugins from the plugin opts of an application that is also at the top level and skips the default profile when installing top level plugins in project_apps_install so they aren't handled twice. Additionally, before handling a plugin the state's list of known plugin apps is checked and the plugin is skipped if it has already been handled.
| * Back to git-based versioningTristan Sloughter2018-09-131-1/+1
| |
| * Bump to 3.7.0-rc1Tristan Sloughter2018-09-131-1/+1
| |
| * support for hex v2, multiple repository fetching, private organizations (#1884)Tristan Sloughter2018-09-1330-1061/+1520
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * update to hex_core for hex-v2 repo support (#1865) * update to hex_core for hex-v2 repo support This patch adds only single repo hex-v2 support through hex_core. Packages no longer filtered out by buildtool metadata and the package index is updated per-package instead of fetched as one large ets dump. * tell travis to also build hex_core branch * support list of repos for hex packages (#1866) * support list of repos for hex packages repos are defined under the hex key in rebar configs. They can be defined at the top level of a project or globally, but not in profiles and the repos configured in dependencies are also ignored. Searching for packages involves first checking for a match in the local repo index cache, in the order repos are defined. If not found each repo is checked through the hex api for any known versions of the package and the first repo with a version that fits the constraint is used. * add {repos, replace, []} for overriding the global & default repos * add hex auth handling for repos (#1874) auth token are kept in a hex.config file that is modified by the rebar3 hex plugin. Repo names that have a : separating a parent and child are considered organizations. The parent repo's auth will be included with the child. So an organization named hexpm:rebar3_test will include any hexpm auth tokens found in the rebar3_test organization's configuration. * move packages to top level of of hexpm cache dir (#1876) * move packages to top level of of hexpm cache dir * append organization name to parent's repo_url when parsing repos * only eval config scripts and apply overrides once per app (#1879) * only eval config scripts and apply overrides once per app * move new resource behaviour to rebar_resource_v2 and keep v1 * cleanup use of rebar_resource module and unused functions * cleanup error messages and unused code * when discovering apps support mix packages as unbuilt apps (#1882) * use hex_core tarball unpacking support in pkg resource (#1883) * use hex_core tarball unpacking support in pkg resource * ignore etag if package doesn't exist and delete if checksum fails * add back tests for bad package checksums * improve bad registry checksum error message
| * Back to git-based versioningFred Hebert2018-09-131-1/+1
| |
| * Bump to 3.6.2Fred Hebert2018-09-131-1/+1
| |
| * Reload logger config in shellFred Hebert2018-09-102-3/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | This requires some fancy dynamic work since the logger is started as part of the kernel and we lost the sys.config from users when working from there. We start conservatively by making it an optional thing, turning it on only where we know it to be safe. The changes are applied _after_ having loaded the rest of configs so if an inoffensive error happens, the shell works (with a bad error message) rather than plain exploding.
| * add report in the effects_code_generation, as it is the short form for both ↵Gerald Xv2018-09-051-0/+1
| | | | | | | | report_errors and report_warnings
| * Merge pull request #1850 from ferd/helpful-includelib-errorFred Hebert2018-08-031-3/+13
| |\ | | | | | | Friendlier output on include_lib errors
| | * Friendlier output on include_lib errorsFred Hebert2018-08-031-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns output like this: ===> Compiling apps/c/src/c.erl failed apps/c/src/c.erl:3: can't find include lib "parse_trans/include/codegen.hrl" Into: ===> Compiling apps/c/src/c.erl failed apps/c/src/c.erl:3: can't find include lib "parse_trans/include/codegen.hrl"; Make sure parse_trans is in your app file's 'applications' list Which is likely going to help newcomers encountering issues.
| * | fixed typo erl_first_filesShamis Shukoor2018-08-031-1/+1
| |/
* | combine []/Opt case options into one @ get_git_options/0simonxu722018-07-261-2/+1
| |
* | add git clone --reference path supportsimonxu722018-07-261-12/+31
|/
* Merge pull request #1780 from feng19/refresh_pathsFred Hebert2018-07-111-24/+85
|\ | | | | smarter shell code reloading, add env options for refresh_paths & refresh_paths_blacklist
| * remove some refresh_paths's options(no_deps and no_test) & use ↵feng192018-07-111-24/+8
| | | | | | | | beam_lib:md5/1 to get the module's vsn
| * Merge tag '3.6.0' into refresh_pathsfeng192018-06-2111-66/+162
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump to 3.6.0 - Introduce support of add and del operations for overrides - OTP-21 compatibility - Bump cth_readable for OTP-21 compat - upgrade relx to 3.25.0 - upgrade bbmustache to 1.5.0 - run compile provider in default namespace from bare compiling (fixes hooks for mix builds) - Resolve string vs list crashing rebar3 in erl_first_files - Create ERLANG_LIB_*_erl_interface environment variables only if erl_interface exists - Add hooks to the upgrade command - Add --start-clean flag to rebar3 shell - Auto-boot main app in OTP app project templates - Use maps for child spec examples in templates
| * | add option(refresh_paths & refresh_paths_blacklist) for support set ↵feng192018-05-071-24/+101
| | | | | | | | | | | | refresh_paths when recompile