Commit graph

1692 commits

Author SHA1 Message Date
David Kubecka
d61b51bcf8 Stop silently supressing errors from process_attr/2
Otherwise the code cannot be safely refactored, since
potential new erros slip unnoticed.
2015-04-05 00:16:56 +02:00
David Kubecka
fd482b661a Stop passing useless Config into erlcinfo_file
Also pas only InclDirs into init_erlcinfo as this is the only
thing from Config/ErlOpts needed there.
2015-04-05 00:16:56 +02:00
David Kubecka
b0320ce058 Basic test for erlc (re)compiling and erlcinfo 2015-04-05 00:16:50 +02:00
David Kubecka
f61ca47b23 Remove useless compile/3
Its case statement is noop.
2015-04-05 00:15:07 +02:00
David Kubecka
eb79622903 Allow running specific retest suites 2015-04-05 00:15:07 +02:00
Fred Hebert
c3b09ba170 Merge pull request #354 from vladdu/compiler_keep_going
compiler respects 'keep_going' flag
2015-04-02 18:32:33 -04:00
Vlad Dumitrescu
797d2b6937 add tests for 'compiler keep_going' 2015-04-02 16:55:48 +02:00
Vlad Dumitrescu
ae79184555 compiler and xref respect 'keep_going' flag 2015-04-02 16:53:24 +02:00
Fred Hebert
99f8580678 Merge pull request #471 from tuncer/formatting-fixes-2
Fix whitespace errors
2015-04-02 10:27:11 -04:00
Tuncer Ayaz
fe4a62cb18 Fix whitespace errors 2015-04-02 16:21:20 +02:00
Fred Hebert
e7bac0a03d Merge pull request #470 from tuncer/formatting-fixes
Fix whitespace errors
2015-04-02 10:14:44 -04:00
Tuncer Ayaz
6127f528b9 Fix whitespace errors 2015-04-02 16:10:31 +02:00
Fred Hebert
65b0f917b8 Merge pull request #456 from glyphrider/master
Generate json output from cover
2015-04-02 09:43:58 -04:00
Fred Hebert
e747bfac5d Merge pull request #469 from tuncer/fix-dialyzer-warnings
Fix dialyzer warnings
2015-03-31 13:06:14 -04:00
Tuncer Ayaz
e0ee7373e9 Fix 17.x Dialyzer warnings 2015-03-31 19:03:54 +02:00
Tuncer Ayaz
8f317965eb Fix a Dialyzer warning in the recently introduced rebar_otp_appup.erl 2015-03-31 19:03:54 +02:00
Fred Hebert
0d79645c2d fix comment typo 2015-03-29 13:47:30 -04:00
Fred Hebert
9b69740fa1 Merge pull request #466 from kejv/improve-makefile
Improve test targets in Makefile
2015-03-26 09:04:51 -07:00
David Kubecka
f3f8f29920 Improve test targets in Makefile
- enable running eunit and retest tests separately
- add neccessary dependencies to each test target so that
  one can just do 'make test' without recompiling changed files
  manually
- enable overwriting retest's log level
- use retest's own Makefile instead of invoking rebar manually
2015-03-26 11:28:37 +01:00
Brian H. Ward
f19c7d0785 Add 'cover_export_json' option 2015-03-11 06:09:07 -04:00
Fred Hebert
02de46d01f Merge pull request #463 from tuncer/profiler-msg
Print more info when profiling
2015-03-08 20:00:59 -04:00
Tuncer Ayaz
e8fe6c33ad Print more info when profiling
* profiler= is preliminary and will be replaced with a
  different interface
* fail gracefully if unknown profiler is passed
2015-03-08 18:48:59 +01:00
Fred Hebert
223d762f0d Merge pull request #461 from lrascao/fix/crash_empty_appup
Fix OTP .appup.src processing on empty lists
2015-03-02 10:22:00 -05:00
Luis Rascao
2ebd804e1e Fix OTP .appup.src processing on empty lists
Expand test cases to handle .appup.src with
empty upgrade from and downgrade to lists, lift
larger .appup.src file from OTP's
lib/dialyzer/test/r9c_SUITE_data/src/asn1/asn1.appup.src
2015-03-02 11:47:36 +00:00
Tristan Sloughter
e7933d83b9 Merge pull request #459 from cmeiklejohn/emu-64
Remove -m64 flag.
2015-02-26 12:03:03 -06:00
Christopher Meiklejohn
3bc43753e5 Remove -m64 flag.
On 64-bit Linux, remove the emulation mode flag, given -m64 is an
invalid emulation mode on 64-bit Linux.

Example compilation from Basho's erlang_js on Linux:

```
ld: unrecognised emulation mode: 64
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om i386pep i386pe
make[4]: *** [Linux_All_OPT.OBJ/libjs.so] Error 1
```
2015-02-26 12:34:29 -05:00
Fred Hebert
d4675a5b06 Merge pull request #458 from manderson26/ma/improve_variable_expansion
Change env var delimiter to match non-word
2015-02-25 14:22:26 -05:00
Mark Anderson
e211afdce6 Change env var delimiter to match non-word
If I pass an expression like: "$PWD/deps/local/lib" in the port env
string, it expands to "/deps/local/lib", (variable is expanded to the
empty string) but if I pass "${PWD}/deps/local/lib" it expands
properly. I found that confusing.

This was because we require environment vars to end with whitespace,
while I think requiring a non-word character would be sufficient, since
the variables can only contain word characters.

This changes the expansion system to recognize variables that are
terminated by non word characters.

This includes some fixes as per some comments by tuncer.

Fixes rebar/rebar#457
2015-02-23 19:11:51 -08:00
Fred Hebert
f56268383a Merge pull request #452 from yannayl/patch-1
added 'shell' command to bash-completion
2015-02-15 11:23:31 -05:00
yannayl
da7d413fb0 Add 'shell' sub-command to shell-completion 2015-02-13 09:05:33 +00:00
Fred Hebert
7f73b8d365 Merge pull request #449 from lrascao/feature/support_appup_src_files
Support .appup.src files
2015-02-05 08:12:43 -05:00
Luis Rascao
53fbb7cf8e Support .appup.src[.script] files
Similar to how .app.src are being handled, all files in directory
.src ending with .appup.src are processed, checked for
correctness and copied to ebin without the .src extension.

By way of using rebar_config:consult_file/1, .appup.src.script
files are automatically supported in exactly the same manner
as in .app.src.script.
2015-02-04 22:33:16 +00:00
Fred Hebert
0eecd4d050 Merge pull request #378 from irpab/remove_last_dot_in_deps_dir
deps: fix delete-deps if deps_dir ends with dot
2015-02-04 14:48:19 -05:00
Pavel Baturko
703a9dae9e deps: fix delete-deps if deps_dir ends with dot
Remove possible last dot from deps dir path by calling
dirname on base_dir, deps_dir and dummy path part.
With this fix delete-deps command deletes dependencies
properly in case of deps dir path ended with dot.
Examples of deps_dir config value that triggers error:
".", "some/path/.".
Code that triggers error: rebar_deps:'delete-deps'/2,
code line lists:prefix(DepsDir, D#dep.dir).
If deps_dir = ".", cwd = "/root", dependency name = "app"
then DepsDir = "/root/." and D#dep.dir = "/root/app" so
prefix fun returns false but should be true.
Dependency app will not be removed because of this.
2015-02-03 23:21:46 +03:00
Fred Hebert
c051530b3c Merge pull request #445 from norton/norton-erlc-order
rebar doesn't respect the order of erl_first_files given in the rebar.conf file
2015-02-02 11:06:12 -05:00
Fred Hebert
7811c1f335 Merge pull request #447 from lrascao/feature/support_custom_proto_dir
Support custom protobuf directory
2015-02-02 11:05:47 -05:00
Luis Rascao
bf2b3e2468 Support custom protobuf directory
proto_opts config option contains the compiler directive
that defines which proto compiler to use, also contains a
src_dirs entry that defines a list of locations for the
.proto files to be processed.

Add integration test that compiles .proto files from src
and from proto directory specified in separate rebar
config files
2015-01-31 19:47:59 +00:00
Fred Hebert
fffc745e11 Merge pull request #305 from liskin/linux-multiarch-64
Fix compiler invocation on multiarch Linux
2015-01-30 11:35:13 -05:00
Fred Hebert
48e041dd9e Merge pull request #444 from tuncer/app-warning
Fix incorrect "not an app dir" warning
2015-01-27 09:09:48 -05:00
Tuncer Ayaz
59d1d0c34d Fix incorrect "not an app dir" warning 2015-01-27 12:08:59 +01:00
Joseph Wayne Norton
27cd98ef1d Test order for erl_first_files 2015-01-26 20:41:38 -06:00
Slava Yurin
d7657ba732 Keep order for erl_first_files 2015-01-26 20:41:38 -06:00
Fred Hebert
b488179030 Merge pull request #424 from tomas-abrahamsson/gpb-recompilation-detection-2
Gpb recompilation detection (using base compiler)
2015-01-26 18:54:19 -05:00
Fred Hebert
930d2c7f34 Merge pull request #437 from vladdu/fix_app_src
Fix .app.src.script bug introduced in b44b4f4
2015-01-26 18:53:52 -05:00
Luis Rascao
9b1f807f0c gpb: add inttest for recompilation with no changes 2015-01-24 22:11:05 +01:00
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
Tomas Abrahamsson
2e9706fd61 Make the base compiler accept target file names
The rebar_base_compiler:run/5 is an alternative to run/8, where
instead of source/target dirs and file name extensions, it takes
a list of tuples: [{SourceFileName, TargetFileName}], after the
idea by Tuncer Ayaz in discussion with Luis Rascão and me.

This is useful for situations where the target file name cannot be
expressed as only a new suffix or extension.  For example the gpb
protocol buffer compiler can take an option to add a file name prefix
as well as a suffix.

As a result, the values passed around inside the internal functions in
rebar_base_compiler are either source file names (eg. when the run/4
function has been called), or items, which are two-tuples
{SourceFileName,TargetFileName} (when the run/7,8 or /5 functions have
been called).
2015-01-24 22:11:04 +01:00
Tomas Abrahamsson
135e629bc0 Use rebar_utils:find_files_by_ext/2,3 2015-01-24 22:11:04 +01:00
Tomas Abrahamsson
a04530124f Add rebar_utils:find_files_by_ext/2,3
This finds files by extension, avoiding resource fork files
in Mac OS X.
2015-01-24 22:11:04 +01:00
Fred Hebert
83156cc1ef Merge pull request #430 from robertoaloi/fail-if-nodetool-eval-fails
Exit with proper status code if 'eval' fails
2015-01-23 08:39:49 -05:00