Skip to content

Commit

Permalink
chore: remove rust proto gen from build tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
worstell committed Dec 16, 2024
1 parent 7534973 commit a3c4c70
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ jobs:
uses: ./.github/actions/build-cache
- name: Test WASM
run: cd sqlc-gen-ftl && cargo test --features ci --test sqlc_gen_ftl_test -- --nocapture
- name: Check for uncommitted changes
run: |
if [[ -n $(git status -s) ]]; then
echo "Error: Building sqlc-gen-ftl resulted in uncommitted changes:"
git status -s
git --no-pager diff
exit 1
fi
extension:
name: VSCode Extension
runs-on: ubuntu-latest
Expand Down
13 changes: 6 additions & 7 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ dev *args:
watchexec -r {{WATCHEXEC_ARGS}} -- "ftl dev --plain {{args}}"

# Build everything
build-all: build-protos-unconditionally build-backend build-frontend build-backend-tests build-generate build-zips lsp-generate build-jvm build-language-plugins build-go2proto-testdata build-sqlc-gen-ftl
build-all: build-protos-unconditionally build-backend build-frontend build-backend-tests build-generate build-zips lsp-generate build-jvm build-language-plugins build-go2proto-testdata

# Run "go generate" on all packages
build-generate:
Expand Down Expand Up @@ -165,16 +165,15 @@ build-extension: pnpm-install
@mk {{EXTENSION_OUT}} : frontend/vscode/src frontend/vscode/package.json -- "cd frontend/vscode && rm -f ftl-*.vsix && pnpm run compile"

# Build the sqlc-ftl-gen plugin, used to generate FTL schema from SQL
build-sqlc-gen-ftl: build-protos
build-sqlc-gen-ftl: build-rust-protos
@mk {{SQLC_GEN_FTL_OUT}} : sqlc-gen-ftl/src -- \
"cd sqlc-gen-ftl && \
cargo build --target wasm32-wasip1 --release"

cargo-install:
@mk sqlc-gen-ftl/target : sqlc-gen-ftl/Cargo.toml -- \
"cd sqlc-gen-ftl && \
cargo install protoc-gen-prost && \
cargo build"
# Generate Rust protos
build-rust-protos:
@mk sqlc-gen-ftl/src/protos : backend/protos -- \
"cd backend/protos && buf generate --template buf.gen.rust.yaml"

# Install development version of VSCode extension
install-extension: build-extension
Expand Down
6 changes: 6 additions & 0 deletions backend/protos/buf.gen.rust.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: v1
plugins:
- plugin: prost
out: src/protos
opt:
- bytes=.
4 changes: 0 additions & 4 deletions backend/protos/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,3 @@ plugins:
out: ../../python-runtime/ftl/src/ftl/protos
opt:
- pyi_out=../../python-runtime/ftl/src/ftl/protos
- plugin: prost
out: ../../sqlc-gen-ftl/src/protos
opt:
- bytes=.
2 changes: 0 additions & 2 deletions scripts/autofmt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ find backend/protos \( -name '*.pb.go' -o -name '*.connect.go' \) -print0 | xarg

just pnpm-install

just cargo-install

(cd backend/protos && buf generate)

echo "Formatting TypeScript..."
Expand Down

0 comments on commit a3c4c70

Please sign in to comment.