Commit Graph

6863 Commits

Author SHA1 Message Date
Yuxuan 'fishy' Wang
b94eac7ca0 Update supported go versions
Following our policy regarding supported go releases, change the
supported go versions to 1.19.* and 1.20.* with the release of go 1.20.
2023-02-02 12:59:53 -08:00
Christian Westberg
f223bd3b54 Improve enum support for json generator
Client: [json]
2023-01-16 22:37:17 +01:00
Yuxuan 'fishy' Wang
b39370ec3b THRIFT-5601: Fix forward typedef in go compiler
Client: go

While https://github.com/apache/thrift/pull/951 fixed the bug with
forward typedef used in container values, it also introduced a bug that
broke forward typedef used in other cases in go code. Limit the fix of
it to only the container key and value types to fix other cases.
2023-01-03 10:49:04 -08:00
dejank-isystem
916ae8b813 py server: Listen also on IPv4 2023-01-01 11:55:31 +01:00
dejank-isystem
277feceaed netstd Server: Add IPv6
Unlike servers in other languages (tested: cpp & python), netstd (Csharp) listens only on IPv4.
This can cause errors and delays on clients if they use "localhost" for hostname.
2023-01-01 11:55:31 +01:00
Christopher Friedt
9c0de2d1eb lib: c_glib: fix compile error due to missing unistd.h
Previously, the c_glib library tests failed to compile due
to implicit function declarationsn for `sleep()`, `fork()`,
and `alarm()`.

Include `<unistd.h>` to address all of those issues (on
platforms that have `<unistd.h>`).

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2022-11-25 09:08:21 +01:00
Chris Friedt
850c61f608 lib: cpp: transport: include thrift/config.h in TFDTransport
The `PlatformSocket.h` defines some macros that reference
symbols in the libc without including the necessary headers.

Moreover, the headers are protected by config macros
(i.e. `#ifdef HAVE_UNISTD_H`). This makes header ordering
rather fragile.

Explicitly include `<thrift/config.h>` and conditionally
include `<unistd.h>` prior to referencing them.

A future improvement to reduce fragility would be to add
includes directly in `PlatformSocket.h`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-22 21:56:29 +01:00
Chris Friedt
779deabf0e lib: cpp: automake: ship thrift/numeric_cast.h
The `<thrift/numeric_cast.h>` header should be part of the
installed thrift artifacts since it is included by other
installed headers.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-22 21:56:29 +01:00
Jens Geyer
27ff942b5c THRIFT-5669 "required" keyword is illegal in a "throws" clause 2022-11-22 11:04:59 +01:00
Triton
9a4e998b61 [docs] Add missing slash to avoid empty cell
A missing slash in the end `</td>` tag of field cell for Delphi and
.NET Standard was generating an additional empty cell, breaking the
table (and generating misleading info).

[skip ci]
2022-11-20 22:53:18 +01:00
Christopher Friedt
6e9cbbd059 lib: cpp: TTransportException: create thrift::numeric_cast
This adds an equivalent implementation of `boost::numeric_cast`
written purely in standard c++.

The implementation is relatively trivial and reduces the
dependency on `boost`.

Adapted from
https://stackoverflow.com/a/49658950/5636218

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-20 12:05:39 +01:00
Chris Friedt
f525e4cbb6 THRIFT-5666: lib: cpp: prefer poll.h over sys/poll.h
The `<sys/poll.h>` header is not actually where `poll(2)` must be
defined according to the spec. However, it may be the case that
some random UNIX-like OS uses `<sys/poll.h>` instead.

Both use cases can be supported simply by including the proper
header, if it exists.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-20 12:04:03 +01:00
Chris Friedt
8f83e46250 THRIFT-5663: lib: cpp: usleep was not declared in this scope
Several build failures in Travis resulted from an include-order
problem in `TFileTransport.cpp`. It would probably be better to
simply include the right header files in `PlatformSocket.h`
but it's possible that might slow down compilation.

```
error: 'usleep' was not declared in this scope
..
 #  define THRIFT_SLEEP_USEC usleep
```

Also fixing the same (potential) problem in `TFDTransport.cpp`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-20 12:02:44 +01:00
Kino Roy
c495448024
THRIFT-5657: Use Swift 5.7 in travis build (#2719) 2022-11-20 14:52:04 +08:00
Jens Geyer
8cf48c9350 switched delphi keyword tables from map to set and array init 2022-11-18 16:23:43 +01:00
Jens Geyer
318fb9c2f1 switched netstd keywords from map to set and array init 2022-11-18 16:23:43 +01:00
Jens Geyer
56281fb972 FIX: make dist error "No rule to make target 'go.sum', needed by 'distdir'. Stop." 2022-11-18 08:51:25 +01:00
Jens Geyer
75e445ae8d THRIFT-3956 Java keywords that are legal in IDL can lead to generated code that will not compile 2022-11-18 08:51:25 +01:00
Yuxuan 'fishy' Wang
e8353cb46e Use multi-module to cleanup top level go.mod
Client: go

The go library itself does not have any third-party dependencies. We
have one third party dependency from the test code, which kind of
polluted from top-level go.mod file to the users of thrift go library.

We previous tried to clean that up by creating go.mod file at
lib/go/thrift, which caused issues to the release process and thus
reverted.

Use multi-module to separate tests requiring mock to their own modules
so that we can keep the top-level go.mod file clean.

Also some minor fixes on the github actions go workflow.
2022-11-02 15:44:07 -07:00
Yuxuan 'fishy' Wang
2acfe0fc7a THRIFT-5650: Implement UUID in Go compiler
Client: go
2022-10-26 14:40:10 -07:00
Christopher Friedt
cea5559ecf lib: cpp: protocol: declare when methods override
This avoids compiler warnings about inconsistent use
of `override`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-10-26 22:48:43 +02:00
zeshuai007
5ef174b5c1 Implement Validate message reply seq ids 2022-10-25 22:42:09 +02:00
Wu Jian Ping
22aa3e5286 clear retry timer first then emit close event 2022-10-25 22:36:49 +02:00
Wu Jian Ping
8940715a1b fix reconnect issue for nodejs 2022-10-25 22:36:49 +02:00
Chris Friedt
6aba57bb6b lib: cpp: TOutput: add zephyr-specific strerror_s implementation
In Zephyr, optimize `TOutput::strerror_s` to minimize (stack)
space. The string error table is in ROM in any case, so string
values will not be overwritten (if they happen to be compiled-in).

Signed-off-by: Chris Friedt <cfriedt@fb.com>
2022-10-25 22:27:49 +02:00
Chris Friedt
0bc818f363 lib: cpp: TProtocol: support zephyr byteorder
Zephyr's byteorder is defined in
`<zephyr/sys/byteorder.h>`. However, the `bswap_xx`
macros are also defined there. They need to be `#undef`d
first when building for big-endian architectures, since
the Thrift byteorder macros are no-ops for little-endian
architectures.

Signed-off-by: Chris Friedt <cfriedt@fb.com>
2022-10-25 22:20:47 +02:00
Chris Friedt
0a29a48e5a lib: cpp: add missing functional and cmath includes
Manual runs of the autotools docker script were failing due to
`std::functional` not being a member of `std`. Similar error
messages for `std::ceil` and `std::log`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-10-23 22:11:55 +02:00
Chris Friedt
ef3d52e04c build: docker: scripts: autotools: do not fail if .m2/ exists
Previously, when doing manual runs inside of the docker container,
the `autotools.sh` script would fail if the `.m2/` directory already
existed. This was a minor annoyance.

Simply pass the `-p` flag to `mkdir`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-10-23 22:08:51 +02:00
Chris Friedt
efea697501 lib: cpp: thrift: include functional in TServerFramework
Use of `std::placeholders::_1` requires `<functional>`.

Signed-off-by: Chris Friedt <cfriedt@fb.com>
2022-10-23 11:17:47 +02:00
Yuxuan 'fishy' Wang
19c13b4cc6 THRIFT-5650: Implement UUID in Go library
Client: go

This is only the library part of THRIFT-5650. I still have some open
questions for the compiler part so that will be done later.

While I'm here, also made some changes to go CI process:

* Update ubuntu-bionic to use go 1.18 for travis
* Update ubuntu-jammy to use the latest go 1.19.x for travis
* Run both go 1.18 and 1.19 for github actions
* Also run test/go tests for github actions
2022-10-21 10:36:06 -07:00
Kino Roy
baa0daa478
THRIFT-5653: Update TType.uuid raw value to 16 (#2717)
Removes non-standard utf8 type with raw value 16 and replaces uuid raw value with 16
2022-10-21 15:20:35 +08:00
Jens Geyer
cd7a2aa098 THRIFT-5656 Escape Delphi keywords with '&' prefix instead of '_' suffix
Client: Delphi
Patch: Jens Geyer
2022-10-17 21:25:37 +02:00
Jens Geyer
0b1e9513b4 THRIFT-5652 IDL uuid literals can be improved
Compiler (general)
Patch: Jens Geyer

This closes #2714
2022-10-16 12:04:49 +02:00
Jens Geyer
ec0141cc55 * THRIFT-4655 Parser fails on the word "from"
Client: Compiler (general)
Patch: Jens Geyer

This also fixes an unhandled "normalize" case with enums in netstd that came up during tests for this ticket.

This closes #2715
2022-10-16 11:41:33 +02:00
Jiayu Liu
9207b28b7d
fix various java codestyle issues (#2710)
* fix various java codestyle issues

* Update lib/java/src/main/java/org/apache/thrift/server/TSaslNonblockingServer.java
2022-10-15 16:53:55 +08:00
dependabot[bot]
439778ae44 Bump junit from 4.11 to 4.13.1 in /contrib/thrift-maven-plugin
Bumps [junit](https://github.com/junit-team/junit4) from 4.11 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.11.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.11...r4.13.1)

---
updated-dependencies:
- dependency-name: junit:junit
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-14 23:25:11 +02:00
Jens Geyer
3e0e0cc06f Update contrib/thrift-maven-plugin/pom.xml
Co-authored-by: Jiayu Liu <Jimexist@users.noreply.github.com>
2022-10-14 22:51:36 +02:00
herocms
f57b8e7626 update com.google.guava:guava 14.0.1 to 30.0-jre 2022-10-14 22:51:36 +02:00
dependabot[bot]
019d7d8e31 Bump json-schema and jsprim
Bumps [json-schema](https://github.com/kriszyp/json-schema) and [jsprim](https://github.com/joyent/node-jsprim). These dependencies needed to be updated together.

Updates `json-schema` from 0.2.3 to 0.4.0
- [Release notes](https://github.com/kriszyp/json-schema/releases)
- [Commits](https://github.com/kriszyp/json-schema/compare/v0.2.3...v0.4.0)

Updates `jsprim` from 1.4.1 to 1.4.2
- [Release notes](https://github.com/joyent/node-jsprim/releases)
- [Changelog](https://github.com/TritonDataCenter/node-jsprim/blob/v1.4.2/CHANGES.md)
- [Commits](https://github.com/joyent/node-jsprim/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: json-schema
  dependency-type: indirect
- dependency-name: jsprim
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-14 22:49:26 +02:00
dependabot[bot]
2987c5600a Bump json-schema and jsprim in /lib/ts
Bumps [json-schema](https://github.com/kriszyp/json-schema) and [jsprim](https://github.com/joyent/node-jsprim). These dependencies needed to be updated together.

Updates `json-schema` from 0.2.3 to 0.4.0
- [Release notes](https://github.com/kriszyp/json-schema/releases)
- [Commits](https://github.com/kriszyp/json-schema/compare/v0.2.3...v0.4.0)

Updates `jsprim` from 1.4.1 to 1.4.2
- [Release notes](https://github.com/joyent/node-jsprim/releases)
- [Changelog](https://github.com/TritonDataCenter/node-jsprim/blob/v1.4.2/CHANGES.md)
- [Commits](https://github.com/joyent/node-jsprim/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: json-schema
  dependency-type: indirect
- dependency-name: jsprim
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-14 19:18:20 +02:00
Jiayu Liu
92b007fa88
java to use jdk 17 (#2686) 2022-10-14 13:16:18 +08:00
dependabot[bot]
c2cccb6b67 Bump marked from 2.0.7 to 4.1.1 in /lib/js
Bumps [marked](https://github.com/markedjs/marked) from 2.0.7 to 4.1.1.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v2.0.7...v4.1.1)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-13 11:04:08 +02:00
dependabot[bot]
0223d63466 Bump marked from 2.1.3 to 4.1.1
Bumps [marked](https://github.com/markedjs/marked) from 2.1.3 to 4.1.1.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v2.1.3...v4.1.1)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-12 21:52:04 +02:00
dependabot[bot]
1cb72902fd Bump marked from 2.1.3 to 4.1.1 in /lib/ts
Bumps [marked](https://github.com/markedjs/marked) from 2.1.3 to 4.1.1.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v2.1.3...v4.1.1)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-12 12:31:25 +02:00
dependabot[bot]
227ae7d78c Bump shelljs and grunt-contrib-jshint in /lib/js
Removes [shelljs](https://github.com/shelljs/shelljs). It's no longer used after updating ancestor dependency [grunt-contrib-jshint](https://github.com/gruntjs/grunt-contrib-jshint). These dependencies need to be updated together.


Removes `shelljs`

Updates `grunt-contrib-jshint` from 2.1.0 to 3.2.0
- [Release notes](https://github.com/gruntjs/grunt-contrib-jshint/releases)
- [Changelog](https://github.com/gruntjs/grunt-contrib-jshint/blob/main/CHANGELOG)
- [Commits](https://github.com/gruntjs/grunt-contrib-jshint/compare/v2.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: indirect
- dependency-name: grunt-contrib-jshint
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-12 12:30:23 +02:00
Jiayu Liu
564b287404
add ubuntu jammy in build infra (#2684) 2022-10-12 11:42:38 +08:00
Yuxuan 'fishy' Wang
50c3eca332 Fix go.mod
Partially revert 32bd0bd950.
2022-10-11 13:36:29 -05:00
Hamza Anis
32bd0bd950
Bump go version to 1.9.2 and update hashes (#2701) 2022-10-11 11:47:11 +08:00
Jiayu Liu
096a061fee
[docs] update travis ci links - [skip ci] (#2660)
* update travis ci links

* remove deprecated method calls
2022-10-11 11:46:25 +08:00
Jiayu Liu
1d61fe1c1f
THRIFT-5633: move xenial to old, deprecate xenial in travis build (#2690)
* move xenial to old, deprecate xenial in travis build

* add back stage of docker
2022-10-10 08:45:10 +08:00