Commit graph

918 commits

Author SHA1 Message Date
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 J. Stone
cc72cd8fce allow suite[s] or test[s] as options for eunit and ct 2014-02-05 16:56:44 -05: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
Tuncer Ayaz
97c9fdf31a Fix basho/rebar#388
If the syntax error is in a .hrl file, then the reported error message
is not as useful because it's not clear which .erl file was being
compiled. We can fix that easily by first printing what source file was
being processed. We don't change the actual error message, so this will
still work with your editor of choice for jumping to the right line.

Before
------

Success:
Compiled src/foo.erl

Failure:
include/foo.hrl:10: syntax error [...]

After
-----

Success:
Compiled src/foo.erl

Failure:
Compiling src/foo.erl failed:
include/foo.hrl:10: syntax error [...]
2014-01-15 19:28:41 +01:00
Jared Morrow
5d2b9ba23f Merge pull request #191 from tuncer/rename-modules
Fix #187 (rename getopt and mustache)
2014-01-14 13:38:30 -08:00
Jared Morrow
cf3a24e5c7 Merge pull request #196 from tuncer/rebar-run-info
Print a more appropriate message on 'rebar info'
2014-01-14 12:49:42 -08:00
Jared Morrow
d75af5266d Merge pull request #183 from EchoTeam/generate-upgrade-and-target-dir
generate-upgrade can now take target_dir argument
2014-01-14 12:48:48 -08:00
Tuncer Ayaz
3c1b819369 erlydtl: add missing clause (Reported-by: goofansu)
erlydtl implemented 'binary' option. Add new clause for {binary, false}.
2014-01-14 18:38:53 +01:00
Tuncer Ayaz
5fa6671511 Remove experimental flags
Remove experimental flag from:
* qc compile_only=true
* eunit compile_only=true
* src/foo.app.src.script
* eunit tests=
2014-01-14 12:44:53 +01:00
Tuncer Ayaz
8a94a41ef0 Document compile_only=true 2014-01-14 12:44:09 +01:00
mats cronqvist
4ca7c84179 introduce xref_extra_paths 2014-01-13 15:11:12 +01:00
Tuncer Ayaz
03e7993402 Fix #205 (erlydtl:compile/3 returns warnings)
Adapt rebar_erlydtl_compiler to handle warnings emitted by
erlydtl:compile/3.
2014-01-11 20:26:10 +01:00
Tuncer Ayaz
34ead92c83 Fix #187 (rename mustache to rebar_mustache) 2014-01-01 10:59:34 +01:00
Tuncer Ayaz
777fefe181 Fix #187 (rename getopt to rebar_getopt)
While at it, update getopt.erl to git rev 78eda3b.
2014-01-01 10:59:34 +01:00
Tuncer Ayaz
4af177bd06 Print a more appropriate message on 'rebar info'
To avoid treating plugins' info/2 functions as commands, we catch calls
to 'rebar info'. Previously (4b8c81fb) we simply printed the help
string, but it's much more informative to print the following:
Command 'info' not understood or not applicable
2014-01-01 10:58:32 +01:00
Pierre Fenoll
70cdb37942 Add command to rebar:command_names/0 2013-12-19 23:05:49 +00:00
Pierre Fenoll
c83d037404 Add a library template 2013-12-19 22:01:25 +00:00
Tuncer Ayaz
031e7c5fc5 rebar_dia_compiler: fix Dialyzer warnings 2013-12-17 14:27:35 +01:00
Tuncer Ayaz
277a10cd3b Fix is_verbose/1 helper function 2013-12-06 21:39:53 +01:00
Tuncer Ayaz
f39309a660 Write ERROR messages to standard_error device 2013-12-06 19:05:45 +01:00
Tuncer Ayaz
6de94e8a16 Change default log level to 'warn' and introduce -q/--quiet 2013-12-06 19:05:45 +01:00
Tuncer Ayaz
e5d76e7e8c rebar_log: use defines for log level numbers 2013-12-06 19:05:45 +01:00
Tuncer Ayaz
2f636236bf rebar_config:is_verbose/0: fix variable name 2013-12-06 19:05:45 +01:00
Tuncer Ayaz
6fe3b82b5b Make list of commands (for unabbreviation) easier to maintain
It's easier to modify the list with each command on a separate line.
The shell completion scripts have already been modified that way.
2013-12-04 20:11:49 +01:00
Jared Morrow
c02fcec92c Merge pull request #174 from tuncer/dialyzer-fixes
rebar_core: fix Dialyzer warning introduced in aa46d85 (#157)
2013-12-03 13:10:05 -08:00
Jared Morrow
dac4f9245d Merge pull request #173 from tuncer/unknown-vsn
Fix false reporting of (plain) vsn strings
2013-12-03 13:07:01 -08:00
Jared Morrow
cedb889137 Merge pull request #172 from tuncer/dep-examples
Add missing dep examples and fix existing ones
2013-12-03 13:04:16 -08:00
snaky
2246d1b69e generate-upgrade can now take target_dir argument
Previous generate-upgrade required renames in rel/ directory:

    rebar generate
    ...changing code...
    mv rel/<release> rel/<release_prev>
    rebar generate
    rebar generate-upgrade previous_release=<release_prev>

With the proposed changes you can now do the same without moving things:

    rebar generate # default target dir: rel/<release>
    ...changing code...
    rebar generate target_dir=<release_new>
    rebar generate-upgrade target_dir=<release_new> previous_release=<release>
2013-12-03 12:32:39 +04:00
Tuncer Ayaz
37310820f7 rebar_core: fix Dialyzer warning introduced in aa46d85 (#157) 2013-11-26 21:15:04 +01:00
Tuncer Ayaz
55d1539404 lfe: use correctly filtered erl_opts 2013-11-26 20:33:56 +01:00
Tuncer Ayaz
8f05368ba4 erlc: properly reuse the right erl_opts in test_compile
Avoid getting erl_opts twice in test_compile/3, and make sure the
correctly filtered (platform_define, etc.) version is used.
2013-11-26 20:33:56 +01:00
Tuncer Ayaz
edef0962d2 Fix false reporting of (plain) vsn strings
rebar used to mistakenly report plain version strings like
{vsn, "1.0.0"} as follows:
DEBUG: vcs_vsn: Unknown VCS atom in vsn field: "1.0.0"

Properly detect unknown/unsupported version terms and abort
if we encounter one.

While at it, rename a variable in vcs_vsn/3 to be non-misleading.
2013-11-26 20:33:34 +01:00
Tuncer Ayaz
79903b9eeb deps: remove undocumented fossil syntax
As discussed with Martin Schut, remove support for
{app_name, "vsn", {fossil, "url", latest}.
2013-11-26 20:30:16 +01:00
Tuncer Ayaz
d7cef6b4c1 Add missing dep examples and fix existing ones 2013-11-26 20:30:16 +01:00
Jared Morrow
988c9cd574 Merge pull request #155 from tuncer/fixes
Fixes for #137 and #142
2013-11-26 06:18:30 -08:00
Jared Morrow
9a158d37fc Merge pull request #157 from Vagabond/adt-lib-dir
Don't over-aggressively clean the code path in the presence of lib_dir directives
2013-11-22 14:17:21 -08:00
Andrew Thompson
aa46d85849 Don't badmatch if a path we think we added isn't in the code path 2013-10-17 12:36:36 -04:00
Andrew Thompson
d983beafe9 Don't over-aggressively clean the code path in the presence of lib_dir directives
Rebar, when it encounters a lib_dir directive, caches the current code
path, adds the libdir(s) and returns the cached copy of the path. When
rebar has finished processing that directory, it restores the cached
path. This is problematic in the below scenario:

        /(lib_dir)->G
  A -> B -> C -> D -> E
   \-> F -> D -> E

When rebar is finished processing B, it restores the code path to what
it was before it processed B, removing C, D, E and G from the code path.
This means when it comes to process F, neither D or E are in the code
path, so any header includes, rebar plugins or parse transforms will not
be in the code path. Without the lib_dir directive, rebar does no code
path cleanups, so everything works fine.

This change makes rebar only remove the explicit lib_dir code paths it
added and adds an inttest that replicates the above scenario.
2013-10-16 19:58:02 -04:00
Andrew Thompson
01df43e58a Fix update-deps with certain forms of the {tag, ...} type
Sometimes tags like 1.1-3-g3af5478 or d20b53f0 are encountered. The
first is the output of 'git describe', and the second is just a regular
git SHA. git fetch --tags will not pull these down, so do a full git
fetch instead.
2013-10-16 12:43:01 -04:00
Manuel Rubio
dfba6dd6f9 Fix issues introduced in #137 (4dfdd72)
* fix Dialyzer warning
* fix formatting
2013-10-16 13:21:56 +02:00
Tuncer Ayaz
d49ac03627 rebar_deps: fix overly long lines 2013-10-16 13:21:51 +02:00
Tuncer Ayaz
95910c7764 rebar_deps: 'depowner' has to be stored in xconf 2013-10-16 12:51:22 +02:00
Tuncer Ayaz
6518b5f541 rebar_deps: fix Dialyzer warning 2013-10-16 12:36:32 +02:00
Tuncer Ayaz
348d13b064 'current_command' has to be stored in xconf 2013-10-16 12:29:54 +02:00
Dave Smith
ed88055a75 Merge pull request #142 from Vagabond/adt-update-deps
Make update-deps traverse deps breadth-first, top-down
2013-10-14 15:09:03 -07:00