- Treat compilation warnings as errors
- Report coveralls for all build environments
- Conditionally run `mix format` from inside `.travis.yml`
- Cache the `deps/` directory instead of mix archives
- Only include credo in the :dev environment
- Only include excoveralls in the :test environment
We previously only supported including other Thrift files whose
pathnames were relative to the current file. This change allows a list
of additional include (search) paths to be specified as part of the
project configuration (`thrift.include_paths`) or via a command line
option (`--include dir`).
The tmp directory is used to store temporary .thrift and generated files by
ThriftTestCase. It's typically around during development and contains files but
they should not be checked in.
Our :thrift compiler is now implemented in terms of our Elixir code
generation framework. This drops our dependency on the Apache Thrift
compiler binary.
The new Thrift.Generator.targets/1 function is used to determine the
full set of generated output files for a given input .thrift file. This
ensures that we only generate Elixir source code for stale outputs.
It can now do everything that `thrift.generate` could do, so we can
retire the latter.
A pure Elixir implementation of the Thrift binary protocol.
This PR includes serialization and deserialization for all thrift types as well as testing to make sure we match the thrift spec (which can be found here: https://erikvanoosten.github.io/thrift-missing-specification/#_binary_encoding)
The binary protocol is generated alongside the thrift data types, yielding a much faster implementation than the apache project's canonical one.
Our benchmarks (using benchfella) indicate a speedup of between 10 and 20x.
## Binary Protocol Performance
benchmark name | iterations | average time
------------------|-----------|---------------
elixir serialization (left as IOList) | 2000 | 849.01 µs/op
elixir serialization (iolist_size) | 2000 | 933.83 µs/op
elixir serialization (converted to binary) | 1000 | 1281.23 µs/op
elixir deserialization | 1000 | 1178.46 µs/op
erlang serialization left as IOList | 100 | 10284.84 µs/op
erlang serialization (converted to binary) | 100 | 11588.89 µs/op
erlang deserialization | 100 | 21433.17 µs/op
This PR introduces a parser based on @jparise's lexer. The parser
runs on thrift files and produces a set of Program models. The
intention is to be able to give Elixir full-fledged thrift support
and a better implementation.
These tests rely on a working thrift compiler being available in the current
test environment, but that's a reasonable requirement because it's also a
prerequisite for using this mix task in the first place.
This represents just the lexer definition. Full grammar parsing (i.e. yecc)
support will come later.
The lexer definition is largely complete, but there may be some issues with
string literals containing escaped characters \t and \n.
* add travisci support
* run code coverage post result to coverall.io
* add project info for hex package
* add Build and code coverage badge, compile only