Commit graph

111 commits

Author SHA1 Message Date
Tuncer Ayaz
1daa15293a Reverse order in rebar_utils:get_deprecated_global/3 2012-01-06 19:50:20 +01:00
Tuncer Ayaz
27e5a0ae5b Cleanup and simplify deprecated option handling 2012-01-01 15:10:35 +01:00
Tuncer Ayaz
1de48e4902 Move vcs_vsn/2 to rebar_utils 2011-12-28 13:09:46 +01:00
Tuncer Ayaz
8c89a388bf Universally support apps=/skip_apps= 2011-12-12 21:20:34 +01:00
Tuncer Ayaz
a5e39c2c54 Move is_skipped_app/0 to rebar_app_utils 2011-12-12 17:53:56 +01:00
Tuncer Ayaz
b1d84514f0 Add rebar_utils:deprecated/4 and remove define 2011-12-12 17:52:04 +01:00
Torbjorn Tornkvist
b4f136d752 Make 'rebar xref' honour the skip_app directive
It is now possible to call rebar as:

  rebar xref skip_app=Mod1,Mod2,...

This makes it easy to skip running xref on (e.g)
imported dependencies in your application.

The function rebar_utils:is_skipped_app/0 is added so
that other rebar commands may use it.
2011-12-12 17:06:23 +01:00
Jan Kloetzke
b10224be62 Fix rebar_utils:expand_env_variable/3
The function may fail with a badarg exception because the first regex
returns an iolist() which is allowed to be a improper list. In this case
'++' cannot append to the iolist. The correct way to append something to
an iolist() is

  [iolist(), "tail"]

because iolist's are allowed to be arbitrarily deep lists.
2011-11-01 22:00:15 +01:00
Tuncer Ayaz
c373f29292 Fix comments and formatting 2011-10-26 23:16:36 +02:00
Dave Smith
17616d1078 Overhaul environment expansion for better performance
The introduction of setup_env as a global concept caused the rebar_port_compiler
implementation to start getting called a LOT. The expansion of environment variables
that happens in the port compiler was O(n^n), which means you could see upwards of
80k invocations of lists:foldl on a single app "./rebar clean". This commit reworks
the expansion to be O(n^2), and reduces the running time for the same operation by
60%+. On a large project like Riak, the end result is that a build went from 200
seconds to 73.
2011-10-26 23:16:36 +02:00
Jan Klötzke
b535b5eea8 rebar_utils:sh/2: remove bash invocation on Windows
Currently rebar_utils:sh/2 will invoke all commands through bash.exe if
found. Otherwise the command will be executed directly. Despite the fact
that the caller cannot know if the command is executed with Unix or
Windows semantics it leads to problems with MSYS's automatic path name
translation.

Therefore remove bash usage on Windows to get a consistent behavior and
to avoid the peculiarities of MSYS's automatic path conversion. Instead
use cmd.exe as its typically needed by most commands.
2011-10-20 16:27:35 +02:00
Tuncer Ayaz
317eeb72e0 Fix Dialyzer warning 2011-09-08 22:54:44 +02:00
Tuncer Ayaz
93128f2f6b Search plugin sources in base_dir and plugin_dir 2011-08-29 17:27:45 +02:00
Tuncer Ayaz
e6d1e13966 Apply Tidier suggestions 2011-08-20 18:33:36 +02:00
Tuncer Ayaz
8fb385f312 Limit line length 2011-08-20 18:26:59 +02:00
Jan Klötzke
7ec9b48d50 Support command invocation on Windows without MSYS
If MSYS (with bash) is not installed on Windows then do the shell
variable substitution by ourselves. Otherwise just call bash to do the
job.
2011-08-20 18:20:26 +02:00
Tuncer Ayaz
1846a5086c Remove unused function rebar_utils:deprecated/4 2011-07-28 22:29:02 +02:00
Tuncer Ayaz
d9ef6fbd53 Optimize list ops and error reporting in sh/2 2011-07-18 18:58:20 +02:00
Tuncer Ayaz
fbd2778c04 Deprecate xrl_opts/yrl_opts fail_on_warning opt 2011-06-08 19:44:57 +02:00
Tuncer Ayaz
70137292e1 Extract code to get wordsize into helper function 2011-05-31 10:52:23 +02:00
Steve Vinoski
0bbb2985f0 Use external wordsize to get emulator build arch
Calling erlang:system_info(wordsize) yields the internal word size of
the Erlang emulator. But due to the halfword emulator, need to pass
{wordsize, external} instead to get the word size, or pointer size, as
seen by external code such as NIFs. The halfword emulator has 4 byte
internal words but 8 byte external words due to 64-bit compilation,
which means NIFs for the halfword emulator also have to be compiled
64-bit. But just passing wordsize is equivalent to passing {wordsize,
internal}, which does not indicate the pointer size for the halfword
emulator.

Older versions of Erlang do not support {wordsize, external}, though,
so continue to pass just wordsize for those versions.
2011-05-31 10:47:45 +02:00
Dave Smith
4be3631687 Make sure to pass dir of app when invoking git; enhance shell logging output 2011-04-10 16:12:50 -06:00
Tuncer Ayaz
055ac99d6f Deprecate fail_on_warning and refactor code 2011-04-07 21:56:53 +02:00
Juan Jose Comellas
58661a92e2 Convert the entries in the code path to absolute paths
Rebar will exit with {error,bad_directory} when trying to restore the code
path after it has finished working on a subdirectory if there are invalid
relative paths in it. The problem was seen when executing the last line of
rebar_erlc_compiler:doterl_compile/3 (true = code:set_path(CurrPath)).
2011-02-26 15:57:17 +01:00
joewilliams
4e8dcfbfad Clean up rebar_appups and rebar_upgrade 2011-02-17 17:13:19 +01:00
joewilliams
11bf6b4aab Add 'generate-appups' command
To further support OTP releases I have added support for generating
application appup files. These include instructions that systools uses
to generate a relup file which contains the low level instructions
needed to perform a hot code upgrade. My goal with this module is to
produce "good enough" appup files or at least a skeleton to help one get
started with something more complex. If an appup file already exists for
an application this command will not attempt to create a new one.

Usage:
$ rebar generate-appups previous_release=/path/to/old/version

Generally this command will be run just before 'generate-upgrade'.
2011-02-15 18:33:18 +01:00
Tuncer Ayaz
63de05d914 Clean up code 2011-02-06 17:41:04 +01:00
Tuncer Ayaz
c466076ffb Clean up emacs file local variables 2011-01-31 17:55:36 +01:00
Tuncer Ayaz
e4036cbe56 Apply Tidier suggestions 2011-01-13 17:39:14 +01:00
Joseph Wayne Norton
5b05e54cda Add otp_release to platform string 2011-01-09 16:06:51 +01:00
Tuncer Ayaz
5a37149642 Fix Dialyzer warning 2011-01-09 09:46:08 +01:00
Tuncer Ayaz
220eec71f6 Remove unused fun rebar_utils:get_os/0 2011-01-09 09:45:43 +01:00
Juhani Rankimies
52ca7795fe Unify executable invocation
Add flags to rebar_utils:sh to control output and error handling.
Replace calls to os:cmd with calls to rebar_utils:sh.
2011-01-06 15:02:19 +01:00
Juhani Rankimies
fe664e8c50 Fix bug 805
Use rebar_utils:find_executable/1 that wraps the
path in quotes to make it work even if it contains
whitespace.
2010-11-22 23:48:28 +01: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
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
392e312b3f Update TODO comment 2010-10-01 16:57:49 +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
Dan Gudmundsson
83cece0f80 Basic tweaks for compiling ports/nifs on mingw 2010-09-18 16:34:19 -06:00
Juhani Rankimies
de716e1852 fix get-deps on win32 2010-08-04 11:07:37 +03:00
Jon Meredith
bf3dfcb34b Taught eunit/coverage to split the src module coverage stats from any test code. 2010-05-03 11:37:14 -06:00
Tuncer Ayaz
faf21694fe Make sure zip module is loaded
Before we check for zip:foldl/3 make sure zip module is loaded.
2010-03-11 01:27:46 +01:00
Tuncer Ayaz
aeabfb6fe9 Add escript_foldl/3 TODO
Comment what has to be done when the new OTP release is out
and the time is right.
2010-03-06 00:04:50 +01:00
Tuncer Ayaz
dfb5af4049 Add forward-compatible escript_foldl function
escript:foldl/3 was undocumented and has been replaced with
better APIs post-R13B04. The new exported funs are officially
documented.
2010-03-05 22:56:31 +01:00
Tuncer Ayaz
00c855d030 Update comment for filelib:ensure_dir/1 wrapper.
The wrapper can now be removed as I've fixed the problem in R13B04.
2010-02-17 23:38:06 +01:00
Dave Smith
1f6d861aba Overhaul env expansion so that rebar fully expands env refs prior to invoking the shell script. Also now using DRV_* env vars for compilation/linking of files found in c_src; this frees up "normal" CFLAGS/LDFLAGS for usage in sub build scripts. 2010-02-16 07:05:29 -07:00
Dave Smith
96c1ceba60 Break out arch string function; update ERLANG_TARGET to include bitness of the Erlang target 2010-02-12 15:05:32 -07:00
Dave Smith
22d21f63d0 Append wordsize to the architecture string 2010-02-10 14:05:52 -07:00
theiw
788bd3df72 Provide package support for eunit; build_plt now includes listed applications; begin including -spec annotations 2010-02-05 17:34:38 +00:00
Tuncer Ayaz
4ac1f3efe9 Fixed issue 1 "priv/mibs/ is not automatically created" 2010-01-08 23:06:29 +01:00
Dave Smith
fa2a58261a Another round of refactoring to yield better flexiblity in the base_compiler system 2010-01-03 22:53:04 -07:00
Tuncer Ayaz
9a8015f2d7 Added vi modeline/emacs local variables to file headers 2009-12-31 19:42:53 +01:00
Dave Smith
5cd5870f32 Got basic retrieval of deps from hg sorta working; minor refactoring of rebar_utils:sh interface 2009-12-30 20:03:27 -07:00
Dave Smith
fe03778678 Silence warnings, courtesy of Tuncer Ayaz 2009-12-28 07:24:15 -07:00
jmeredith@jons-macbook.local
bed9ab10aa Added now_str to return the local time as a string. 2009-12-03 22:46:37 -07:00
Dave Smith
dbd576fc33 Adding more flexible arch check; adding sh command 2009-12-01 10:38:20 -07:00
Dave Smith
c7c1001012 Slowly working out port driver implementation 2009-11-30 16:03:45 -07:00
Dave Smith
620867d5d5 More work on getting compilation and clean working properly 2009-11-25 20:24:51 -07:00
Dave Smith
b7e2088c27 Initial commit 2009-11-25 15:23:42 -07:00