Skip to content

Commit f6d4206

Browse files
NOSNOW Updated monorepo unparser location (#3156)
1 parent 322d3a4 commit f6d4206

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

scripts/copy-ast.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ SNOWPARK_ROOT=$(git rev-parse --show-toplevel)
1515
# Build the targets.
1616
pushd $MONOREPO_DIR
1717
bazel build //Snowpark/ast:ast_proto
18-
bazel build //Snowpark/unparser
18+
bazel build //Snowpark/frontend/unparser
1919
popd
2020

2121
# Copy the AST.

scripts/copy-remote-ast.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# This script assumes the target Cloud Workspace specified as the command-line argument has the build target.
3-
# To make sure this is the case, run bazel build //Snowpark/ast:ast_proto && bazel build //Snowpark/unparser && bazel run //Snowpark/unparser.
3+
# To make sure this is the case, run bazel build //Snowpark/ast:ast_proto && bazel build //Snowpark/frontend/unparser && bazel run //Snowpark/frontend/unparser.
44
# The bazel build commands will create the proto and unparser.jar files, whereas bazel run will create the run-files directory.
55

66
# N.B. The calling environment further requires:
@@ -28,15 +28,15 @@ REMOTE_HOME=$(ssh $1 'echo "$HOME"')
2828

2929
# Run bazel build remotely.
3030
# Adding _deploy to a bazel JVM target builds a fat jar,
31-
# For the unparser this target is //Snowpark/unparser:unparser_deploy.jar.
32-
ssh $1 'cd ~/Snowflake/trunk && bazel build //Snowpark/ast:ast_proto && bazel build //Snowpark/unparser:unparser_deploy.jar'
31+
# For the unparser this target is //Snowpark/frontend/unparser:unparser_deploy.jar.
32+
ssh $1 'cd ~/Snowflake/trunk && bazel build //Snowpark/ast:ast_proto && bazel build //Snowpark/frontend/unparser:unparser_deploy.jar'
3333

3434
# (1) Copy over ast.proto file (required by python -x tox -e protoc).
3535
scp $1:"$REMOTE_HOME/Snowflake/trunk/bazel-bin/Snowpark/ast/ast.proto" $SNOWPARK_ROOT/src/snowflake/snowpark/_internal/proto/ast.proto
3636

3737
# (2) Copy over fat unparser_deploy.jar and rename to unparser.jar.
38-
mkdir -p $MONOREPO_DIR/bazel-bin/Snowpark/unparser/
39-
scp $1:$REMOTE_HOME/Snowflake/trunk/bazel-bin/Snowpark/unparser/unparser_deploy.jar $MONOREPO_DIR/bazel-bin/Snowpark/unparser/unparser.jar
38+
mkdir -p $MONOREPO_DIR/bazel-bin/Snowpark/frontend/unparser/
39+
scp $1:$REMOTE_HOME/Snowflake/trunk/bazel-bin/Snowpark/frontend/unparser/unparser_deploy.jar $MONOREPO_DIR/bazel-bin/Snowpark/frontend/unparser/unparser.jar
4040

4141
pushd $SNOWPARK_ROOT
4242
python -m tox -e protoc

tests/ast/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pytest --update-expectations tests/ast
3535
For these tests to work, the Unparser must be built in the monorepo:
3636
```bash
3737
cd my-monorepo-path
38-
bazel build //Snowpark/unparser
38+
bazel build //Snowpark/frontend/unparser
3939
```
4040

4141
The location of the monorepo must be supplied in the environment variable `MONOREPO_DIR`.

tests/ast/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def default_unparser_path():
1616
explicit = os.getenv("MONOREPO_DIR")
1717
default_default = os.path.join(os.getenv("HOME"), "Snowflake/trunk")
1818
base_dir = explicit or default_default
19-
unparser_dir = os.path.join(base_dir, "bazel-bin/Snowpark/unparser")
19+
unparser_dir = os.path.join(base_dir, "bazel-bin/Snowpark/frontend/unparser")
2020

2121
# Grab all *.jar files from the subtree.
2222
jars = []

0 commit comments

Comments
 (0)