summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Support old-style shell for rebar3 shellFred Hebert2016-01-062-0/+781
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is quite the hack. This requires to detect the current shell running; if it's the new shell, business as usual. However, if it's the old shell, we have to find a way to take over it and drive IO. This requires a few steps because: - the old shell does not let you be supervised intelligently (it uses supervisor_bridge, so killing the child is not a supported operation from the supervisor) - the old shell ignores all trappable exit signals except those coming from the Port in charge of stdio ({fd, 0, 1}) - the old shell shuts down on all exit signals from the stdio Port except for badsig, and replicates the shutdown reason otherwise - An escript does not tolerate the `user` process dying (old shell) for any non-normal reason without also taking the whole escript down - Booting in an escript has an implicit 'noshell' argument interpreted by the old shell as a way to boot the stdio Port with only stdout taken care of Because of all these points, we have to kill the old `user` process by sending it a message pretending to be the Stdio port dying of reason `normal`, which lets it die without triggering the ire of its supervision tree and keeping the escript alive. This, in turn, kills the old stdio port since its parent (user.erl) has died. Then we have to boot our copy of user.erl (rebar_user.erl) which conveniently ignores the possibility of running the stdio port on stdout only -- always using stdin *and* stdout, giving us a bona fide old-style shell. A known issue introduced is that running r3:do(ct) seems to then kill the shell, and r3:do(dialyzer) appears to have an odd failure, but otherwise most other commands appear to work fine.
* Merge pull request #993 from ferd/fix-maintainers-app-fileTristan Sloughter2016-01-052-2/+2
|\ | | | | contributors -> maintaiers in template app data
| * contributors -> maintaiers in template app dataFred Hebert2016-01-052-2/+2
|/ | | | | hex.pm is now using maintainers instead of contributors in metadata. Templates should be updated to reflect it.
* Merge pull request #982 from gleber/masterFred Hebert2016-01-051-12/+28
|\ | | | | Allow bootstrap to pick up existing Hex cache and deps
| * Skip update and compilation if possible.Gleb Peregud2016-01-031-12/+28
| | | | | | | | | | | | | | This detects existence of Hex registry at $HOME/.cache/rebar3/hex/default/registry and skips "rebar3 update" step. It also detect presence of bootstrap dependencies in _build/default/lib/ and skips fetching them.
* | Merge pull request #966 from talentdeficit/ct_root_suitesFred Hebert2016-01-053-4/+127
|\ \ | | | | | | allow ct suites to be specified at root of project (or root of app)
| * | add test for foo_SUITE_data filesalisdair sullivan2015-12-201-2/+8
| | |
| * | put `extra' ct test suites in `extras/apps/APPNAME' rather than `extras'alisdair sullivan2015-12-202-2/+46
| | | | | | | | | | | | this allows repeated test suite names across apps without conflicts
| * | allow ct suites to be specified at the root of a project (or root of app)alisdair sullivan2015-12-203-3/+76
| | | | | | | | | | | | | | | | | | | | | | | | previously rebar3 dropped suites declared at the root of the project (via `--suite=whatever_SUITE' probably) and warned. this was because the compiler would recursively copy and compile everything in the directory indicated by the test suite. this changes the copy mechanism to only copy erl source files and directories that end with `_SUITE_data' into the `extras' dir in `_build'
| * | whitespace cleanupalisdair sullivan2015-12-201-1/+1
| | |
* | | Merge pull request #989 from tsloughter/fuzzy_matchTristan Sloughter2016-01-052-27/+36
|\ \ \ | | | | | | | | convert ~> versions to highest matching
| * | | convert ~> versions to highest matchingTristan Sloughter2015-12-262-27/+36
| | | |
* | | | Merge pull request #992 from ferd/update-cth_readableTristan Sloughter2016-01-052-2/+2
|\ \ \ \ | | | | | | | | | | Bump cth_readable to 1.1.1
| * | | | Bump cth_readable to 1.1.1Fred Hebert2016-01-052-2/+2
|/ / / / | | | | | | | | | | | | This fixes a typo that could cause failure in some test runs.
* | | | Merge pull request #991 from sdebnath/console_modeTristan Sloughter2016-01-052-2/+2
|\ \ \ \ | |/ / / |/| | | Upgrade relx to v3.11.0
| * | | Upgrade relx to v3.11.0Shawn Debnath2016-01-052-2/+2
|/ / /
* | | Merge pull request #987 from ferd/plugin-templatesTristan Sloughter2015-12-2114-8/+181
|\ \ \ | |/ / |/| | Plugin templates
| * | Plugin templates enabledFred Hebert2015-12-1914-8/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets a plugin define templates to be loaded: $ rebar3 new ... proper (plugin): A basic PropEr suite for an OTP application ... $ rebar3 new help proper proper: plugin template (...) Description: A basic PropEr suite for an OTP application Variables: name="suite" (...) ... → rebar3 new proper fakesuite ===> Writing test/prop_fakesuite.erl In this case, proper is a fake template file I've put by hand in _build/default/plugins/rebar3_proper/priv/<somename>/, meaning it will only work as far as it's called from the project's root. The priority order of plugins is now .config > plugin > built-in, such that someone could ensure plugins do not crush their own private templates, but also that custom or plugin templates do overtake built-in ones. It used to be Built-in > .config only. Templates are searched for recursively in the priv/ directory of plugins.
* | | Merge pull request #923 from tsloughter/hex_cdnFred Hebert2015-12-199-52/+96
|\ \ \ | |/ / |/| | support temporary cdn change with HEX_CDN os var
| * | support temporary cdn change with HEX_CDN os varTristan Sloughter2015-12-199-52/+96
|/ /
* | Merge pull request #988 from ferd/schutm-wrong-pathsTristan Sloughter2015-12-192-4/+70
|\ \ | | | | | | Fix wrong relative path resolution
| * | Add tests for base_dir reconfigurationFred Hebert2015-12-191-3/+40
| | | | | | | | | | | | Tests both absolutes and relative paths.
| * | Merge branch 'master' of https://github.com/schutm/rebar3 into ↵Fred Hebert2015-12-191-1/+30
| |\ \ | | | | | | | | | | | | schutm-wrong-paths
| | * | Fix wrong relative path resolutionschutm2015-12-101-1/+30
| | |/
* | | Merge pull request #986 from ferd/fix-bad-tpl-index-handlingTristan Sloughter2015-12-1910-10/+173
|\ \ \ | |/ / |/| | A bad template index does not crash; shows warning
| * | A bad template index does not crash; shows warningFred Hebert2015-12-1810-10/+173
| |/ | | | | | | | | | | | | | | This should fix #955 The test is implicit as a bad index previously silently crashed rebar3. By adding the bad index to the `new` suite's files, we can show that things keep running.
* | Merge pull request #983 from priestjim/feature/cover_totalsFred Hebert2015-12-181-0/+18
|\ \ | |/ |/| Add support for total code coverage
| * Account for division by zeroPanagiotis PJ Papadomitsos2015-12-161-0/+2
| |
| * Add support for total code coveragePanagiotis PJ Papadomitsos2015-12-161-0/+16
|/
* Merge pull request #967 from talentdeficit/mib_include_fixFred Hebert2015-12-082-35/+37
|\ | | | | symlink mib hrl output in apps `include' directories
| * remove mib header file in `priv/mibs/include'alisdair sullivan2015-12-082-13/+1
| |
| * symlink mib hrl output in apps `include' directoriesalisdair sullivan2015-12-062-31/+45
| | | | | | | | this restores compatibility with rebar2 and erlang.mk
* | Merge pull request #970 from tsloughter/certifi_0.3.0Fred Hebert2015-12-072-2/+2
|\ \ | | | | | | upgrade certifi to latest release
| * | upgrade certifi to latest releaseTristan Sloughter2015-12-072-2/+2
|/ /
* | Merge pull request #965 from ferd/tsloughter-tup_umergeTristan Sloughter2015-12-063-35/+124
|\ \ | |/ |/| fix tupple merging for realsies.
| * Actually fix tuple merging.Fred Hebert2015-12-062-30/+60
| | | | | | | | Full rewrite, code should be understandable now.
| * Merge branch 'tup_umerge' of https://github.com/tsloughter/rebar3 into ↵Fred Hebert2015-12-061-5/+64
| |\ |/ / | | | | tsloughter-tup_umerge
| * add tests for setting per-profile sys_config variables for relxTristan Sloughter2015-12-061-5/+64
| |
* | Merge pull request #963 from ferd/tup_merge-testsTristan Sloughter2015-12-062-9/+87
|\ \ | |/ |/| Tup merge tests
| * Fix tuple umergingFred Hebert2015-12-061-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | - proper segregation of comparison between tuple terms and non-tuple terms. Guards weren't specific enough and that meant the wrong clauses of guards would be triggered - proper deduplication of entries in the list. An additional N passes are required (we co-opt the reverse step to be more efficient) because while the original lists:umerge easily removes dupes, this is requiring more logic here since `[a,{a,b},{a,b,c},a,{a,b,c}]` is a possible interleaving and we'd want `[a,{a,b},{a,b,c}]` -- comparison of direct neighbours isn't enough.
| * Add test cases for tuple deduplicationFred Hebert2015-12-061-2/+69
|/ | | | (the tests fail)
* Merge pull request #948 from toland/fix_mib_compilerFred Hebert2015-12-012-8/+18
|\ | | | | Fix a small bug in the MIB compiler when building dependencies
| * Added tests and fixed a bugPhil Toland2015-12-012-5/+11
| |
| * Fix a small bug in the MIB compiler when building dependenciesPhil Toland2015-11-301-4/+8
| | | | | | | | | | | | | | When compiling a dependency with a MIB file the generated hrl file is left in the root project directory in a file called "include". This has the perverse effect of messing up the search path for include files causing any dependencies with files in their "include" directory to fail to build after that.
* | Merge pull request #935 from tokenrove/fix-eunit-verboseTristan Sloughter2015-12-011-1/+2
|\ \ | | | | | | Default to no eunit formatter if verbose specified
| * | Default to no eunit formatter if verbose specifiedJulian Squires2015-12-011-1/+2
|/ / | | | | | | The previous default meant that verbose output would not be emitted.
* | Merge pull request #949 from tsloughter/eunit_configFred Hebert2015-11-301-1/+1
|\ \ | |/ |/| fetch eunit_formatters config not from the command args but from the config
| * fetch eunit_formatters config not from the command args but from the configTristan Sloughter2015-11-301-1/+1
| |
* | Merge pull request #945 from tsloughter/auto_updateFred Hebert2015-11-292-7/+41
|\ \ | |/ | | auto-update the registry if a pkg isn't found, fail if it still isn't found
| * auto-update the registry if a pkg isn't found, fail if it still isn't foundTristan Sloughter2015-11-292-7/+41
|/