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
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.
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
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.
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.
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.
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.
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.
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.
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.
On my slow old netbook with a 1.6GHz CPU, this inttest
takes about 40 seconds to run, of which network activity
is about 3s, the default timeout of retest is 30s.
Add a generous margin to avoid unnecessary timeouts.
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).
Properly detecting change meant moving from rebar_base_compiler, so it
also meant processing protocol buffer files in sequence instead of in
parallel.
exercises rebar/gpb integration
The bulk of these tests are written by Luis Rascão, hence he is the
author of this commit. As the committer, I have cherry-picked his two
commits 4c87bcd and ebb8182, from the feature/support_gpb_protobuf
branch in the git://github.com/lrascao/rebar repo, and have slightly
adapted it to fit this pluggable-proto-compilers-gpb branch.
Update the THANKS file
If you happen to fetch a zip archive of the git repo and try to build
from that, you may, for example, ask erlc to build src/._rebar.erl.
._* are OS X resource forks and not real .erl files. This may also
happen with network filesystems on OS X. To fix that, limit the
files compiled by rebar to include only those which start with
a letter or a digit.
Moves ct_extra_params to the end of the generated ct_run command.
This allows users to pass commands to the underlying emulator
using -erl_args. The included rt test demonstrates that it is
possible to pass an addtional option to ct_run and -erl_args at
the same time. Finally, the test executes in regular and verbose
modes because rebar constructs the ct_run command differently in
verbose mode.
The combination of changes to rebar_erlc_compiler, and the fact
that erl_first_files is inherited, caused a regression. To fix
that, ensure every project uses its own .rebar/erlcinfo. While at
it, fix the issue that erl_first_files entries were not included
when initializing the dep digraph.
Reported-by: Louis-Philippe Gauthier
Reported-by: Roland Karlsson
Thanks: Tuncer Ayaz