Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make protoc-gen-prost work #3772

Merged
merged 1 commit into from
Dec 16, 2024
Merged
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
8 changes: 4 additions & 4 deletions backend/protos/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ 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=.
- plugin: prost
out: ../../sqlc-gen-ftl/src/protos
opt:
- bytes=.
17 changes: 14 additions & 3 deletions scripts/protoc-gen-prost
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
set -euo pipefail

if [ ! "${HERMIT_ENV:-}" ]; then
# shellcheck disable=SC1091
. "$(dirname "$(dirname "$0")")/bin/activate-hermit"
# shellcheck disable=SC1091
. "$(dirname "$(dirname "$0")")/bin/activate-hermit" > /dev/null 2>&1
fi


function flockexec() {
file="$1"
shift
if [ "$(uname)" = "Darwin" ]; then
lockf -t 120 "$file" "$@"
else
flock -w 120 "$file" "$@"
fi
}

# Ensure the binary exists, install if it doesn't
mk "${HERMIT_ENV}/.hermit/rust/bin/protoc-gen-prost" : -- cargo install protoc-gen-prost
flockexec /tmp/protoc-gen-prost.lock mk "${HERMIT_ENV}/.hermit/rust/bin/protoc-gen-prost" : -- cargo install protoc-gen-prost 1>&2

# Execute the binary with any passed arguments
exec "${HERMIT_ENV}/.hermit/rust/bin/protoc-gen-prost" "$@"
7 changes: 4 additions & 3 deletions scripts/update-roadmap-issues
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
set -euo pipefail

label="$1"
issue_number="$2"
label="${1:-}"
issue_number="${2:-}"
if [ -z "$label" ] || [ -z "$issue_number" ]; then
echo "Error: Both label and issue number must be provided."
echo "Usage: $0 <label> <issue_number>"
Expand Down Expand Up @@ -130,7 +131,7 @@ EOF
}

update_issue() {
if test -z "$NOOP"; then
if test -z "${NOOP:-}"; then
gh issue edit -F - "$issue_number"
else
cat
Expand Down
Loading