Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 34 additions & 3 deletions bin/generate-sources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,43 @@ set -eu
cd "${BASH_SOURCE%/*}/.."

TARGET=/build/target/generated-sources/thrift
GRADLE_VERSION=8.4
THRIFT_VERSION=$(mvn -q help:evaluate -Dexpression=libthrift.version -DforceStdout)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to upgrade it because Trino uses 0.21.0.


# use unstable for Thrift 0.19.0
docker run -v "${PWD}:/build" --rm debian:unstable /bin/sh -c "\
docker run -v "${PWD}:/build" --rm debian:bookworm /bin/sh -c "\
set -eux
apt-get update -q
apt-get install -q -y thrift-compiler
apt-get install -q -y \
ant \
automake\
bison \
flex \
g++ \
git \
libboost-all-dev \
libevent-dev \
libssl-dev \
libtool \
make \
openjdk-17-jdk-headless \
pkg-config \
unzip \
wget

wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q \
-O /tmp/gradle-$GRADLE_VERSION-bin.zip
unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip
mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle
ln -s /usr/local/gradle/bin/gradle /usr/local/bin

wget 'https://dlcdn.apache.org/thrift/$THRIFT_VERSION/thrift-$THRIFT_VERSION.tar.gz'
tar zxf thrift-$THRIFT_VERSION.tar.gz
cd thrift-$THRIFT_VERSION
./bootstrap.sh
./configure --without-cpp --without-kotlin --without-python --without-py3
make
make install

rm -rf $TARGET
mkdir -p $TARGET
thrift -o $TARGET \
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@
<air.check.skip-extended>true</air.check.skip-extended>
<air.javadoc.lint>all,-missing</air.javadoc.lint>
<project.build.targetJdk>17</project.build.targetJdk>
<libthrift.version>0.21.0</libthrift.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.19.0</version>
<version>${libthrift.version}</version>
</dependency>

<dependency>
Expand Down
Loading