Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

avdl-compiler

keybase39BSD-3-Clause1.4.10

AVDL to Go compiler written in IcedCoffeeScript (for node)

AVDL, Go

readme

AVDL Compiler

Travis CI npm version

AVDL compiler to Go, Python, and/or TypeScript written in IcedCoffeeScript.

Notably used by Keybase to compile our protocol definition files into usable types by our Go, Python, and TypeScript bots.

Development Setup and Testing

Found a bug or want to support a new language? We accept pull requests.

make install
make test

changelog

1.4.10

  • Support gomodules using the optional '-m' flag.

1.4.9

  • Add nullSerializable decorator that always emits a field, even with a null value, instead of sometimes omitting it

1.4.8

  • Update avdl2json

1.4.7

  • Fixes an issue where nullable lists would be emitted as Optional[Optional[List[ instead of Optional[List[.

1.4.6

  • Go Enum String() method emits integer instead of empty string for unrecognized names

1.4.5

  • Uses dataclasses_json's mixin object instead of its @dataclass_json decorator for Python type generation, giving better MyPy support.

1.4.4

  • Add @timeout_msec(xxx) to methods to offer default timeout.

1.4.3

  • When generating variants in typescript, no longer assume the types are all nullable.

1.4.2

  • Adds support for generating TypeScript types using -l typescript -t.
  • Adds support for generating Python types using -l python -t.

1.4.1

  • Adds support for writing relative paths in AVDL files, which are resloved using your defined $GOPATH.
  • Adds support for @optional(true) to denote properties that are optional.
  • Changes the header slightly to display whether the file was built with -t.

1.4.0

  • Adds a new -t argument, to output only the types defined in an AVDL file, excluding interface definitions.

1.3.30

  • @layout("array") feature for laying out structs as arrays

1.3.29 (2018-12-07)

  • add compression type msgpackzip

1.3.28 (2018-11-19)

  • fix path issue

1.3.27 (2018-11-19)

  • use CallCompressed RPC call
  • add @compression_type("none|gzip") to specify protocol/method level compression for RPC responses.

1.3.26 (2018-11-15)

  • continuous integration, fix codec library in sample_test.go

1.3.25 (2018-09-28)

  • memory optimization: decode into arrays instead of slices

1.3.24 (2018-08-01)

  • map and slice optimizations

1.3.23 (2018-03-16)

  • Add @internal("") decorator, which means a field won't be exported; for internal purposes only

1.3.22 (2017-11-18)

  • Add mpackkey field decorator

1.3.21 (2017-11-08)

  • Don't emit DeepCopy's for autogen Arg types

1.3.20 (2017-09-27)

  • Preserve nil-ness of slices and maps

1.3.19 (2017-08-03)

  • Fix DeepCopy() for 'uint64'

1.3.18

  • Fix DeepCopy() for 'uint'

1.3.17 (2017-06-06)

  • Fix DeepCopy() for bytes to not crash on nil

1.3.16 (2017-05-27)

  • Satify GoVet w/r/t v = v, which wasn't liked

1.3.15 (2017-05-27)

  • DeepCopy() support! Autogenerated DeepCopier for all AVDL Go types

1.3.14 (2017-05-24)

  • Add the ability to have a map<K,V> type, for K != 'string'

1.3.13 (2017-04-18)

  • Add jsonkey field decorator

1.3.12 (2017-04-03)

  • Fix variants with enum values

1.3.11 (2016-12-14)

  • Fix invalid go codegen

1.3.10 (2016-12-02)

  • Add String() method for enums

1.3.9 (2016-09-30)

  • New location for RPC library

1.3.8 (2016-09-28)

  • Support for void fields that aren't the default

1.3.7 (2016-09-7)

  • Add reverse map for enums in Go

1.3.6 (2016-09-01)

Bugfixes:

  • emitted types are lowercase
  • don't allow malicious sender to crash us out nil pointer

1.3.5 (2016-08-31)

  • Add variant type

1.3.4 (2016-08-18)

  • Add forward map for enums in Go

1.3.3 (2016-03-25)

  • Fix tests

1.3.2 (2016-03-23)

  • Fix tests

1.3.1 (2016-03-21)

  • Also plumb through /** ... */-style docs to typedefs

1.3.0 (2016-03-21)

  • Plumb /** ... */-style docs through to output Go code.

1.2.0 (2016-03-21)

  • Support go_field_suffix for dealing with method/field clashes programmatically