Releases: thriftrw/thriftrw-go
Releases · thriftrw/thriftrw-go
v1.0.0
- Field names
ToWire
,FromWire
,String
, and for exceptionsError
are
now reserved. Override the names of these fields in the generated code with
thego.name
annotation. - Plugins: The version of ThriftRW used to compile the plugin is now matched
against the version actually generating code.
v0.5.0
- Breaking: Generated enums now have first class JSON support. Enums are
(un)marshalled from/to strings if possible with fallback to integer for
unrecognized values. - Breaking:
Args
,Result
, andHelper
types for service functions
are now generated in the same package as the user-defined types. These
types are now named similarly to$service_$function_Args
where$service
and$function
are the names of the Thrift service and function normalized
based on Go naming conventions. - Code generation will abort if struct fields, after conversion to Go style
names, are not unique in the structure. - A
go.name
annotation may now be specified to override the names of
entities in the generated Go code. The annotation is supported for struct,
union, and exception types, and their fields, enum types and enum items,
and parameters of functions. - Plugins: Renamed
Service.Name
toService.ThriftName
since it contains
the name of the service as it appeared in the Thrift file. - Plugins: Added a new
Service.Name
field which contains the name of field
normalized per Go naming conventions. This, along withFunction.Name
may
be used to build the names of theArgs
,Result
, andHelper
types for
a function. - Plugins: Removed
Service.Directory
andService.ImportPath
because these
are now same as the corresponding module. - Plugins: Constructors for
Plugin
andServiceGenerator
clients and
handlers are now exposed in the same package as the interfaces. - Non-primitive types constants are now inlined in the generated Go code
instead of being referenced in an effort to reduce the impact of user
errors on the generated code. This is because non-primitive constants were
previously implemented as globalvar
s which might be modified by
user code.
v0.4.0
- Breaking: Remove the
--yarpc
flag. Install the ThriftRW YARPC plugin
fromgo.uber.org/yarpc/encoding/thrift/thriftrw-plugin-yarpc
and use
--plugin=yarpc
instead. - Breaking: The
compile
API now exposes annotations made while
referencing native Thrift types. This changes theTypeSpec
s for primitive
types from values to types. - The
compile
API now also exposes annotations fortypedef
declarations. - Generate args structs and helpers for oneway functions.
- Expose whether a function is oneway to plugins.
- Expose the version of the library under
go.uber.org/thriftrw/version.Version
. - Generated code will test for version compatibility with the current version
of ThriftRW during initialization.
v0.3.2
v0.3.1
Fix missing canonical import path to go.uber.org/thriftrw
.
v0.3.0
- Breaking: Renamed project to
go.uber.org/thriftrw
. - Breaking: Keywords reserved by Apache Thrift are now disallowed as
identifiers in Thrift files. - Breaking: The
Package
field of theplugin.TypeReference
,
plugin.Service
, andplugin.Module
structs was renamed toImportPath
.
v0.2.1
- Plugin templates: Fixed a bug where imports in templates would use the base
name of the package even if it had a hyphen in it if it wasn't available on
theGOPATH
. - Plugin templates: Imports in generated code are now always qualified if the
package name doesn't match the base name.
v0.2.0
- Added a
-v
/--version
flag. - Added a plugin system.
ThriftRW now provides a plugin system to allow customizing code generation.
Initially, only the generated code for service
declarations is
customizable. Check the documentation for more details.
- Breaking: Fixed a bug where all-caps attributes that are not known
abbreviations were changed to PascalCase. - Breaking: The
String()
method forenum
types now returns the name
of the item as specified in the Thrift file.
v0.1.0
This release represents the initial minor release of github.com/thriftrw/thriftrw-go
.
Users should pin to the minor range, aka >= 0.1.0, < 0.2.0
.
If you are using Glide, this can be represented as ~0.1
.