From cf8f4c160b1b12b67d074b056cca0b3510a2f03a Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Fri, 6 Oct 2023 12:58:03 +0200 Subject: [PATCH] Use `npm` in `grammar:build` `pnpm` is not available in that job. --- .github/workflows/ci-backend.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml index 5a74f81d849d0..6fc13397ba37f 100644 --- a/.github/workflows/ci-backend.yml +++ b/.github/workflows/ci-backend.yml @@ -145,7 +145,7 @@ jobs: cd current npm run schema:build:python && git diff --exit-code - - name: Check if antlr definitions are up to date + - name: Check if ANTLR definitions are up to date run: | # Installing a version of ant compatible with what we use in development from homebrew (4.13) # "apt-get install antlr" would install 4.7 which is incompatible with our grammar. diff --git a/package.json b/package.json index 619f5ab3e0181..b9430b88b84a0 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "schema:build": "pnpm run schema:build:json && pnpm run schema:build:python", "schema:build:json": "ts-json-schema-generator -f tsconfig.json --path 'frontend/src/*.ts' --type 'QuerySchema' --no-type-check > frontend/src/queries/schema.json && prettier --write frontend/src/queries/schema.json", "schema:build:python": "datamodel-codegen --collapse-root-models --disable-timestamp --use-one-literal-as-default --use-default-kwarg --use-subclass-enum --input frontend/src/queries/schema.json --input-file-type jsonschema --output posthog/schema.py --output-model-type pydantic_v2.BaseModel && black posthog/schema.py", - "grammar:build": "pnpm grammar:build:python && pnpm grammar:build:cpp", + "grammar:build": "npm run grammar:build:python && npm run grammar:build:cpp", "grammar:build:python": "cd posthog/hogql/grammar && antlr -Dlanguage=Python3 HogQLLexer.g4 && antlr -visitor -no-listener -Dlanguage=Python3 HogQLParser.g4", "grammar:build:cpp": "cd posthog/hogql/grammar && antlr -o ../../../hogql_parser -Dlanguage=Cpp HogQLLexer.g4 && antlr -o ../../../hogql_parser -visitor -no-listener -Dlanguage=Cpp HogQLParser.g4", "packages:build": "pnpm packages:build:apps-common && pnpm packages:build:lemon-ui",