Commit graph

797 commits

Author SHA1 Message Date
Dave Smith
78fa8fc3d5 Merge branch 'saleyn-erlydtl' 2012-12-17 09:27:07 -07:00
Tuncer Ayaz
2716d83a18 Fix basho/rebar/issues/286 2012-12-17 12:53:48 +01:00
Dave Smith
71c717d86b Merge pull request #26 from l4u/patch-1
Support environment vars with unicode characters
2012-12-02 09:52:29 -08:00
Dave Smith
329eba4e52 Merge pull request #13 from tuncer/fixes
Fixes
2012-11-23 07:19:32 -08:00
Joseph Wayne Norton
7d624e9018 Add missing rebar_qc:clean/2 2012-11-23 22:14:56 +09:00
José Valim
61c353dcfd Support environment vars with unicode characters
The results returned by os:getenv() may contain unicode characters.
That said, we need to explicitly allow unicode when splitting the
environment information, otherwise badarg will be raised causing all
rebar commands to fail until the environment variable is removed.
2012-11-22 01:30:49 +08:00
Tuncer Ayaz
06dbb4cb80 Document escriptize command 2012-11-19 00:01:59 +01:00
Tuncer Ayaz
abb319d10a rebar_ct: fix wording in comments 2012-11-18 23:36:59 +01:00
Tuncer Ayaz
0d5583db5a rebar_require_vsn: remove trailing whitespace 2012-11-18 19:36:59 +01:00
Tuncer Ayaz
ed55df9648 rebar_neotoma_compiler: fix comment 2012-11-18 18:57:55 +01:00
serge
edfee29b15 Fix default DTL compilation when no erlydtl_opts are provided 2012-11-15 16:34:06 -05:00
Tuncer Ayaz
a015892e21 Cleanup rebar_core and rebar_erlc_compiler
Rename rebar_core functions for improved readability.
Remove redundant comments and blank lines.
2012-11-15 15:41:51 +01:00
Tuncer Ayaz
6a63ab9f6c rebar_erlc_compiler: fix src_dirs comment 2012-11-15 01:33:26 +01:00
Dave Smith
bf35ec9392 Merge branch 'ates-diameter' 2012-11-12 21:40:57 -07:00
Dave Smith
7dad2b384b Be sure to filter empty sources (h/t to Tuncer and Joe Norton) 2012-11-12 20:18:00 -07:00
Artem Teslenko
4c25718492 Add support to compile the Diameter dictionary files 2012-11-12 15:03:43 +02:00
Dave Smith
9ac6c25f6d Restore support for so_name, port_envs and port_sources 2012-11-11 13:03:24 -07:00
Tuncer Ayaz
a9491e112f Fix Dialyzer warning in rebar:run/2 2012-11-11 00:21:13 +01:00
Tuncer Ayaz
93f6ef36af rebar_erlydtl_compiler: fix incorrect lists:keysort/2 call 2012-11-11 00:14:42 +01:00
Dave Smith
0c8dd15c79 Merge pull request #328 from saleyn/depcheck
Fix erlydtl dependency check
2012-11-10 06:13:15 -08:00
Dave Smith
7826232a03 Merge pull request #327 from saleyn/erlydtl_compiler
Erlydtl compiler
2012-11-10 06:08:16 -08:00
Dave Smith
a2fb8fdc39 Expose Erlang API for invoking rebar 2012-11-06 08:40:41 -07:00
Dave Smith
a7c32f8d98 Add comment to explain why we're using sub_dirs by hand 2012-11-05 06:19:02 -07:00
Daniel Luna
b1a947488b Add all subdirs to xref library path 2012-11-05 06:19:02 -07:00
Daniel Luna
2b5844d14c Add email address to my name 2012-11-05 06:19:02 -07:00
Dave Smith
6eb7c08499 Merge pull request #293 from Motiejus/skip_deps
Add skip_deps=AppListSeparatedByCommas feature.

I agree it's a bit of a weird thing, but it's a reasonable and safe extension. When time comes to properly overhaul stuff, skip_deps should disappear entirely.
2012-10-31 19:47:13 -07:00
Arjan Scherpenisse
cc67814b65 ct: skip instead of halt on missing/unknown suite
This allows `rebar ct suites=abc` to consider all suites when
you have a rebar setup with multiple sub_dirs.

Previously, rebar halted after it could not find the suite in the
first dir. But the suite might be present in another dir (when
sub_dirs contains multiple dirs).

This commit makes it so instead of halting, it prints a warning and
continues with looking for the suite in the other `sub_dir`s.

Note -- This uses try/catch to cause the test to be skipped because
otherwise I needed to adjust the return values of 4 functions, the
code path is pretty deeply nested here. Otherwise the whole call chain
needed to be adjusted for this return value:

`run_test -> make_cmd -> get_suites -> find_suite_path`

IMHO, I think for exceptional cases like this it is fine to use throw;
specially since only the {skip} is catched and nothing else.
2012-10-31 20:37:42 -06:00
Dave Smith
3ee3a7cd9e Merge remote-tracking branch 'basho/master' 2012-10-30 21:26:54 -06:00
Dave Smith
08c510130e Merge pull request #243 from evanmcc/pevm_min_otp_version
Add support for minimum OTP versions
2012-10-30 19:23:08 -07:00
Tuncer Ayaz
588244465f Revert arch string changes 2012-10-29 16:01:28 +01:00
Serge Aleynikov
3f5ab55787 Fix erlydtl dependency check
When a DTL template includes other template files, those files don't need
to be compiled separately, and therefore can be given an extension different
from `source_ext` (such as `.dtli`) to avoid being compiled.  This fix
allows rebar to find included dependencies with names `*.dtl*` rather
than `*.dtl` and properly determine if a template file needs to be recompiled.
2012-10-25 07:25:56 +04:00
Magnus Henoch
e8169e91e4 Fix rebar_base_compiler:format_errors/3 for errors in include files
Handle the case where the error didn't occur in the file being
compiled.  That is, if there is an error on line 9 of bar.hrl,
instead of:

/path/to/foo.erl:9: type foo() already defined

print:

/path/to/bar.hrl:9: type foo() already defined
2012-10-22 22:10:26 +02:00
Serge Aleynikov
b606e3bfc5 Made more readable printout of the erlydtl compiler message
The printed message is made more terse.

Example before applying patch:

    ERROR: Compiling template src/view/test.dtl failed:
      {error,{"src/view/test.dtl",
              [{{4,7},
                erlydtl_parser,
                ["syntax error before: ",["\"\\\"HELLO_WORLD\\\"\""]]}]}}

Example after applying patch:

    ERROR: Compiling template "src/cmp_html_error_template.dtl" failed:
        (line:3, col:12): ["syntax error before: ",["trans"]]
2012-10-22 08:55:30 +04:00
Serge Aleynikov
38902e9a52 Specify multiple locations of DTL template files
Added a backward compartible feature to specify `erlydtl_opts' options
for the DTL template compiler to allow inclusion of templates in different
directories with different compilation settings for each. E.g.:

    {erlydtl_opts, [
          [{doc_root, "src/view"}, {module_ext, "_dtl_vw"}]
        , [{doc_root, "src"},      {module_ext, ""}, {recursive, false}]

        , {out_dir,   "ebin"}
        , {compiler_options, [verbose, debug_info]}
    ]}.

The definition above is identical to this (the last two options
are duplicated in each list):

    {erlydtl_opts, [
          [{doc_root,   "src/view"}
          ,{module_ext, "_dtl_vw"}
          ,{out_dir,    "ebin"}
          ,{compiler_options, [verbose, debug_info]}]

        , [{doc_root,   "src"}
          ,{module_ext, ""}
          ,{out_dir,    "ebin"}
          ,{compiler_options, [verbose, debug_info]}
          ,{recursive, false}]
    ]}.

In this case "src/view" and "src" directories containing template files
will be compiled.  A new `recursive' option tells rebar_erlydtl_compiler
to search files recursively from a given doc_root.  In the example above
the "src" directory won't be scanned recursively, and the target template
name for target beam modules won't have "_dtl_vw" suffix.
2012-10-22 08:39:44 +04:00
Dave Smith
53ae245725 Merge pull request #217 from alavrik/raw_deps_new
Add support for non-Erlang/OTP (raw) dependencies
2012-10-21 11:22:51 -07:00
Dave Smith
d896fbffa7 Merge pull request #325 from saleyn/reltool
Fix return value of rebar_overlay
2012-10-20 12:06:04 -07:00
serge
2d5bd56605 Fix return value of rebar:overlay/2
When 'rebar overlay' is run rebar_core got a wrong result
{Config, ok} from rebar_reltool instead of {ok, Config}.
2012-10-20 13:32:30 +04:00
serge
3de9167d99 Add hostname variable to reltool overlay templates 2012-10-20 03:05:42 +04:00
Anton Lavrik
0b833391ed Add support for non-Erlang/OTP (raw) dependencies
Introduce a new 'raw' option for dependency specs in rebar.config file.
For example:

{deps,
    {dependency_name, "1.0.*",
	 {git, "<...>", {branch, "master"}},
	 [raw]
    }
]}.

When this option is specified, rebar does not require the dependency to
have a standard Erlang/OTP layout which assumes presence of either
"src/dependency_name.app.src" or "ebin/dependency_name.app" files.

'raw' dependencies can still contain 'rebar.config' and even can have
the proper OTP directory layout, but they won't be compiled.

Only a subset of rebar commands will be executed on the 'raw'
subdirectories:

	get-deps, update-deps, check-deps, list-deps and delete-deps.
2012-10-11 02:06:08 -05:00
Tuncer Ayaz
32e67ef55e rebar_edoc: use correct proplist() type (Reported-by: Kostis Sagonas) 2012-10-03 12:28:19 +02:00
Dave Smith
8ff99f98b3 noshell/noinput should NOT be the default emulator args for an escript 2012-10-02 20:17:09 -06:00
Tuncer Ayaz
2829741a38 Fix whitespace errors 2012-09-28 23:37:18 +02:00
Martin Schut
fbbeb360a5 deps: add fossil scm support 2012-09-28 23:34:53 +02:00
Tuncer Ayaz
f4e55b8463 Fix fprof use (-p/--profile) 2012-09-26 22:18:35 +02:00
Tuncer Ayaz
1b52a597c4 Revert 15b7798e4 and restore old git-describe call
Restore previous 'git describe' behaviour as discussed here:
http://lists.basho.com/pipermail/rebar_lists.basho.com/2012-September/001713.html
2012-09-21 17:20:03 +02:00
Tuncer Ayaz
9521586bdd rebar_deps: fix whitespace errors 2012-09-15 19:05:15 +02:00
Yurii Rashkovskii
9a57e06015 Restore ability to specify deps_dir on the command line
It was previously possible to run `rebar compile deps_dir=/path/to/deps`,
but as of 70d27c5720, it was nixed.
2012-09-15 18:58:02 +02:00
Shunichi Shinohara
22b703efa8 eunit: analyze coverage only for cover compiled modules
This change fixes #310.
2012-09-13 22:30:30 +02:00
Daniel Luna
7bd318c219 xref: allow multiple behaviours and ignore_xref pragmas 2012-09-13 22:20:55 +02:00
Eric Merritt
eaad535e31 Allow script to be evaluated when app file is loaded
This allows an <app-name>.app.src.script to be defined and evaluated
when <app-name>.app.src or <app-name>.app are loaded. This allows the
user to add project specific manipulations to app metadata.
2012-09-07 22:53:50 +02:00