Commit graph

1700 commits

Author SHA1 Message Date
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
Fred Hebert
6586c61e26 Merge pull request #442 from tuncer/travis-info
.travis.yml: print information before running script
2015-01-23 08:39:08 -05:00
Roberto Aloi
0d5416218b Exit with proper status code if 'eval' fails 2015-01-23 08:31:58 +01:00
Tuncer Ayaz
332bbf3de9 .travis.yml: print information before running script 2015-01-22 22:23:05 +01:00
Fred Hebert
78379493d4 Merge pull request #440 from tuncer/obsolete-file
Delete obsolete file
2015-01-22 10:46:02 -05:00
Tuncer Ayaz
b2eb09c565 Delete obsolete file 2015-01-21 15:24:14 +01:00
Fred Hebert
73be1ea47e Merge pull request #426 from seriyps/mv-upgrade-to-nodetool
Fixed #133. Release upgrade now handle long and short names properly.
2015-01-20 12:43:19 -05:00
Vlad Dumitrescu
5f0ab0268e Fix .app.src.script bug introduced in b44b4f4
Handle the case when both .app.src and .app.src.script exist;
the script takes precedence.
2015-01-20 17:09:11 +01:00
Сергей Прохоров
0a1961fb0d Fixed #133. Release upgrade handle long and short names properly.
Implemented, by moving upgrade functionality from install_upgrade.escript
to nodetool, which already supports both short and long names.
Make install_upgrade.escript as wrapper for nodetool for backward compatibility.
2015-01-20 10:18:10 +03:00
Fred Hebert
25aca7ed39 Merge pull request #433 from tuncer/ct3
inttest/ct3: fix overlong line
2015-01-14 18:14:57 -05:00
Tuncer Ayaz
7520ad62ba inttest/ct3: fix overlong line 2015-01-14 23:19:16 +01:00
Fred Hebert
890390b1c4 Merge pull request #421 from tuncer/fix-travis-ci-shortname
inttest/ct3: fix travis-ci breakage
2015-01-14 15:20:13 -05:00
Tuncer Ayaz
ebebeb0318 Fix travis-ci tests
Spinning up a distributed Erlang node by running 'erl -name ct3' failed
due to FQDN issues. Hiro Asari from Travis-CI suggested to try out the
new container-based workers as a fix, and that one works as expected
because we get a proper FQDN. Therefore, make the switch to
container-based workers.
2015-01-14 21:12:38 +01:00
Fred Hebert
107c9af2ed Merge pull request #432 from tuncer/doc
Document recursive_cmds in -r help string as well
2015-01-14 14:59:36 -05:00
Fred Hebert
22ff2ef771 Merge pull request #428 from tomas-abrahamsson/mock-gpb-and-protobuffs-in-inttest
Remove a git url in gpb and protobuffs inttest configs
2015-01-14 14:54:21 -05:00
Tuncer Ayaz
1d20be707f Document recursive_cmds in -r help string as well
{recursive_cmds, []} was already documented as part of the core
rebar.config options that gets printed via 'rebar -h', but this wasn't
sufficiently informative.  To fix this, explain the use of
recursive_cmds as part of the -r help string.

Reported-by: Stefan Strigler
2015-01-14 20:23:05 +01:00
Tomas Abrahamsson
5182ded01c Remove a git url in gpb and protobuffs inttest configs
In the rebar.config files for the gpb and protobuffs inttests, use the
{Name, Version} dependency form instead of {Name, Version, Source},
since the Source is not really applicable; the mocks are copied into
place by the proto_gpb_rt:files/0 and proto_protobuffs_rt:files/0.
Idea and suggestion by Tuncer Ayaz.
2015-01-13 00:11:47 +01:00
Fred Hebert
473d9fe145 Merge pull request #425 from tomas-abrahamsson/mock-gpb-and-protobuffs-in-inttest
Copy instead of rsync gpb and protobuffs inttest mocks
2015-01-12 09:18:21 -05:00
Tomas Abrahamsson
a8ffba6da5 Copy instead of rsync gpb and protobuffs inttest mocks
Installation of the gpb and protobuffs mocks, in inttest, is now done
using copy in proto_{gpb,protobuffs}_rt:files/0.  Previously, rebar
prepare-deps was used, the dependencies had an rsync source with a
relative path back to the inttest directory.  This eliminates a
dependency in inttest to rsync, instead relying on retest's
functionality to copy files and directories.  Also, it eliminates
hidden knowledge about the directory layout that retest chooses.
Idea and suggestion by Tuncer Ayaz.

Since the dependency sources in the inttest rebar.config files are no
longer used, they are now changed back from rsync paths to git urls,
to serve as examples.
2015-01-10 23:18:49 +01:00
Fred Hebert
3288afa5c1 Merge pull request #418 from tuncer/fix-415
Fix #415 (reltool vsn check)
2015-01-09 14:52:13 -05:00
Fred Hebert
d242472662 Merge pull request #420 from tomas-abrahamsson/mock-gpb-and-protobuffs-in-inttest
Mock gpb and protobuffs, in inttest, replacing external dependencies
2015-01-07 14:15:26 -05:00
Tomas Abrahamsson
2af51af986 Replace inttest external dep to protobuffs with a mock
In inttest/proto_protobuffs, replace the external dependency to
erlang_protobuffs, a protocol buffer compiler, with a simple mock.

The mock provides enough of what is needed for inttest only,
which is to generate some dummy content, but with proper file names.
2015-01-07 18:27:40 +01:00
Tomas Abrahamsson
2a0dd5bacf Bugfix comment in inttest/proto_protobuffs/rebar.config 2015-01-07 18:27:40 +01:00
Tomas Abrahamsson
c82bf703ae Replace inttest external dependency to gpb with a mock
In inttest/proto_gpb, replace the external dependency to gpb, a
protocol buffer compiler, with a simple mock.

The mock provides enough of what is needed for inttest only,
which is to generate some dummy content, but with proper file names.

As a result, the increased timeout for the proto_gpb inttest should no
longer be needed (inttest/proto_gpb/retest.config), both since the
mock is now much faster to compile, and since any network bandwidth or
connectivity issues have now been eliminated.
2015-01-07 18:27:40 +01:00
Tuncer Ayaz
838776326b Fix #415 (reltool vsn check)
* Refactor reltool version check to use vsn app key if ebin/reltool.app
  exists.

  OTP releases prior to R14 didn't install the app file, so we still
  have to support getting the version string from the lib_dir path. If
  you're using an R13B03 or R13B04 install that doesn't have version
  strings in lib_dir paths (lib/reltool vs lib/reltool-0.5.3), we won't
  be able to retrieve the version string. Given R13's age and that it's
  unusual to have vsn-less lib_dir paths, this shouldn't be a problem.

* While at it, delete trailing white space.
2014-12-30 21:38:41 +01:00
Fred Hebert
b8e0018782 Merge pull request #413 from tomas-abrahamsson/undo-386-merge
Revert "Merge pull request #386 ... gpb-recompilation...detection"
2014-12-30 13:27:02 -05:00
Tomas Abrahamsson
a7b7205d07 Revert "Merge pull request #386 from tomas-abrahamsson/gpb-recompilation-detection"
This reverts commit 81063d33f0, reversing
changes made to 6584defdda.

This was reverted because it changed the gpb compiler to
not use rebar_base_compiler.  That change was to add support for
target name prefixes, but it is better to add that support to
rebar_base_compiler.
2014-12-23 16:28:23 +01:00
Fred Hebert
dd9125e09a Merge pull request #411 from kittee/ct_appconfig_fix
Fix app.config argument passing when using ct_run (take 2)
2014-12-22 18:16:54 -05:00
Igor Savchuk
d5d691d7f7 Fix app.config argument passing when using ct_run (take 2)
ct_run has changed its config key from -ct_config to -config,
thus, -config key, used to specify app.config now must be
placed after -erl_args
2014-12-22 21:36:41 +03:00
Fred Hebert
5be65b633f Merge branch 'irpab-fix_format_source' 2014-12-21 15:49:33 -05:00
Fred Hebert
94d568ad0e Merge branch 'fix_format_source' of https://github.com/irpab/rebar into irpab-fix_format_source
Conflicts:
	THANKS
2014-12-21 15:35:13 -05:00
Fred Hebert
ae7a7aae18 Revert "Merge branch 'kittee-ct_appconfig_fix'"
This reverts commit 3c0f420c2a, reversing
changes made to 8f64e13184.
2014-12-21 15:25:00 -05:00
Fred Hebert
3c0f420c2a Merge branch 'kittee-ct_appconfig_fix' 2014-12-21 15:17:12 -05:00
Fred Hebert
440d73825b Merge branch 'ct_appconfig_fix' of https://github.com/kittee/rebar into kittee-ct_appconfig_fix
Conflicts:
	THANKS
2014-12-21 15:17:03 -05:00
Fred Hebert
8f64e13184 Merge pull request #408 from lrascao/fix/remove_duplicate_console_message
Fix/remove duplicate console message
2014-12-21 15:03:27 -05:00
Fred Hebert
81063d33f0 Merge pull request #386 from tomas-abrahamsson/gpb-recompilation-detection
Recompile .proto files with gpb also with prefix/suffix
2014-12-21 15:03:05 -05:00
Fred Hebert
6584defdda Merge pull request #406 from stwind/master
Fix deps path check in rebar_ct:collect_glob/3
2014-12-21 15:02:39 -05:00
Luis Rascao
5bb7b2963f gpb_compiler: remove duplicate compiling message
It's unnecessary to print "Compiling..." since base_compiler already prints a
message to the effect.
2014-12-21 16:08:04 +00:00
Fred Hebert
3a0c547089 Merge branch 'coolchevy-fix-dtl-target-path' 2014-12-16 13:04:09 -05:00
Fred Hebert
3900724cec Remove no longer valid comment 2014-12-16 13:03:44 -05:00
Fred Hebert
ede6666961 Merge branch 'fix-dtl-target-path' of https://github.com/coolchevy/rebar into coolchevy-fix-dtl-target-path 2014-12-16 12:49:47 -05:00
Fred Hebert
49a96a6318 Merge pull request #405 from tuncer/erlgrind
Generate cachegrind file if erlgrind is available
2014-12-16 12:48:55 -05:00
stwind
a83c80d4c0 Fix deps path check in rebar_ct:collect_glob/3
Since rebar_deps:get_deps_dir/1 returns an absolute path,
lists:member(Deps, Parts2) will always return false, thus .test.spec
files in deps/ will not be ignored.
2014-12-11 11:59:40 +08:00