Commit graph

26 commits

Author SHA1 Message Date
Tomas Abrahamsson
1ce7059adb Recompile .proto files with gpb also with prefix/suffix
For protocol buffer files, when there were gpb options to alter the
module name with prefix or suffix, recompilation was not properly
detected. This is now fixed. (Issue #384).

Use the rebar_base_compiler's ability to specify both source and
target file names, to be able to also support prefixes.

This also introduces a call to gpb_compile:format_error, so the xref
recipe needs to be updated to ignore it, to avoid false errors.
2015-01-24 22:11:04 +01:00
Fred Hebert
17e0b14d1d Merge pull request #203 from tomas-abrahamsson/pluggable-proto-compilers-gpb
Pluggable proto compilers gpb
2014-10-31 09:32:13 -04:00
Tomas Abrahamsson
1b367a8b24 Add support for compiling proto files using gpb
This adds the config option {proto_compiler,gpb} for selecting gpb
as the compiler for protocol buffer files. When gpb is used as
compiler, it reads the gpb_opts config item for options.
2014-10-29 23:45:35 +01:00
Tuncer Ayaz
631d74c00f Implement eflame -p/--profile support
When -p/--profile is enabled, you can select the profiler as follows:

generate flame graph (eflame.svg) from trace (eflame.trace)
$ rebar -p compile profiler=eflame

generate fprof.analysis
$ rebar -p compile

generate fprof.analysis
$ rebar -p compile profiler=fprof
2014-10-29 19:24:58 +01:00
Tuncer Ayaz
15373a580f Fix typo s/of/on/ 2014-07-13 15:12:09 +02:00
Tuncer Ayaz
71c2f17c9b Remove warnings_as_errors from rebar.config
rebar's beam files are actually compiled by bootstrap's call to
make:files/2, so warnings_as_errors in rebar.config isn't really used.
2014-07-01 11:17:26 +02:00
Tuncer Ayaz
5f995bfdc0 Fix a few minor formatting inconsistencies
* fix overlong lines
* where appropriate use %% instead of %
2014-06-29 21:13:45 +02:00
Matwey V. Kornilov
a7e05f57d1 Fix build for 17.0 using the solutiong proposed by @tsloughter
We use namespaced_types option to choose between dict() and dict:dict() types.
2014-06-08 14:34:04 +04:00
Tuncer Ayaz
e74a0feb05 rebar.config: delete unused and unimplemented 'app_bin' option
app_bin option was used by the install command which has been
removed in 51ed787.
2012-11-19 00:16:34 +01:00
Dave Smith
473843d3cc Add diameter exclusions to xref 2012-11-12 21:40:35 -07:00
Tuncer Ayaz
e0bc55db33 Use R15B02 EUnit {test,M,F} primitive as suggested by Richard Carlsson 2012-09-06 00:50:46 +02:00
Tuncer Ayaz
73e9413a01 Update custom xref query 2012-09-04 16:56:15 +02:00
Tuncer Ayaz
0af95507aa Update custom xref query (eunit_test calls)
eunit_test:function_wrapper/2 was renamed to eunit:mf_wrapper/2 in
R15B02. Ignore both calls like we do with escript:foldl/3.
2012-08-31 22:20:22 +02:00
Tuncer Ayaz
563607bc02 Change escript zip archive creation as suggested by Siri Hansen
1. manually insert directory entries to work around issues fixed in
   R15B02 erl_prim_loader
2. put the escript archive's beams in appname/appname/ebin

Tested with R13B03 and R15B01.
2012-08-11 18:47:25 +02:00
Tuncer Ayaz
556f47579d No need to re-specify default escript_shebang in rebar.config 2012-07-30 20:24:50 +02:00
Tuncer Ayaz
c91250d2df Use [{File,Bin}, ...] in escriptize zip:create 2012-06-17 23:03:29 +02:00
Tuncer Ayaz
83879c22e1 Add missing escriptize comments 2012-06-17 22:57:33 +02:00
Tuncer Ayaz
1e980859e2 Extend escriptize and reuse in bootstrap 2012-06-14 23:46:55 +02:00
Amit Kapoor
6ada1c24c7 Update filter list for custom xref query
Rebar has support for optional compilers built-in. These compilers might
not be installed causing xref to return errors for the undefined external
function calls query. The updated filter list will catch this error and
act as a nop if they are installed.
2012-04-04 20:43:25 +02:00
Amit Kapoor
0191806f92 Add support for custom xref queries
The custom queries are configured in rebar.config via the tuple
{xref_queries, [{query(), query_result()},...]}.  The implementation
passes the query() string to xref:q and compares the return value with
query_result(). It will result in an error if they do not match.

The following configuration, for example, is the same as running the
xref check undefined_function_calls. It additionally filters
ejabberd_logger:*_msg/4 from the result as these functions are generated
on execution by ejabberd and not available at compile time.

{xref_queries, [{"(XC - UC) || (XU - X - B -
                 (\"ejabberd_logger\":\".*_msg\"/\"4\"))",[]}]}.

This patch also modifies the build process of this package by running a
custom query instead of doing a diff against a static xref_warning file.
2012-04-02 19:14:37 +02:00
Piotr Usewicz
df4e836c4e Add file local variables where appropriate 2011-04-15 17:22:49 +02:00
Tuncer Ayaz
27de53125e Use warnings_as_errors instead of fail_on_warning 2011-04-07 21:56:53 +02:00
Tuncer Ayaz
be209f24ff Make debug_info default
Add no_debug_info option.
Remove debug_info=1 option.
2011-03-30 11:19:37 +02:00
Dave Smith
f36e044e5d Enable xref checks on rebar 2010-04-09 09:25:08 -06:00
Dave Smith
7cf35a88ba Enable fail_on_warning by default 2009-12-14 09:27:58 -05:00
Jon Meredith
8e91e1014e Connected up symlinking the list of progs in rebar.config/app_bin
to the OTP bin dir.
2009-11-30 12:02:09 -07:00