You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2020/03/07 10:15:44 UTC
[thrift] branch master updated (1b7b00c -> 2e11577)
This is an automated email from the ASF dual-hosted git repository.
jensg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git.
from 1b7b00c CI broken, reverting following PRs reverted https://github.com/apache/thrift/pull/2025 reverted https://github.com/apache/thrift/pull/2026 Reverted https://github.com/apache/thrift/pull/2021
new e791760 THRIFT-5131: Require >= 1.1.4 of integer-encoding dependency Client: Rust Patch: Nik Clayton
new 2e11577 THRIFT-5111: Upgrade rust to 1.36.0 Client: Rust Patch: Jano Svitok
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
build/docker/README.md | 2 +-
build/docker/ubuntu-bionic/Dockerfile | 8 ++++----
lib/rs/Cargo.toml | 2 +-
lib/rs/src/protocol/compact.rs | 25 +++++++++++++++++++++++++
lib/swift/Sources/THTTPSessionTransport.swift | 9 ++++++++-
5 files changed, 39 insertions(+), 7 deletions(-)
[thrift] 02/02: THRIFT-5111: Upgrade rust to 1.36.0 Client: Rust
Patch: Jano Svitok
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
commit 2e115774776f2e5bcfe826e30548feab030fb263
Author: Jano Svitok <js...@whitestein.com>
AuthorDate: Fri Mar 6 09:01:43 2020 +0100
THRIFT-5111: Upgrade rust to 1.36.0
Client: Rust
Patch: Jano Svitok
This closes #2050
Also contains portions of THRIFT-4547: Upgrade Swift in docker to 5.1.4
Client: Swift
Patch: Jano Svitok
Linux version 4.2.0 does not have FileHandle.acceptConnectionInBackgroundAndNotify()
implemented. We need at least 5.1 for TSocketServer to run in docker.
In the meantime, URLRequest was moved to FoundationNetworking.
To keep compatibility with previous versions, conditional import is
used.
---
build/docker/README.md | 2 +-
build/docker/ubuntu-bionic/Dockerfile | 8 ++++----
lib/swift/Sources/THTTPSessionTransport.swift | 9 ++++++++-
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/build/docker/README.md b/build/docker/README.md
index 6f9c024..6f170e1 100644
--- a/build/docker/README.md
+++ b/build/docker/README.md
@@ -194,4 +194,4 @@ Last updated: October 1, 2017
| ruby | 2.3.1p112 | 2.5.1p57 | |
| rust | 1.34.0 | 1.35.0 | |
| smalltalk | | | Not in CI |
-| swift | | 4.2.1 | |
+| swift | | 5.1.4 | |
diff --git a/build/docker/ubuntu-bionic/Dockerfile b/build/docker/ubuntu-bionic/Dockerfile
index 464af0b..c22a859 100644
--- a/build/docker/ubuntu-bionic/Dockerfile
+++ b/build/docker/ubuntu-bionic/Dockerfile
@@ -247,14 +247,14 @@ RUN apt-get install -y --no-install-recommends \
ruby-bundler
# Rust dependencies
-RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.35.0 -y
+RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.36.0 -y
ENV PATH /root/.cargo/bin:$PATH
# Swift on Linux for cross tests
RUN cd / && \
- wget --quiet https://swift.org/builds/swift-4.2.1-release/ubuntu1804/swift-4.2.1-RELEASE/swift-4.2.1-RELEASE-ubuntu18.04.tar.gz && \
- tar xf swift-4.2.1-RELEASE-ubuntu18.04.tar.gz --strip-components=1 && \
- rm swift-4.2.1-RELEASE-ubuntu18.04.tar.gz && \
+ wget --quiet https://swift.org/builds/swift-5.1.4-release/ubuntu1804/swift-5.1.4-RELEASE/swift-5.1.4-RELEASE-ubuntu18.04.tar.gz && \
+ tar xf swift-5.1.4-RELEASE-ubuntu18.04.tar.gz --strip-components=1 && \
+ rm swift-5.1.4-RELEASE-ubuntu18.04.tar.gz && \
swift --version
# cppcheck-1.82 has a nasty cpp parser bug, so we're using something newer
diff --git a/lib/swift/Sources/THTTPSessionTransport.swift b/lib/swift/Sources/THTTPSessionTransport.swift
index 3c0af8e..f66da92 100644
--- a/lib/swift/Sources/THTTPSessionTransport.swift
+++ b/lib/swift/Sources/THTTPSessionTransport.swift
@@ -18,8 +18,15 @@
*/
import Foundation
-import Dispatch
+// Conditional import for URLRequest
+// It was moved from Foundation to FoundationNetworking in 5.1, but
+// not on Darwin. See https://stackoverflow.com/a/58606520
+#if canImport(FoundationNetworking)
+import FoundationNetworking
+#endif
+
+import Dispatch
public class THTTPSessionTransport: TAsyncTransport {
public class Factory : TAsyncTransportFactory {
[thrift] 01/02: THRIFT-5131: Require >= 1.1.4 of integer-encoding
dependency Client: Rust Patch: Nik Clayton
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
commit e791760098b6a9490e19af2b18a3e002f561973b
Author: Nik Clayton <ni...@dfinity.org>
AuthorDate: Thu Mar 5 11:51:15 2020 +0100
THRIFT-5131: Require >= 1.1.4 of integer-encoding dependency
Client: Rust
Patch: Nik Clayton
This closes #2045
Versions 1.1.0 - 1.1.3 of the integer-encoding crate had a bug where
numbers larger than 0x4000_0000_0000_0000 would cause a panic during
decoding.
Add a test to be sure that numbers up to i64::maxvalue() encode and
decode successfully.
---
lib/rs/Cargo.toml | 2 +-
lib/rs/src/protocol/compact.rs | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/lib/rs/Cargo.toml b/lib/rs/Cargo.toml
index 0c71bab..0626da8 100644
--- a/lib/rs/Cargo.toml
+++ b/lib/rs/Cargo.toml
@@ -13,6 +13,6 @@ keywords = ["thrift"]
[dependencies]
ordered-float = "1.0"
byteorder = "1.3"
-integer-encoding = "1.0"
+integer-encoding = ">=1.1.4" # https://issues.apache.org/jira/browse/THRIFT-5131
log = "0.4"
threadpool = "1.7"
diff --git a/lib/rs/src/protocol/compact.rs b/lib/rs/src/protocol/compact.rs
index 3e17398..029f850 100644
--- a/lib/rs/src/protocol/compact.rs
+++ b/lib/rs/src/protocol/compact.rs
@@ -715,6 +715,31 @@ mod tests {
}
#[test]
+ fn must_round_trip_upto_i64_maxvalue() {
+ // See https://issues.apache.org/jira/browse/THRIFT-5131
+ for i in 0..64 {
+ let (mut i_prot, mut o_prot) = test_objects();
+ let val: i64 = ((1u64 << i) - 1) as i64;
+
+ o_prot
+ .write_field_begin(&TFieldIdentifier::new(
+ "val",
+ TType::I64,
+ 1
+ ))
+ .unwrap();
+ o_prot.write_i64(val).unwrap();
+ o_prot.write_field_end().unwrap();
+ o_prot.flush().unwrap();
+
+ copy_write_buffer_to_read_buffer!(o_prot);
+
+ i_prot.read_field_begin().unwrap();
+ assert_eq!(val, i_prot.read_i64().unwrap());
+ }
+ }
+
+ #[test]
fn must_round_trip_message_begin() {
let (mut i_prot, mut o_prot) = test_objects();