From 2c78047fcbd2783e88cab0ebc7245598695477ae Mon Sep 17 00:00:00 2001 From: Yuxuan 'fishy' Wang Date: Sat, 31 Jul 2021 13:44:41 -0700 Subject: THRIFT-4797: Go import improvements This change improves two problems in go code imports: 1. Always rename import the thrift package into "thrift", as we allow the user to use a different library to replace the official one from the compiler command line, this makes sure that in compiler generated go code we can always blindly use "thrift.*". 2. We added auto rename import dedup in d9019fc5a4, but in that change for system packages we always use the full import path as the dedup identifier, so system package "database/sql/driver" would not be detected as a conflict against a thrift go namespace of "foo.bar.driver". Use the part after the last "/" in system packages as the dedup identifier instead. --- CHANGES.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'CHANGES.md') diff --git a/CHANGES.md b/CHANGES.md index 98d889d1d..5ab945bca 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,8 +11,9 @@ ### Go -- [THRIFT-5369](https://issues.apache.org/jira/browse/THRIFT-5369) - TConfiguration.GetMaxMessageSize() now also applies to container sizes in TProtocol implementations provided - [THRIFT-5404](https://issues.apache.org/jira/browse/THRIFT-5404) - TTransportException.Timeout would correctly return true when it's connect timeout during TSocket.Open call +- [THRIFT-5389](https://issues.apache.org/jira/browse/THRIFT-5389) - The compiler now generates correct go code with thrift constant defined on optional enum/typedef fields +- [THRIFT-4797](https://issues.apache.org/jira/browse/THRIFT-4797) - The compiler now correctly auto renames import thrift namespaces when they collide with system imports ## 0.14.2 @@ -23,7 +24,7 @@ ### Go -- [THRIFT-5369](https://issues.apache.org/jira/browse/THRIFT-5369) - No longer pre-allocating the whole container (map/set/list) in compiled go code to avoid huge allocations on malformed messages +- [THRIFT-5369](https://issues.apache.org/jira/browse/THRIFT-5369) - TConfiguration.GetMaxMessageSize() now also applies to container sizes in TProtocol implementations provided ## 0.14.1 -- cgit v1.2.1