Skip to content

Commit 39d5569

Browse files
committed
fix: update ANTLR setup
1 parent 9a2957a commit 39d5569

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && \
55
sdk install java 25-graalce"
66
COPY scripts/setup_antlr.sh /tmp/setup_antlr.sh
77
RUN bash /tmp/setup_antlr.sh && rm /tmp/setup_antlr.sh
8+
ENV ANTLR_JAR="lib/antlr-complete.jar"
89
# protoc 29.5 is the last version with protobuf python v5 which is compatible with protoletariat v3
910
RUN cd ~ && curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v29.5/protoc-29.5-linux-x86_64.zip && \
1011
unzip protoc-29.5-linux-x86_64.zip -d ~/.local && \

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Run the upgrade script to upgrade the submodule and regenerate the protobuf stub
2828

2929
```
3030
uv sync --extra gen_proto
31-
uv run ./update_proto.sh <version>
31+
uv run scripts/update_proto.sh <version>
3232
```
3333

3434
## Antlr grammar

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
setup-antlr:
22
@bash scripts/setup_antlr.sh > /dev/null
33

4-
antlr:
5-
@export ANTLR_JAR=$$(bash scripts/setup_antlr.sh); \
4+
antlr: setup-antlr
65
cd third_party/substrait/grammar \
7-
&& java -jar ../../../$${ANTLR_JAR} -o ../../../src/substrait/gen/antlr -Dlanguage=Python3 SubstraitType.g4 \
6+
&& java -jar ../../../lib/antlr-complete.jar -o ../../../src/substrait/gen/antlr -Dlanguage=Python3 SubstraitType.g4 \
87
&& rm ../../../src/substrait/gen/antlr/*.tokens \
98
&& rm ../../../src/substrait/gen/antlr/*.interp
109

scripts/setup_antlr.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55

66
ANTLR_VERSION="4.13.2"
77
ANTLR_JAR_DIR="lib"
8-
ANTLR_JAR="${ANTLR_JAR_DIR}/antlr-${ANTLR_VERSION}-complete.jar"
8+
ANTLR_JAR="${ANTLR_JAR_DIR}/antlr-complete.jar"
99
ANTLR_URL="http://www.antlr.org/download/antlr-${ANTLR_VERSION}-complete.jar"
1010
VERSION_FILE="${ANTLR_JAR_DIR}/.antlr_version"
1111

0 commit comments

Comments
 (0)