Commit graph

1429 commits

Author SHA1 Message Date
Tuncer Ayaz
99fe270e59 Fix #267 (code path regression)
Since the introduction of -r/--recursive, deps were not properly added
to the code path when running ct, eunit, etc.

To fix that, pass a flag down to process_dir1 and conditionalize
execution of the command. This moves the decision into process_dir1
where we can decide to invoke preprocess/2 and postprocess/2 but not
execute the command.

Without this fix, you'd have to, for example, invoke 'rebar -r ct
skip_deps=true', if you wanted to run base_dir's ct suites with deps on
the code path (while skipping all non-base_dir ct suites).

So, with this patch applied, if you run
$ rebar ct
deps will be on the code path, and only base_dir's ct suites will be
tested.

If you want to test ct suites in base_dir and sub_dirs, you have to run
$ rebar -r ct skip_deps=true

If you want to test ct suites in all dirs, you have to run
$ rebar -r ct

The fix is not specific to ct and applies to all commands.

To be able to add inttest/code_path_no_recurse/deps, I had to fix
.gitignore. While at it, I've updated and fixed all entries.
2014-04-23 22:17:23 +02:00
Tuncer Ayaz
b037f6c076 rebar_core: consistently order args and simplify code
* Fix arg order:
  The order of arguments got inconsistent over time. To fix that, use
  the same consistent order in all functions.

* Avoid one erlang:'++'/2 call in process_dir/6.

* Avoid lists:prefix/2 and atom_to_list/1 calls:
  We can easily avoid 2 lists:prefix/2 calls and one atom_to_list/1 call
  in execute/5 by passing in whether the command is a hook or not. The
  resulting code is simpler and easier to read.
2014-04-20 16:59:38 +02:00
Jared Morrow
8edaa08ba6 Merge pull request #265 from goofansu/fix-qc-help-clean
Fix 'rebar help clean' function_clause error
2014-04-16 07:53:57 -06:00
goofansu
43b3e0d038 Fix 'rebar help clean' function_clause error
Missing info(help, clean) in rebar_qc.erl.
2014-04-12 13:04:36 +08:00
Jared Morrow
75f1383f66 Merge pull request #254 from tuncer/fix-generate
Fix 'rebar generate' regression (#253)
2014-04-11 09:19:01 -06:00
Andrew Thompson
0c7fe5fc7b Merge pull request #237 from norton/norton-17
Add partial support for Erlang/OTP 17
2014-04-09 11:39:24 -04:00
Tuncer Ayaz
883decce3d Fix 'rebar generate' regression (#253)
If the directory we're about to process contains
reltool.config[.script] and the command to be applied is
'generate', then it's safe to process. We do this to retain the
behavior of specifying {sub_dirs, ["rel"]} and have "rebar generate"
pick up rel/reltool.config[.script]. Without this workaround you'd
have to run "rebar -r generate" (which you don't want to do if you
have deps or other sub_dirs) or "cd rel && rebar generate".
2014-03-30 22:07:26 +02:00
Joseph Wayne Norton
def6b8c98d Add partial support for Erlang/OTP 17
Allow rebar to compile applications using Erlang/OTP 17 and older
versions.  This patch only provides partial support since the rebar
tool itself must be compiled using an Erlang/OTP version that is older
than 17.
2014-03-29 23:22:47 -05:00
Jared Morrow
47c089aa80 Merge branch 'tuncer-auto-recursion' 2014-03-11 21:26:15 +00:00
Jared Morrow
415d872730 Keep compile recursive and update the tests to not pass -r to compile 2014-03-11 21:24:19 +00:00
Tuncer Ayaz
9bb677ed99 Fix #226
Running 'rebar list-templates' can take quite a long time, when it has
to search the file system. To fix that, make list-templates not recurse
by default. To enable recursion, run 'rebar -r list-templates'.
2014-03-11 21:11:36 +00:00
Tuncer Ayaz
77a0eb6fe4 Fix #56 (always-on recursion)
Always-on recursive application of all rebar commands causes too many
issues. Recursive application is required for:
1. dealing with dependencies: get-deps, update-deps, and compile of deps
   right after get-deps or update-deps
2. projects with a riak-like apps/ project structure and dev process

The vast majority of projects are not structured like riak. Therefore,
moving forward it's best to (by default) restrict recursive behavior to
dealing with deps. This commit does that and also adds command line and
rebar.config options for controlling or configuring recursion. Also, we
introduce two meta commands: prepare-deps (equivalent to rebar -r
get-deps compile) and refresh-deps (equivalent to rebar -r update-deps
compile). riak-like projects can extend the list of recursive commands
(to include 'eunit' and 'compile') by adding
{recursive_cmds, [eunit, compile]} to rebar.config.
2014-03-11 21:11:36 +00:00
Jared Morrow
fa1a2b53fd Merge pull request #208 from goofansu/fix-typo-rebar-erlydtl-compiler
Fix typo in rebar_erlydtl_compiler
2014-03-05 22:31:47 -07:00
goofansu
195d61a402 Fix typo in rebar_erlydtl_compiler 2014-03-06 13:03:39 +08:00
Jared Morrow
a361719781 Merge pull request #139 from rnewson/depmods
Allow specification of module dependencies for appups
2014-03-05 13:35:11 -07:00
Andrew Thompson
17fe5d6f1c Merge pull request #115 from mdaguete/simplenode.runner-remsh-fixes
Incorrect REMSH args when sname is used.
2014-03-05 15:22:28 -05:00
Andrew Thompson
ab571fd2aa Merge pull request #234 from tuncer/fix-220
Fix #220 (Reported-by: Joseph Norton)
2014-03-05 14:54:27 -05:00
Jared Morrow
b7e727a8f7 Merge pull request #98 from jcomellas/jc-no-erl-libs-repetition
Repetition of environment variable definitions in child processes (ports)
2014-03-05 12:52:43 -07:00
Tuncer Ayaz
03fe5318c6 Fix #220 (Reported-by: Joseph Norton)
When running 'rebar qc' or 'rebar eunit', we were erroneously fetching
erl_opts more than once.
2014-03-05 20:16:15 +01:00
Tuncer Ayaz
c26b0c7d6b erlc: fix comment
test_compile/3 is used by eunit and qc, but the comment was only
referring to 'rebar eunit'.
2014-03-05 20:16:15 +01:00
Jared Morrow
077f8e064a Merge pull request #175 from tuncer/cwd-plugins-regression
CWD plugins regression
2014-03-05 12:08:00 -07:00
Andrew Thompson
62b006227c Merge pull request #129 from tuncer/erlc-speedup-v5
Speed up the compilation process v5
2014-03-05 13:39:55 -05:00
Tuncer Ayaz
b6908421b7 erlc: clean-up, enhance, and regression fix fd17693
* update files
* fix Dialyzer warning
* unconditionally enable info fil
* clean-up inconsistencies
* use term_to_binary compression
* use try...catch instead of case...catch...of
* do not write build info file if the graph is unmodified
* store info file as <base_dir>/.rebarinfo
* properly support list of compile directives
* fix regressions:
 - Fix a bug in handling of files to compile first.
 - If a file that is depended upon itself depends on other files, make sure
   those are compiled first. While at it, rename variables for correctness.
   Reported-by: David Robakowski
 - Make sure that FirstFiles has no dupes and preserves the proper order.
 - headers referenced via -include_lib() were not properly resolved to absolute
   filenames
 - .erl files found in sub dirs of src_dirs were not properly resolved to
   absolute filenames
2014-03-05 15:44:38 +01:00
Anthony Ramine
7742d70ee2 erlc: add support for detecting core transforms 2014-03-05 15:33:22 +01:00
Evgeniy Khramtsov
fd17693b7c Speed up the compilation process
* Do not parse source files twice while checking for relationship.
* Keep files relationships in a graph.
* The option 'keep_build_info' is introduced. When set to 'true'
  the graph will be kept in ebin/.rebar.build.info and will be
  used by further compiler calls. The default is 'false'.
2014-03-05 15:20:36 +01:00
Jared Morrow
6e24cd6ac7 Merge pull request #233 from tuncer/commands
docs: fix #228
2014-02-25 14:56:13 -07:00
Tuncer Ayaz
2576031163 docs: fix #228 2014-02-25 19:46:49 +01:00
Jared Morrow
dcc75b144c Merge pull request #230 from tuncer/fix-dialyzer-warnings
eunit: fix dialyzer warnings introduced in 03da5e0b
2014-02-25 08:14:47 -07:00
Jared Morrow
3b08e93ef9 Merge pull request #232 from tuncer/doc-abbrev-cmd
Document support for abbreviated commands
2014-02-25 07:50:09 -07:00
Tuncer Ayaz
a554744fc0 Mention rebar -c/--commands 2014-02-24 22:36:31 +01:00
Tuncer Ayaz
c29f8b45ae Document support for abbreviated commands 2014-02-24 22:36:31 +01:00
Jared Morrow
289a71e208 Merge pull request #221 from kaos/erlydtl
Adapt erlydtl compiler plugin to latest version of erlydtl
2014-02-24 06:47:52 -07:00
Tuncer Ayaz
589afc0173 eunit: fix dialyzer warnings introduced in 03da5e0b 2014-02-20 19:10:47 +01:00
David N. Welton
60d106055b {ok, Module} is an acceptable return value from do_compile. 2014-02-14 13:35:51 +01:00
David N. Welton
f7d62dee68 Use proplists:unfold to make sure we feed a proplist to keymerge. 2014-02-14 13:35:51 +01:00
Andreas Stenius
33110267ba Adapt erlydtl compiler plugin to latest version of erlydtl 2014-02-14 13:35:51 +01:00
Jared Morrow
ec448c0894 Merge pull request #223 from rebar/adt-random-suite-order
Add random_suite_order option to eunit command
2014-02-07 11:32:06 -07:00
Andrew Thompson
2f6991cbd7 Add documentation 2014-02-07 13:08:14 -05:00
Andrew Thompson
03da5e0be0 Add random_suite_order option to eunit command
Option takes either 'true' or a numeric seed value. If true is passed, a
random seed is generated and used. The numeric seed value is for
repeatability.

The idea here is to root out test suites that are order dependant, or
that fail in the presence of certain orderings.
2014-02-07 13:05:33 -05:00
Jared Morrow
fa679b4343 Merge pull request #224 from andrewjstone/allow-test
allow suite[s] or test[s] as options for eunit and ct
2014-02-07 10:53:08 -07:00
Andrew Thompson
184edc2331 Merge pull request #188 from massemanet/xref_extra_path
Xref extra path
2014-02-06 01:04:35 -05:00
Andrew Thompson
daf1428f95 Merge pull request #219 from h4cc/patch-1
Added R16B01 and R16B02 to travis config.
2014-02-06 01:02:07 -05:00
Jared Morrow
cf3f2098e4 Bump rebar to 2.2.0 and add proper release notes 2014-02-05 15:01:51 -07:00
Andrew J. Stone
cc72cd8fce allow suite[s] or test[s] as options for eunit and ct 2014-02-05 16:56:44 -05:00
Julius Beckmann
1017ba2849 Added R16B01 and R16B02 to travis config. 2014-01-26 20:58:20 +01:00
Jared Morrow
af91604053 Merge pull request #212 from tuncer/hrl-error
Fix basho/rebar#388
2014-01-16 15:11:45 -08:00
Jared Morrow
b2c2adb7c0 Merge pull request #215 from tuncer/experimental
Remove experimental flags
2014-01-16 15:09:50 -08:00
Jared Morrow
c5e48b4a8b Merge pull request #214 from tuncer/compile_only
Document compile_only=true
2014-01-16 15:07:47 -08:00
Jared Morrow
477fbabfa8 Merge pull request #210 from tuncer/erlydtl-warnings
Fix #205 (erlydtl:compile/3 returns warnings)
2014-01-16 14:09:43 -08:00
Tuncer Ayaz
2f2e7c4889 rebar_base_compiler: replace fixed size list with a tuple 2014-01-15 19:29:00 +01:00