proto-socket/tools/generate_proto.sh
toki 6cdd0c3581 feat: protocol evolution compatibility implementation
- Add legacy alias support for backward compatibility
- Update ProtocolBuffer message definitions with new fields
- Implement fullname-based message routing
- Add alias fallback logic in all language clients (Dart, Go, Kotlin, Python, TypeScript)
- Update test suites for alias and fullname validation
- Add protocol sync verification tools
- Update documentation (PORTING_GUIDE, PROTOCOL, VERSIONING)
- Add agent task documentation for protocol evolution
2026-06-16 06:56:15 +09:00

37 lines
1 KiB
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
require_binary() {
local binary="$1"
local hint="$2"
if ! command -v "$binary" >/dev/null 2>&1; then
echo "Missing required binary: $binary" >&2
echo "$hint" >&2
exit 1
fi
}
require_binary protoc "Install Protocol Buffers compiler and ensure protoc is on PATH."
require_binary protoc-gen-dart "Install Dart plugin: dart pub global activate protoc_plugin, then add pub-cache/bin to PATH."
require_binary protoc-gen-go "Install Go plugin: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest, then add GOPATH/bin to PATH."
(
protoc \
--proto_path="$repo_root/proto" \
--dart_out="$repo_root/dart/lib/src/packets" \
message_common.proto
)
(
cd "$repo_root/go"
protoc --go_out=. --go_opt=paths=source_relative packets/message_common.proto
)
(
cd "$repo_root/python"
protoc --python_out=. --pyi_out=. proto_socket/packets/message_common.proto
)
"$repo_root/tools/check_proto_sync.sh"