Client: go
Currently in the compiler generated go code, adding a new exception to
an existing endpoint can cause unexpected behaviors when the client
isn't updated. Fix the issue.
Will be cherry-picked into 0.15.0 after merged.
Client: go
Staticcheck is the recommended replacement of the frozen and deprecated
official golint linter [1].
Fix the things it complained about (or add lint:ignore directive) in:
- lib/go/thrift
- lib/go/test/tests
- tutorial/go/src
- test/go/src
- compiler generated code
The majority of the fixes are in the following categories:
- Use of deprecated function (mainly the TConfiguration related ones)
- Redundant break in switch cases
- Unused and unexported variables/fields/functions
Also in the same spirit as fb539ae, remove the error return from
NewTSSLSocket as it can never be non-nil.
This change will be cherry-picked into 0.15.0 branch after merged.
[1]: https://groups.google.com/g/golang-nuts/c/rCP70Aq_tBc
Client: go
Update go versions used in travis to 1.16.7 and 1.17, update
LANGUAGES.md, and update go's README to clarify on support policy.
This change will be cherry-picked into 0.15.0 branch after merged.
Client: go
We used to do DNS lookups in NewTSocketConf, without any timeout checks.
Stop doing that and do DNS lookups in TSocket.Open instead, which
already checks for ConnectTimeout set in TConfiguration.
Also remove the error return from NewTSocketConf.
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.
Client: go
The current compiler will generate uncompilable code when we use
optional enum and/or typedef'd types in a thrift constant.
This fixes the issue, also adds a test for that.
Because we briefly had go.mod file under lib/go/thrift in e27e82c46b
(it was later removed in d9fcdd3dba), using
go get github.com/apache/thrift/lib/go/thrift/...
(as suggested by the current README) will get that particular version
instead of the latest released version. So update README to use
go get github.com/apache/thrift
instead.
Also instead of saying we support Go 1.7+, say we support the officially
supported Go releases, as that's our new support policy.
Client: cpp
Author: Benjamin Naecker
This closes#2380
Solaris-derived systems split some functionality that is usually found
in `sys/ioctl.h` into `sys/filio.h`. In this case, the `FIONREAD`
constant is in the latter file.
Details of the deadlock are in the ticket.
This PR addresses the deadlock by limiting the scope of the locks
acquired in FieldMetaData.java to only protect calls to the structMap
hashtable. No locks should be held when the call to sClass.newInstance()
is in progress.
Tested: Regular CI builds should pass.
ToStringTest.cpp is a better place than JSONProtoTest.cpp for to_string
tests. Move global locale-related unit tests there.
Also imbue the C locale in the floating point to_string functions to avoid
decimal number strings formatted with comma instead of decimal point.
In Dockerfiles, install de_DE locale because it uses decimal comma.