Commit graph

1527 commits

Author SHA1 Message Date
Tristan Sloughter
7936f9e873 Merge pull request #290 from tuncer/erlc-case-of
erlc: replace if expression with case of
2014-05-30 07:52:14 -05:00
Tuncer Ayaz
949d565527 erlc: replace if expression with case of
Motivated by the bug fix in 2c4d7d1.
2014-05-30 14:43:04 +02:00
Fred Hebert
6fda9b8f88 Merge pull request #289 from tuncer/semicolon-vs-comma
erlc: fix typo in update_erlcinfo/3 clause
2014-05-30 08:12:38 -04:00
Slava Yurin
49c25642b3 Fix #249 (erlc regression)
The combination of changes to rebar_erlc_compiler, and the fact
that erl_first_files is inherited, caused a regression. To fix
that, ensure every project uses its own .rebar/erlcinfo. While at
it, fix the issue that erl_first_files entries were not included
when initializing the dep digraph.

Reported-by: Louis-Philippe Gauthier
Reported-by: Roland Karlsson

Thanks: Tuncer Ayaz
2014-05-30 18:55:09 +07:00
Tuncer Ayaz
2c4d7d1d9b erlc: fix typo in update_erlcinfo/3 clause 2014-05-30 13:52:29 +02:00
Slava Yurin
23c63f7003 Regression test for #249 2014-05-30 18:24:57 +07:00
YAMAMOTO Takashi
5e91322e4a use the effective deps dir instead of hardcoding "deps"
suggested by @tuncer
2014-05-30 14:48:15 +09:00
YAMAMOTO Takashi
ad588a70b7 fix double "the" in a comment
noted by @tuncer
2014-05-30 14:38:39 +09:00
YAMAMOTO Takashi
9713dafcb5 Fix spec file look up
When trying to skip spec files under deps/ directory,
ignore "deps" component which is also included in Cwd.
For example, "/home/deps/src/myapp/test/cover.spec"
contains "deps" component but should not be skipped if
Cwd is "/home/deps/src/myapp/".
2014-05-30 14:37:37 +09:00
YAMAMOTO Takashi
7fd5a2d630 Fix a format of a debug output 2014-05-30 14:37:37 +09:00
Tuncer Ayaz
cb52df91d1 Fix #176
Extend CONTRIBUTING.md with regards to tests and credit.
2014-05-29 21:16:27 +02:00
Sergey Savenko
93689703c1 Add qualified name tests specification (see #118)
Augment 'tests' option of 'rebar eunit' command with ability to specify
tests to run using module-qualified names. This change also forced me
to change the way modules for coverage and for testing itself are
selected - module-qualified tests specifications are now taken into
consideration. Extend tests to cover new functionality. Update
dialyzer_reference accordingly.
2014-05-29 22:38:14 +04:00
Fred Hebert
46c979eaaf adding Alexander Verbitsky to THANKS file 2014-05-29 14:31:34 -04:00
Fred Hebert
f47af30e65 Merge pull request #284 from habibutsu/master
Error 'Command not found' when sname is used
2014-05-29 13:44:11 -04:00
Fred Hebert
763f5dc9ef Merge pull request #280 from talentdeficit/bettershell
improve output when using `rebar shell`
2014-05-27 08:10:23 -04:00
Habibutsu
12ca1fb126 Error 'Command not found' when sname is used
When a node is configured with -sname the REMSH_NAME_PART argument should be defined with using command 'hostname' but error occurs due extra space
2014-05-27 11:22:24 +03:00
alisdair sullivan
89cd24937e improve behaviour of rebar shell
attempt to emulate the behavior of
`erl -pa ebin -pa deps/*/ebin`

fix error messages and formatting issues of `rebar shell` by
shutting down and restarting the user subsystem in a mode more
hospitable to the shell than the simple user started when run
as an escript. emulate `error_logger` behaviour when the shell
is run via `erl`

add documentation of the shell command

limitations:

the erlang interrupt handler is not enabled when running as an
escript and there is no interface to re-enable it via erlang code.
this means `ctrl-c` will immediately exit the running process
unlike when running the shell via `erl`. `ctrl-g` is, however,
unaffected

the user subsystem is killed and restarted but not supervised. if
your code somehow relies on the user subsystem crashing and
restarting `rebar shell` may interfere with it's operation
2014-05-26 22:35:10 +00:00
Tuncer Ayaz
bf63171893 Move include/rebar.hrl to src/rebar.hrl
rebar.hrl is only meant to be used by src/*.
2014-05-22 11:56:54 +02:00
Jared Morrow
755c6023d1 Merge pull request #52 from shino/slim-release-support
Slim release support
2014-05-21 15:36:57 -06:00
Jared Morrow
618161b8d8 Update release notes for 2.3.1 2014-05-21 15:16:34 -06:00
Jared Morrow
16eb428d6c Bump rebar version to 2.3.1 2014-05-21 14:36:12 -06:00
Jared Morrow
93621d0d0c Merge pull request #251 from mururu/eunit_compile_opts
Make sure that eunit/qc_compile_opts works
2014-05-19 09:14:03 -06:00
Jared Morrow
8a5b9aa29f Merge pull request #244 from tuncer/missing-help
Document skip_apps=, apps=, and require_*_vsn
2014-05-19 09:12:30 -06:00
Jared Morrow
4f38f9dd76 Merge pull request #255 from tuncer/superfluous-quoting
rebar.app: remove superfluous quoting
2014-05-19 09:11:24 -06:00
Jared Morrow
7d4d3642b6 Merge pull request #274 from redpine50/broken_on_win
Use lowercase for Windows drive name to resolve issue #250
2014-05-19 09:09:31 -06:00
Jared Morrow
fdb66ecb94 Merge pull request #242 from tuncer/erlc-speedup-v5-fixup
Extra commits for #129
2014-05-19 09:06:20 -06:00
Jared Morrow
0fa0ff4f17 Roll rebar version 2.3.0 2014-05-13 09:01:26 -06:00
Yuki Ito
c996e9878b Make sure that eunit/qc_compile_opts works fix #245 2014-05-13 12:53:52 +09:00
redpine50
8cc5a6abdc Do not wrap base_dir with filename:absname()
base_dir() returns already filename:absname()'ed path.
2014-05-10 14:09:54 +09:00
redpine50
9d653f906d Update rebar_utils.erl
On windows, bootstrap.bat failed with next error.
Command 'escriptize' not understood or not applicable

This happens because the drive name in path got from rebar_utils:get_cwd() and base_dir(Config) are different case.
Made the drive name the same lowercase using filename:absname().
2014-05-08 02:07:10 +09:00
Jared Morrow
837df64087 Merge pull request #252 from tuncer/file_utils-errors
file_utils: properly report errors (fix #95)
2014-04-24 07:16:39 -06:00
Jared Morrow
8d0430e37c Merge pull request #269 from goofansu/patch-1
Update THANKS
2014-04-24 07:15:29 -06:00
Jared Morrow
a838a2e487 Merge pull request #268 from tuncer/code-path-regression
Fix #267 (code path regression)
2014-04-24 07:15:10 -06:00
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
goofansu
2b8e17246d Update THANKS
Add my name to THANKS
2014-04-18 10:45:35 +08: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
Tuncer Ayaz
e1eec02c80 file_utils: properly report errors (fix #95)
While at it, improve the error message printed by rebar_utils:sh/2.
2014-04-11 15:01:26 +02:00
Dan Gudmundsson
4b49dc0727 Quote include/lib paths
In OTP-17.0 paths on windows are not shortpaths anymore
so they may contain spaces and parenthesis
2014-04-09 21:16:41 +02: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
Tuncer Ayaz
09dee54ce7 rebar.app: remove superfluous quoting 2014-03-30 20:29:25 +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
Nathaniel Waisbrot
41f1a891d9 Add 'p4' (Perforce) as a dependency type
This calls the 'p4' command-line tool to checkout and sync Perforce
trees. It involves significantly more special code in Rebar than
using 'git p4', but it eliminates the indirection of
Rebar->Git->Python->Perforce
2014-03-17 15:49:44 -04:00
Tuncer Ayaz
ca40d3b00a Document require_*_vsn options 2014-03-12 23:32:16 +01:00
Tuncer Ayaz
b2dfebab15 erlc: add test suite 2014-03-12 20:45:37 +01:00
Tuncer Ayaz
fe9d328cb5 erlc: fixup log message
Using the filename as a prefix is less readable and inconsistent with
the other log messages.

Before:

DEBUG: src/foo.erl depends on...

After:

DEBUG: Dependencies of src/foo.erl ...
2014-03-12 20:45:37 +01:00
Tuncer Ayaz
6063e0d197 Document skip_apps= and apps= 2014-03-12 20:43:10 +01:00