Andrew Thompson
ff5a7982eb
Improve error logging when running a command fails
...
Make the error message newline terminated and, if possible, log the name
of the module in which the failure occured.
2010-10-29 11:52:13 -04:00
Juhani Rankimies
fd5ebe69a4
Port rebar_file_utils to Windows
...
Modify rm_rf and cp_r to work when {win32,_} = os:type().
Simplify rm_rf to only accept one filename, directoryname or wildcard.
Add unit tests to ensure a similar behaviour on windows and unix.
Thanks to tuncer for guidance and feedback.
2010-10-27 11:39:12 -06:00
Juhani Rankimies
75fc2378bf
Remove unused functions from rebar_file_utils
...
mkdir_p/1 and ln_sf/2.
2010-10-27 11:39:12 -06:00
Kostis Sagonas
7dc76d578e
Tidier improvements
2010-10-26 00:38:51 +02:00
Tuncer Ayaz
1a577fcd43
Clarify rebar_utils:ensure_dir/1 comment
2010-10-25 23:09:37 +02:00
Tuncer Ayaz
2d2aed627f
Refactor Dialyzer support to make it more usable
2010-10-25 22:37:18 +02:00
Dave Smith
7ddd4bdaad
Fixed 819; removed the edoc clean function entirely in favor of requiring user to explicitly specify what files should be deleted.
...
If there is no convention or way to programatically figure out what files to process, don't guess.
2010-10-25 06:31:07 -06:00
Tuncer Ayaz
1690139be9
Match ok result of filelib:ensure_dir/1
2010-10-22 22:12:25 +02:00
Dave Smith
67d4fbf337
Add support for overriding the default name/location of the escript; add support for cleaning generated script file
...
--HG--
extra : rebase_source : 466f440dcb699e031c5c520d28ee7731b60c535a
2010-10-19 14:21:41 -06:00
David Reid
968ef1cc77
First pass at updating dependencies (svn, hg, bzr untested)
2010-10-03 08:22:47 -07:00
Oscar Hellström
8ea62597ff
Use eunit_dir() instead of ?EUNIT_DIR since the function exists.
...
The eunit_dir() does use the ?EUNIT_DIR macro internally, but it also builds, what I guess is, an absolute path, which might be better :) At least it's more consistent.
2010-08-24 21:59:59 +02:00
Oscar Hellström
8c03d5959b
Make sure *both* .eunit and ebin directory exists before setting up the code path.
...
Normally the ebin directory doesn't contain any source files. Therefore it won't be kept in the repository by, at least, mercurial and also maybe git unless you put some .keep file in it or do some other hack. The ebin directory is created by rebar compile, but if rebar eunit is called before rebar compile, you end up with a {'EXIT', {{badmatch,{error,bad_directory}},...}. Another approach would be not to match cod:add_pathz(ebin_dir()) with ok, but I think this is an ok solution as well.
2010-08-24 21:54:54 +02:00
Tuncer Ayaz
79546e66ff
Add spec: rebar_utils:abort/2 does not return
...
Thanks to Kostis for no_return() result type.
2010-10-15 18:10:20 +02:00
Tuncer Ayaz
77660c5da6
Fix bug found by Dialyzer in neotoma compiler
...
Thanks to Cliff Moon for correct fun clause to add.
2010-10-14 22:05:11 +02:00
Tuncer Ayaz
c2917b31d4
Fix issues found by dialyzer
2010-10-10 23:24:20 +02:00
Kostis Sagonas
e024778599
Dialyzer related cleanups
2010-10-10 14:11:13 -06:00
Dave Smith
93f77b50fc
Made OTP app module validation optional
2010-10-10 13:30:44 -06:00
Andrew Thompson
1bf45036dc
Parse transforms and behaviours are compiled first
...
The previous code in rebar that was trying to ensure that parse
transforms and behaviours were compiled first doesn't work with multiple
compiler workers because of the possiblity of one of the workers
compiling a file that needs a parse transform or a behaviour at the same
time another worker is compiling that same parse transform or behaviour.
The solution this patch implements is to append any parse transforms and
any behaviours (in that order) to erl_first_files to ensure that they
are compiled before any regular files. This patch won't break any
currently working uses of erl_first files because we only append to the
list, so anything in erl_first_files is still compiled before anything
else.
2010-10-05 17:59:52 -04:00
Andrew Thompson
f2244b26be
Add optional eunit coverage report to terminal
...
Add a coverage report similar to the one output to index.html except
that it is output to the terminal if the new rebar.conf option
'cover_print_enabled' is set to true.
2010-10-06 21:05:13 +02:00
Tuncer Ayaz
2f1d527ef1
Fix bug 676
...
The previous fix to relax the regex was insufficient.
This is basically the diff proposed by Bryan Fink with
the difference of using 'C' instead of 'en_US'.
2010-10-02 22:58:25 +02:00
Tuncer Ayaz
73398562aa
Fix xrl_opts/yrl_opts option handling
2010-10-02 19:26:03 +02:00
Tuncer Ayaz
0a05775eed
Make SVN version matching locale agnostic
...
Reported-by: Manuel Duran Aguete <manuel@aguete.org>
2010-10-02 18:54:04 +02:00
Tuncer Ayaz
392e312b3f
Update TODO comment
2010-10-01 16:57:49 +02:00
Tuncer Ayaz
7200d18671
getopt optimization and dialyzer fix from Kostis
2010-10-01 15:55:17 +02:00
Tuncer Ayaz
933e4f7620
Fix dialyzer warning. Thanks Kostis
2010-10-01 14:37:42 +02:00
Tuncer Ayaz
851c602b20
Remove never matching clause
2010-10-01 14:26:38 +02:00
Tuncer Ayaz
778d4350b3
Fix warning: access the right record field
2010-10-01 13:41:55 +02:00
Tuncer Ayaz
1712425588
Fix another filename:join/2 warning. Thanks Kostis
2010-10-01 13:39:02 +02:00
Tuncer Ayaz
ba8daa5212
Log {error, read_error} dialyzer plt_info error
2010-09-30 13:38:14 +02:00
Tuncer Ayaz
59ecb2028d
Fix dialyzer warning: io:format/2 -> ok
2010-09-29 23:43:54 +02:00
Tuncer Ayaz
820012410a
Fix dialyzer warning for call to code:which/1
2010-09-29 23:31:50 +02:00
Tuncer Ayaz
b8b112524b
Fix dialyzer warning: os:find_executable(string())
2010-09-29 23:18:20 +02:00
Tuncer Ayaz
e33285aeaf
Fix dialyzer warnings in scm client vsn checks
2010-09-29 23:09:04 +02:00
Tuncer Ayaz
f8900aecc3
Fix dialyzer warning for rebar_utils:sh/2 call
...
rebar_utils:sh/2 terminates on error and does not return an error code
as expected.
2010-09-29 21:34:09 +02:00
Tuncer Ayaz
d590c18b5a
Fix dialyzer warning for filename:join/2 calls
2010-09-29 21:28:20 +02:00
Tuncer Ayaz
3354e8ebe0
Update getopt to v0.3.0
...
2010-09-23 Juan Jose Comellas <juanjo@comellas.org>
* Released v0.3.0
* Added support for rebar.
* Cleaned up dialyzer warnings.
2010-09-29 14:50:24 +02:00
Benjamin Nortier
ed8ecf751f
Added support for checking out tags from git
2010-09-15 11:10:53 +01:00
Dan Gudmundsson
83cece0f80
Basic tweaks for compiling ports/nifs on mingw
2010-09-18 16:34:19 -06:00
Dave Smith
9813126176
Adding support for embedding other apps via escript_incl_apps
...
--HG--
extra : rebase_source : 9eccc596d8fe55b2e0fe3ff2c9c0a9f9a8c92e11
2010-08-29 14:33:17 -06:00
Dave Smith
b32eeeafb7
Add support for specifying template directory on the command line
2010-08-28 08:04:47 -06:00
Tuncer Ayaz
33918a0612
Remove 'install' from available commands list
2010-08-25 22:32:42 +02:00
Dave Smith
51ed787290
Removing 'install' command; semantics were poorly defined could damage a typical OTP installation
2010-08-20 12:49:13 -06:00
Andrew Thompson
24cc775e88
Warn when a command is not implemented. Fail when no supplied commands are implemented
...
Rebar currently doesn't give any feedback on an invalid command. This change
makes rebar keep track of how many operations each command triggers, if a
particular command doesn't change the count, there were no modules implementing
it. If at the end of handling all commands, tje count is 0, none of the supplied
commands were valid and ?FAIL is called to trigger a non zero exit status.
2010-07-25 01:56:46 -04:00
Dave Smith
ce74846e4e
Fix bug 499; do not delete dependencies that are not in the deps/ directory
2010-08-20 10:42:02 -06:00
Dave Smith
ed59ed2b52
Fix bug 629; updated help for new common_test command
2010-08-20 09:53:23 -06:00
Dave Smith
b063d3b8df
Fix bug 438; add support for listing available templates
2010-08-20 09:30:37 -06:00
Juhani Rankimies
de716e1852
fix get-deps on win32
2010-08-04 11:07:37 +03:00
Dave Smith
101ea0f968
Fixing bug 463; trivial typo in @spec as identified by Bob Ippolito
2010-08-20 07:09:26 -06:00
Dave Smith
0262a3b461
Fixing bug 518; original patch by Tim Watson with some minor cleanups/clarifications
2010-07-28 07:57:04 -06:00
Dave Smith
370d8df02f
Only run pre/post scripts for current directory; thanks to Tim Watson for pointing this out
2010-07-27 20:27:57 -06:00
Tuncer Ayaz
34647928b2
Add rebar_pre_script courtesy of Geoff Cant
2010-07-24 01:53:17 +02:00
Dave Smith
5ee59c377a
Defaulting CC->cc and CXX->c++ for better cross platform support
2010-07-12 08:36:11 -06:00
Russell Brown
e4772c0763
beam_lib:chunks needs abs path to beam.
...
Uses code:which or cover:is_compiled to get path the beam for chunks
2010-07-04 22:14:56 +01:00
Tuncer Ayaz
688430fac0
Document doc command
2010-06-30 20:25:13 +02:00
Dave Smith
ef175652e4
Fix up code path for eunit so that parse transforms in eunit tests work properly
2010-06-28 15:19:19 -06:00
Dave Smith
f75bcdc7d5
Only skip eunit on apps IIF the app= parameter is specified
...
--HG--
extra : rebase_source : 2f2b819e209a912424c328dd57ec5e00268d40bc
2010-06-25 15:12:02 -06:00
Tuncer Ayaz
8ebbffafe6
Correct typo
2010-06-23 13:27:48 +02:00
Dave Smith
3588c69ad2
Fix bug 255; O/S environment vars should be processed last, not first
2010-06-22 20:38:45 -06:00
Dave Smith
8d14f3193d
Initial cleanup pass on rebar_ct; removing other targets in favor of "ct" (ala how eunit support works)
2010-06-22 15:43:09 -06:00
Dave Smith
c2b58ac62f
Change console message to debug message (more appropriate)
2010-06-22 15:42:05 -06:00
Dave Smith
9d09ccc99a
Adding support for restricting eunit to a specific application
2010-06-22 14:31:31 -06:00
Dave Smith
1f3c49cae7
Move version check/enforcement for reltool into rebar_reltool; rebar should work (excepting reltool support) with anything as far back as R12, once you've compiled it
2010-06-22 14:13:39 -06:00
Dave Smith
02bc52fc6a
Add support for embedding VCS info into the version data
2010-06-22 13:47:06 -06:00
Dave Smith
c32d26f509
Enable target_dir to be passed as command-line parameter
2010-06-22 10:25:42 -06:00
Dave Smith
127483f32b
Make sure to apply any file perms when doing a templated file
2010-06-21 15:08:30 -06:00
Dave Smith
f3039c7a87
Escape backslashes prior to escaping the quotes
2010-06-21 14:48:37 -06:00
Klas Johansson
07b20d16f8
Remove warnings reported by xref
...
Replace rebar_util:get_cwd/0 by rebar_utils:get_cwd/0. Luckily the
misspelt module name doesn't seem to have caused any harm, since
rebar_app_utils:is_app_dir/0 and rebar_rel_utils:is_rel_dir/0 aren't
called (only their /1 counterparts).
2010-06-19 18:53:54 +02:00
Klas Johansson
aea3184139
Fix compiler warnings
2010-06-19 15:46:57 +02:00
Dave Smith
ad7a494bde
Change semantics of skip_deps=true such that deps still get pre/post processed, just not actually run
2010-06-21 10:24:01 -06:00
Klas Johansson
4dae6318aa
Bugfix call to lists:member/2 in ulist/2
...
Change from lists:is_member/2 to lists:member/2, since the former
doesn't exist (the bug only affects rebar_plugins).
2010-06-19 10:08:34 +02:00
Andy Gross
b5d6fed2f6
fix call to dict:new (should be dict:from_list)
2010-06-16 22:57:01 -04:00
Dave Smith
68c0def250
Fix missing parameter when invoking rebar_utils:sh
2010-06-15 14:49:03 -06:00
Dave Smith
6f40b80ee3
Fixing http://hg.basho.com/rebar/issue/6 ; rebar_edoc was a little enthusiastic about deleting the doc dir
2010-06-15 14:37:00 -06:00
Dave Smith
4a12b13939
Refactor of overlay support in reltool extension; adding support for templating overlay files
...
--HG--
extra : rebase_source : f042bd65d63dbaf4177f444f66033883bf7522a5
2010-06-14 18:16:26 -06:00
Cliff Moon
55c1e44ba5
Added a compiler plugin for neotoma grammars
2010-05-03 22:59:43 -07:00
Dave Smith
deaabbe9a7
Adding support for compile/clean post scripts, per suggestion from Kevin Smith
2010-06-14 05:59:14 -06:00
Chris Chew
73a67adab4
Fixed problem where install was broken when the .app file is generated from
2010-06-07 11:55:22 -06:00
Russell Brown
7d6f04b42f
Stuffed in a global for deps dir.
...
*If* there is a deps_dir tuple in the root rebar.config then
that is used globally as the deps dir. This is to stop dependencies for dependencies being
created in a different deps_dir even if the sub dependency so specifies.
2010-06-12 21:55:58 +01:00
Tuncer Ayaz
6ea5a548e1
Add missing comma
2010-06-12 13:38:41 +02:00
Dave Smith
8f9300124e
Make delete-deps a bit smarter
2010-06-11 10:03:41 -06:00
Dave Smith
6efd2516ce
Re-add support for delete-deps
2010-06-09 14:07:34 -06:00
Dave Smith
9dda9c2578
Re-adding support for plugin modules
...
--HG--
extra : rebase_source : 90052500da62af1d32337f2d540acb39fdf67db4
2010-06-09 13:45:55 -06:00
Dave Smith
a86cb0b4fa
Re-add support for skip_deps
...
--HG--
extra : rebase_source : bd95812644fc600e7439f40d68259687e1bf9073
2010-06-09 13:32:28 -06:00
Dave Smith
3df1d4292a
Heavy-duty refactor to support truly transitive dependencies
...
--HG--
extra : rebase_source : 41c7f1c337a7cb63582aecd7b87ba998b40ba3aa
2010-06-09 13:16:58 -06:00
Dave Smith
dfb0d87658
Removing some unnecessary debugging messages
...
--HG--
extra : rebase_source : 05a045be5aed66ee292e6f5896ab6de71d4a2128
2010-06-09 13:16:12 -06:00
Dave Smith
5ec8918636
Cleaning up logging messages
...
--HG--
extra : rebase_source : 60b49fa683387a1cea498c2bec50421ef855fea6
2010-06-09 13:15:49 -06:00
Dave Smith
a2f1b62d74
Slightly different fix for bug#5 that avoids running preprocess twice
2010-06-08 13:31:43 -06:00
theiw
a88d70c627
Include EDoc generation support
2010-03-04 13:00:14 +00:00
Dave Smith
623200ec17
Adding rt for bug 5
2010-06-04 12:21:24 -06:00
Dave Smith
30ae41dafd
Minor cleanup of acc_modules for readability
2010-06-03 15:12:13 -06:00
Dave Smith
1866f65758
Refactor/simplify things since we only run one command at a time (versus a string of them)
2010-06-03 14:47:13 -06:00
Chris Bernard
4825353a23
Fix incorrect coverage count when prod modules include EUnit header.
...
Modules that include the EUnit header get an implicit test/0 fun,
which cover considers a runnable line, but eunit:(TestRepresentation)
never calls. Result: prod modules with tests can never reach 100%
coverage. Ironic. In this case, fix it by decrementing the NotCovered
counter returned by cover:analyze/3.
2010-05-15 15:09:45 -04:00
Bob Ippolito
35a928ecf2
merge ssh://hg@bitbucket.org/basho/rebar
2010-05-15 13:59:33 -07:00
Bob Ippolito
9dd9585d5b
include source path in compiler errors, process commands separately (to make get-deps compile work), ensure ebin dir, process iteratively to support transitive deps
2010-05-15 13:57:07 -07:00
Bob Ippolito
fc58d12820
fix hg and git clone commands for when repo does not exactly match application name
2010-05-11 14:46:20 -07:00
Bob Ippolito
124897e937
run plugins once, do not run as a preprocessor, add ebin to path early
2010-05-11 13:07:13 -07:00
Bob Ippolito
89b57e3aa4
when using plugin_modules, add ebin to path
2010-05-11 12:33:52 -07:00
Bob Ippolito
66f44c6362
fix backwards match for debugging print
2010-05-11 12:07:19 -07:00
Bob Ippolito
92be7a38bf
rebar_plugins in rebar_config to allow extensions
2010-05-11 08:35:47 -07:00
Bob Ippolito
59ab113f3b
Run the preprocess again if subdirs were compiled, fixes http://bitbucket.org/basho/rebar/issue/5
2010-05-08 07:07:28 -07:00