diff --git a/.github/workflows/release-cpp.yml b/.github/workflows/release-cpp.yml index 34792cca..c843b99b 100644 --- a/.github/workflows/release-cpp.yml +++ b/.github/workflows/release-cpp.yml @@ -2,18 +2,19 @@ name: Release CPP on: release: - types: [published] + types: [ published ] workflow_dispatch: jobs: release: name: Release cmd/protoc-gen-cpp-tableau-loader runs-on: ubuntu-latest - if: startsWith(github.event.release.tag_name, 'cmd/protoc-gen-cpp-tableau-loader/') + if: startsWith(github.event.release.tag_name, + 'cmd/protoc-gen-cpp-tableau-loader/') strategy: matrix: - goos: [linux, darwin, windows] - goarch: [amd64, arm64] + goos: [ linux, darwin, windows ] + goarch: [ amd64, arm64 ] exclude: - goos: linux goarch: arm64 diff --git a/.github/workflows/release-csharp.yml b/.github/workflows/release-csharp.yml index aa718903..e9490733 100644 --- a/.github/workflows/release-csharp.yml +++ b/.github/workflows/release-csharp.yml @@ -2,18 +2,19 @@ name: Release C# on: release: - types: [published] + types: [ published ] workflow_dispatch: jobs: release: name: Release cmd/protoc-gen-csharp-tableau-loader runs-on: ubuntu-latest - if: startsWith(github.event.release.tag_name, 'cmd/protoc-gen-csharp-tableau-loader/') + if: startsWith(github.event.release.tag_name, + 'cmd/protoc-gen-csharp-tableau-loader/') strategy: matrix: - goos: [linux, darwin, windows] - goarch: [amd64, arm64] + goos: [ linux, darwin, windows ] + goarch: [ amd64, arm64 ] exclude: - goos: linux goarch: arm64 diff --git a/.github/workflows/release-go.yml b/.github/workflows/release-go.yml index 68da1559..79ca9389 100644 --- a/.github/workflows/release-go.yml +++ b/.github/workflows/release-go.yml @@ -2,17 +2,18 @@ name: Release Go on: release: - types: [published] + types: [ published ] workflow_dispatch: jobs: release: name: Release cmd/protoc-gen-go-tableau-loader runs-on: ubuntu-latest - if: startsWith(github.event.release.tag_name, 'cmd/protoc-gen-go-tableau-loader/') + if: startsWith(github.event.release.tag_name, + 'cmd/protoc-gen-go-tableau-loader/') strategy: matrix: - goos: [linux, darwin, windows] - goarch: [amd64, arm64] + goos: [ linux, darwin, windows ] + goarch: [ amd64, arm64 ] exclude: - goos: linux goarch: arm64 diff --git a/.github/workflows/testing-cpp.yml b/.github/workflows/testing-cpp.yml index 3e88a540..9229d24f 100644 --- a/.github/workflows/testing-cpp.yml +++ b/.github/workflows/testing-cpp.yml @@ -3,7 +3,7 @@ name: Testing C++ # Trigger on pushes, PRs (excluding documentation changes), and nightly. on: push: - branches: [master, main] + branches: [ master, main ] pull_request: schedule: - cron: 0 0 * * * # daily at 00:00 @@ -20,12 +20,10 @@ jobs: - os: ubuntu-latest go-version: 1.21.x init_script: bash init.sh - gen_script: bash gen.sh run_loader: ./bin/loader - os: windows-latest go-version: 1.21.x init_script: cmd /c init.bat - gen_script: cmd /c gen.bat run_loader: .\bin\loader.exe name: test (${{ matrix.os }}) @@ -59,13 +57,27 @@ jobs: - name: Init submodules and build protobuf run: ${{ matrix.init_script }} + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + version: "3.19.3" + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install Buf + uses: bufbuild/buf-action@v1 + with: + version: 1.67.0 + setup_only: true + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Generate protoconf working-directory: test/cpp-tableau-loader - run: ${{ matrix.gen_script }} + run: buf generate .. - name: CMake Configure working-directory: test/cpp-tableau-loader - run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=17 + run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug + -DCMAKE_CXX_STANDARD=17 - name: CMake Build working-directory: test/cpp-tableau-loader diff --git a/.github/workflows/testing-csharp.yml b/.github/workflows/testing-csharp.yml index b631f4c8..3937c779 100644 --- a/.github/workflows/testing-csharp.yml +++ b/.github/workflows/testing-csharp.yml @@ -3,7 +3,7 @@ name: Testing C# # Trigger on pushes, PRs (excluding documentation changes), and nightly. on: push: - branches: [master, main] + branches: [ master, main ] pull_request: schedule: - cron: 0 0 * * * # daily at 00:00 @@ -19,10 +19,8 @@ jobs: include: - os: ubuntu-latest go-version: 1.21.x - gen_script: bash gen.sh - os: windows-latest go-version: 1.21.x - gen_script: cmd /c gen.bat name: test (${{ matrix.os }}) runs-on: ${{ matrix.os }} @@ -51,9 +49,16 @@ jobs: version: "3.19.3" repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Buf + uses: bufbuild/buf-action@v1 + with: + version: 1.67.0 + setup_only: true + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Generate protoconf working-directory: test/csharp-tableau-loader - run: ${{ matrix.gen_script }} + run: buf generate .. - name: Build working-directory: test/csharp-tableau-loader diff --git a/.github/workflows/testing-go.yml b/.github/workflows/testing-go.yml index 8128c057..9c54c255 100644 --- a/.github/workflows/testing-go.yml +++ b/.github/workflows/testing-go.yml @@ -3,7 +3,7 @@ name: Testing Go # Trigger on pushes, PRs (excluding documentation changes), and nightly. on: push: - branches: [master, main] + branches: [ master, main ] pull_request: schedule: - cron: 0 0 * * * # daily at 00:00 @@ -19,10 +19,8 @@ jobs: include: - os: ubuntu-latest go-version: 1.21.x - gen_script: bash gen.sh - os: windows-latest go-version: 1.21.x - gen_script: cmd /c gen.bat name: test (${{ matrix.os }}) runs-on: ${{ matrix.os }} @@ -40,24 +38,23 @@ jobs: go-version: ${{ matrix.go-version }} cache: true - - name: Install Protoc - uses: arduino/setup-protoc@v1 + - name: Install Buf + uses: bufbuild/buf-action@v1 with: - version: "3.19.3" - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install protoc-gen-go - run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 + version: 1.67.0 + setup_only: true + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Generate protoconf working-directory: test/go-tableau-loader - run: ${{ matrix.gen_script }} + run: buf generate .. - name: Vet run: go vet ./... - name: Unittest - run: go test -v -timeout 30m -race ./... -coverprofile=coverage.txt -covermode=atomic + run: go test -v -timeout 30m -race ./... -coverprofile=coverage.txt + -covermode=atomic - name: Run loader working-directory: test/go-tableau-loader diff --git a/.gitmodules b/.gitmodules index d0be858b..5f237432 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,7 +2,3 @@ path = third_party/_submodules/protobuf url = https://github.com/protocolbuffers/protobuf ignore = dirty -[submodule "third_party/_submodules/tableau"] - path = third_party/_submodules/tableau - url = https://github.com/tableauio/tableau - ignore = dirty diff --git a/README.md b/README.md index 3df3d889..128934c9 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ The official config loader for [Tableau](https://github.com/tableauio/tableau). ### Dev at Linux - Change dir: `cd test/cpp-tableau-loader` -- Generate protoconf: `bash ./gen.sh` +- Generate protoconf: `PATH=../../third_party/_submodules/protobuf/cmake/build:$PATH buf generate ..` - CMake: - C++17: `cmake -S . -B build` - C++20: `cmake -S . -B build -DCMAKE_CXX_STANDARD=20` @@ -53,7 +53,7 @@ The official config loader for [Tableau](https://github.com/tableauio/tableau). - Initialize MSVC environment (from loader root): `.\prepare.bat` - Change dir: `cd test\cpp-tableau-loader`, or change directory with Drive, e.g.: `cd /D D:\GitHub\loader\test\cpp-tableau-loader` -- Generate protoconf: `.\gen.bat` +- Generate protoconf: `cmd /C "set PATH=..\..\third_party\_submodules\protobuf\cmake\build;%PATH% && buf generate .."` - CMake: - C++17: `cmake -S . -B build -G "Ninja"` - C++20: `cmake -S . -B build -G "Ninja" -DCMAKE_CXX_STANDARD=20` @@ -68,9 +68,8 @@ The official config loader for [Tableau](https://github.com/tableauio/tableau). ## Go - Install: **go1.21** or above -- Install protoc-gen-go: `go install google.golang.org/protobuf/cmd/protoc-gen-go@latest` - Change dir: `cd test/go-tableau-loader` -- Generate protoconf: `bash ./gen.sh` +- Generate protoconf: `buf generate .. ` - Run: `go run .` ### References @@ -88,7 +87,7 @@ The official config loader for [Tableau](https://github.com/tableauio/tableau). - Install: **dotnet-sdk-8.0** - Change dir: `cd test/csharp-tableau-loader` -- Generate protoconf: `sh gen.sh` +- Generate protoconf: `PATH=../third_party/_submodules/protobuf/cmake/build:$PATH buf generate .. ` - Test: `dotnet run` ## TypeScript diff --git a/test/buf.lock b/test/buf.lock new file mode 100644 index 00000000..13c53ed2 --- /dev/null +++ b/test/buf.lock @@ -0,0 +1,6 @@ +# Generated by buf. DO NOT EDIT. +version: v2 +deps: + - name: buf.build/tableauio/tableau + commit: 04b3a2c59b6644318d341d4f2220a578 + digest: b5:59bca610664e985502469393a4d47370da9d40d874312a76db4fe133fe61e27fc23b72d2ad45d67c3af76e6620ab1c86c3de0bd13d3517abf6e8b75a346b78fd diff --git a/test/buf.yaml b/test/buf.yaml new file mode 100644 index 00000000..d6995604 --- /dev/null +++ b/test/buf.yaml @@ -0,0 +1,5 @@ +version: v2 +deps: + - buf.build/tableauio/tableau:v0.15.1 +modules: + - path: proto diff --git a/test/cpp-tableau-loader/buf.gen.yaml b/test/cpp-tableau-loader/buf.gen.yaml new file mode 100644 index 00000000..37635486 --- /dev/null +++ b/test/cpp-tableau-loader/buf.gen.yaml @@ -0,0 +1,11 @@ +version: v2 +plugins: + - protoc_builtin: cpp + out: src/protoconf + include_imports: true + - local: ["go", "run", "../../cmd/protoc-gen-cpp-tableau-loader"] + out: src/protoconf + opt: + - paths=source_relative + - shards=2 + strategy: all diff --git a/test/cpp-tableau-loader/gen.bat b/test/cpp-tableau-loader/gen.bat deleted file mode 100644 index 1751c14c..00000000 --- a/test/cpp-tableau-loader/gen.bat +++ /dev/null @@ -1,82 +0,0 @@ -@echo off -setlocal -setlocal enabledelayedexpansion - -for /f "delims=" %%i in ('git rev-parse --show-toplevel') do set repoRoot=%%i -cd /d "%repoRoot%" - -REM Allow overriding protoc via environment variable. -REM Default to locally compiled protoc for local development; fallback to system protoc. -if not defined PROTOC ( - if exist "%repoRoot%\third_party\_submodules\protobuf\cmake\build\protoc.exe" ( - set "PROTOC=%repoRoot%\third_party\_submodules\protobuf\cmake\build\protoc.exe" - ) else ( - where protoc >nul 2>nul - if !errorlevel! equ 0 ( - for /f "delims=" %%p in ('where protoc') do set "PROTOC=%%p" - ) else ( - echo Error: protoc not found. Please build protobuf submodule or install protoc. >&2 - exit /b 1 - ) - ) -) -REM Allow overriding protobuf include path via environment variable. -REM Default to local submodule source; fallback to system include path. -if not defined PROTOBUF_PROTO ( - if exist "%repoRoot%\third_party\_submodules\protobuf\src\google\protobuf" ( - set "PROTOBUF_PROTO=%repoRoot%\third_party\_submodules\protobuf\src" - ) else ( - for /f "delims=" %%p in ('where protoc 2^>nul') do set "_PROTOC_DIR=%%~dpp" - if defined _PROTOC_DIR ( - set "PROTOBUF_PROTO=!_PROTOC_DIR!..\include" - ) else ( - set "PROTOBUF_PROTO=%repoRoot%\third_party\_submodules\protobuf\src" - ) - ) -) -set "TABLEAU_PROTO=%repoRoot%\third_party\_submodules\tableau\proto" -set "ROOTDIR=%repoRoot%\test\cpp-tableau-loader" -set "PLGUIN_DIR=%repoRoot%\cmd\protoc-gen-cpp-tableau-loader" -set "PROTOCONF_IN=%repoRoot%\test\proto" -set "PROTOCONF_OUT=%ROOTDIR%\src\protoconf" - -REM remove old generated files -rmdir /s /q "%PROTOCONF_OUT%" 2>nul -mkdir "%PROTOCONF_OUT%" - -REM build protoc plugin of loader -pushd "%PLGUIN_DIR%" -go build -popd - -set "PATH=%PATH%;%PLGUIN_DIR%" - -set protoFiles= -pushd "%PROTOCONF_IN%" -for /R %%f in (*.proto) do ( - set protoFiles=!protoFiles! "%%f" -) -popd -"%PROTOC%" ^ ---cpp-tableau-loader_out="%PROTOCONF_OUT%" ^ ---cpp-tableau-loader_opt=paths=source_relative,shards=2 ^ ---cpp_out="%PROTOCONF_OUT%" ^ ---proto_path="%PROTOBUF_PROTO%" ^ ---proto_path="%TABLEAU_PROTO%" ^ ---proto_path="%PROTOCONF_IN%" ^ -!protoFiles! - -set "TABLEAU_IN=%TABLEAU_PROTO%\tableau\protobuf" -set "TABLEAU_OUT=%ROOTDIR%\src" -REM remove old generated files -if exist "%TABLEAU_OUT%\tableau" rmdir /s /q "%TABLEAU_OUT%\tableau" -mkdir "%TABLEAU_OUT%\tableau" - -"%PROTOC%" ^ ---cpp_out="%TABLEAU_OUT%" ^ ---proto_path="%PROTOBUF_PROTO%" ^ ---proto_path="%TABLEAU_PROTO%" ^ -"%TABLEAU_IN%\tableau.proto" "%TABLEAU_IN%\wellknown.proto" - -endlocal -endlocal diff --git a/test/cpp-tableau-loader/gen.sh b/test/cpp-tableau-loader/gen.sh deleted file mode 100755 index 017757e3..00000000 --- a/test/cpp-tableau-loader/gen.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -# set -eux -set -e -set -o pipefail - -shopt -s globstar - -cd "$(git rev-parse --show-toplevel)" - -# Allow overriding protoc via environment variable. -# Default to locally compiled protoc for local development; fallback to system protoc. -LOCAL_PROTOC="./third_party/_submodules/protobuf/cmake/build/protoc" -if [ -z "$PROTOC" ]; then - if [ -x "$LOCAL_PROTOC" ]; then - PROTOC="$LOCAL_PROTOC" - else - PROTOC="$(which protoc 2>/dev/null || true)" - fi -fi -if [ -z "$PROTOC" ]; then - echo "Error: protoc not found. Please build protobuf submodule or install protoc." >&2 - exit 1 -fi -# Allow overriding protobuf include path via environment variable. -# Default to local submodule source; fallback to system include path. -LOCAL_PROTOBUF_PROTO="./third_party/_submodules/protobuf/src" -if [ -z "$PROTOBUF_PROTO" ]; then - if [ -d "$LOCAL_PROTOBUF_PROTO/google/protobuf" ]; then - PROTOBUF_PROTO="$LOCAL_PROTOBUF_PROTO" - else - PROTOBUF_PROTO="$(pkg-config --variable=includedir protobuf 2>/dev/null || echo /usr/include)" - fi -fi -TABLEAU_PROTO="./third_party/_submodules/tableau/proto" -ROOTDIR="./test/cpp-tableau-loader" -PLGUIN_DIR="./cmd/protoc-gen-cpp-tableau-loader" -PROTOCONF_IN="./test/proto" -PROTOCONF_OUT="${ROOTDIR}/src/protoconf" - -# remove old generated files -rm -rfv "$PROTOCONF_OUT" -mkdir -p "$PROTOCONF_OUT" - -# build protoc plugin of loader -cd "${PLGUIN_DIR}" && go build && cd - - -export PATH="${PATH}:${PLGUIN_DIR}" - -${PROTOC} \ - --cpp-tableau-loader_out="$PROTOCONF_OUT" \ - --cpp-tableau-loader_opt=paths=source_relative,shards=2 \ - --cpp_out="$PROTOCONF_OUT" \ - --proto_path="$PROTOBUF_PROTO" \ - --proto_path="$TABLEAU_PROTO" \ - --proto_path="$PROTOCONF_IN" \ - "$PROTOCONF_IN"/**/*.proto - -TABLEAU_IN="$TABLEAU_PROTO/tableau/protobuf" -TABLEAU_OUT="${ROOTDIR}/src" -# remove old generated files -rm -rfv "$TABLEAU_OUT/tableau" -mkdir -p "$TABLEAU_OUT/tableau" - -${PROTOC} \ - --cpp_out="$TABLEAU_OUT" \ - --proto_path="$PROTOBUF_PROTO" \ - --proto_path="$TABLEAU_PROTO" \ - "${TABLEAU_PROTO}/tableau/protobuf/tableau.proto" \ - "${TABLEAU_PROTO}/tableau/protobuf/wellknown.proto" diff --git a/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.cc b/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.cc index 3d5235a6..847986f4 100644 --- a/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: hero_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.h b/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.h index 0092db80..09922d63 100644 --- a/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/hero_conf.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: hero_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/hub.pc.cc b/test/cpp-tableau-loader/src/protoconf/hub.pc.cc index 8cd60ff5..69c19d83 100644 --- a/test/cpp-tableau-loader/src/protoconf/hub.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/hub.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "hub.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/hub.pc.h b/test/cpp-tableau-loader/src/protoconf/hub.pc.h index 3dec0210..612c45b4 100644 --- a/test/cpp-tableau-loader/src/protoconf/hub.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/hub.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #pragma once diff --git a/test/cpp-tableau-loader/src/protoconf/hub_shard0.pc.cc b/test/cpp-tableau-loader/src/protoconf/hub_shard0.pc.cc index a774e1c2..198b9224 100644 --- a/test/cpp-tableau-loader/src/protoconf/hub_shard0.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/hub_shard0.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "hub.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/hub_shard1.pc.cc b/test/cpp-tableau-loader/src/protoconf/hub_shard1.pc.cc index aada2017..4a228bc5 100644 --- a/test/cpp-tableau-loader/src/protoconf/hub_shard1.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/hub_shard1.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "hub.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/index_conf.pc.cc b/test/cpp-tableau-loader/src/protoconf/index_conf.pc.cc index ef84941d..532ca56c 100644 --- a/test/cpp-tableau-loader/src/protoconf/index_conf.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/index_conf.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: index_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/index_conf.pc.h b/test/cpp-tableau-loader/src/protoconf/index_conf.pc.h index a9fa3e6c..7205607f 100644 --- a/test/cpp-tableau-loader/src/protoconf/index_conf.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/index_conf.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: index_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/item_conf.pc.cc b/test/cpp-tableau-loader/src/protoconf/item_conf.pc.cc index 722a75e0..1edc25e2 100644 --- a/test/cpp-tableau-loader/src/protoconf/item_conf.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/item_conf.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: item_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/item_conf.pc.h b/test/cpp-tableau-loader/src/protoconf/item_conf.pc.h index fd757f5a..42f9cb15 100644 --- a/test/cpp-tableau-loader/src/protoconf/item_conf.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/item_conf.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: item_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/load.pc.cc b/test/cpp-tableau-loader/src/protoconf/load.pc.cc index ef258491..f7018a18 100644 --- a/test/cpp-tableau-loader/src/protoconf/load.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/load.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "load.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/load.pc.h b/test/cpp-tableau-loader/src/protoconf/load.pc.h index a8cbef6f..df584444 100644 --- a/test/cpp-tableau-loader/src/protoconf/load.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/load.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #pragma once diff --git a/test/cpp-tableau-loader/src/protoconf/logger.pc.cc b/test/cpp-tableau-loader/src/protoconf/logger.pc.cc index ca604ac9..2447b873 100644 --- a/test/cpp-tableau-loader/src/protoconf/logger.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/logger.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "logger.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/logger.pc.h b/test/cpp-tableau-loader/src/protoconf/logger.pc.h index 2925cf94..07d6884a 100644 --- a/test/cpp-tableau-loader/src/protoconf/logger.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/logger.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #pragma once diff --git a/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.cc b/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.cc index e943a3d2..ff10e772 100644 --- a/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: patch_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.h b/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.h index c761d655..a3741353 100644 --- a/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/patch_conf.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: patch_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/scheduler.pc.cc b/test/cpp-tableau-loader/src/protoconf/scheduler.pc.cc index a102e525..08207551 100644 --- a/test/cpp-tableau-loader/src/protoconf/scheduler.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/scheduler.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "scheduler.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/scheduler.pc.h b/test/cpp-tableau-loader/src/protoconf/scheduler.pc.h index 7b34521e..b2a1242c 100644 --- a/test/cpp-tableau-loader/src/protoconf/scheduler.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/scheduler.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #pragma once diff --git a/test/cpp-tableau-loader/src/protoconf/test_conf.pc.cc b/test/cpp-tableau-loader/src/protoconf/test_conf.pc.cc index 4422fcdd..a39c3437 100644 --- a/test/cpp-tableau-loader/src/protoconf/test_conf.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/test_conf.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: test_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/test_conf.pc.h b/test/cpp-tableau-loader/src/protoconf/test_conf.pc.h index ecf62d94..c2b92c43 100644 --- a/test/cpp-tableau-loader/src/protoconf/test_conf.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/test_conf.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off // source: test_conf.proto diff --git a/test/cpp-tableau-loader/src/protoconf/util.pc.cc b/test/cpp-tableau-loader/src/protoconf/util.pc.cc index 61e04959..b6306017 100644 --- a/test/cpp-tableau-loader/src/protoconf/util.pc.cc +++ b/test/cpp-tableau-loader/src/protoconf/util.pc.cc @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #include "util.pc.h" diff --git a/test/cpp-tableau-loader/src/protoconf/util.pc.h b/test/cpp-tableau-loader/src/protoconf/util.pc.h index 92161188..39376272 100644 --- a/test/cpp-tableau-loader/src/protoconf/util.pc.h +++ b/test/cpp-tableau-loader/src/protoconf/util.pc.h @@ -1,7 +1,7 @@ // Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-cpp-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // clang-format off #pragma once diff --git a/test/csharp-tableau-loader/buf.gen.yaml b/test/csharp-tableau-loader/buf.gen.yaml new file mode 100644 index 00000000..156e631c --- /dev/null +++ b/test/csharp-tableau-loader/buf.gen.yaml @@ -0,0 +1,9 @@ +version: v2 +plugins: + - protoc_builtin: csharp + out: protoconf + include_imports: true + - local: ["go", "run", "../../cmd/protoc-gen-csharp-tableau-loader"] + out: tableau + opt: paths=source_relative + strategy: all diff --git a/test/csharp-tableau-loader/gen.bat b/test/csharp-tableau-loader/gen.bat deleted file mode 100644 index 3a3d50f7..00000000 --- a/test/csharp-tableau-loader/gen.bat +++ /dev/null @@ -1,83 +0,0 @@ -@echo off -setlocal -setlocal enabledelayedexpansion - -for /f "delims=" %%i in ('git rev-parse --show-toplevel') do set repoRoot=%%i -cd /d "%repoRoot%" - -REM Allow overriding protoc via environment variable. -REM Default to locally compiled protoc for local development; fallback to system protoc. -if not defined PROTOC ( - if exist "%repoRoot%\third_party\_submodules\protobuf\cmake\build\protoc.exe" ( - set "PROTOC=%repoRoot%\third_party\_submodules\protobuf\cmake\build\protoc.exe" - ) else ( - where protoc >nul 2>nul - if !errorlevel! equ 0 ( - for /f "delims=" %%p in ('where protoc') do set "PROTOC=%%p" - ) else ( - echo Error: protoc not found. Please build protobuf submodule or install protoc. >&2 - exit /b 1 - ) - ) -) -REM Allow overriding protobuf include path via environment variable. -REM Default to local submodule source; fallback to system include path. -if not defined PROTOBUF_PROTO ( - if exist "%repoRoot%\third_party\_submodules\protobuf\src\google\protobuf" ( - set "PROTOBUF_PROTO=%repoRoot%\third_party\_submodules\protobuf\src" - ) else ( - for /f "delims=" %%p in ('where protoc 2^>nul') do set "_PROTOC_DIR=%%~dpp" - if defined _PROTOC_DIR ( - set "PROTOBUF_PROTO=!_PROTOC_DIR!..\include" - ) else ( - set "PROTOBUF_PROTO=%repoRoot%\third_party\_submodules\protobuf\src" - ) - ) -) -set "TABLEAU_PROTO=%repoRoot%\third_party\_submodules\tableau\proto" -set "ROOTDIR=%repoRoot%\test\csharp-tableau-loader" -set "PLGUIN_DIR=%repoRoot%\cmd\protoc-gen-csharp-tableau-loader" -set "PROTOCONF_IN=%repoRoot%\test\proto" -set "PROTOCONF_OUT=%ROOTDIR%\protoconf" -set "LOADER_OUT=%ROOTDIR%\tableau" - -REM remove old generated files -rmdir /s /q "%PROTOCONF_OUT%" "%LOADER_OUT%" 2>nul -mkdir "%PROTOCONF_OUT%" "%LOADER_OUT%" - -REM build protoc plugin of loader -pushd "%PLGUIN_DIR%" -go build -popd - -set "PATH=%PATH%;%PLGUIN_DIR%" - -set protoFiles= -pushd "%PROTOCONF_IN%" -for /R %%f in (*.proto) do ( - set protoFiles=!protoFiles! "%%f" -) -popd -"%PROTOC%" ^ ---csharp_out="%PROTOCONF_OUT%" ^ ---csharp-tableau-loader_out="%LOADER_OUT%" ^ ---csharp-tableau-loader_opt=paths=source_relative ^ ---proto_path="%PROTOBUF_PROTO%" ^ ---proto_path="%TABLEAU_PROTO%" ^ ---proto_path="%PROTOCONF_IN%" ^ -!protoFiles! - -set "TABLEAU_IN=%TABLEAU_PROTO%\tableau\protobuf" -set "TABLEAU_OUT=%ROOTDIR%\protoconf\tableau" -REM remove old generated files -rmdir /s /q "%TABLEAU_OUT%" 2>nul -mkdir "%TABLEAU_OUT%" - -"%PROTOC%" ^ ---csharp_out="%TABLEAU_OUT%" ^ ---proto_path="%PROTOBUF_PROTO%" ^ ---proto_path="%TABLEAU_PROTO%" ^ -"%TABLEAU_IN%\tableau.proto" "%TABLEAU_IN%\wellknown.proto" - -endlocal -endlocal diff --git a/test/csharp-tableau-loader/gen.sh b/test/csharp-tableau-loader/gen.sh deleted file mode 100755 index 7e3d06a9..00000000 --- a/test/csharp-tableau-loader/gen.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -# set -eux -set -e -set -o pipefail - -cd "$(git rev-parse --show-toplevel)" - -# Allow overriding protoc via environment variable. -# Default to locally compiled protoc for local development; fallback to system protoc. -LOCAL_PROTOC="./third_party/_submodules/protobuf/cmake/build/protoc" -if [ -z "$PROTOC" ]; then - if [ -x "$LOCAL_PROTOC" ]; then - PROTOC="$LOCAL_PROTOC" - else - PROTOC="$(which protoc 2>/dev/null || true)" - fi -fi -if [ -z "$PROTOC" ]; then - echo "Error: protoc not found. Please build protobuf submodule or install protoc." >&2 - exit 1 -fi -# Allow overriding protobuf include path via environment variable. -# Default to local submodule source; fallback to system include path. -LOCAL_PROTOBUF_PROTO="./third_party/_submodules/protobuf/src" -if [ -z "$PROTOBUF_PROTO" ]; then - if [ -d "$LOCAL_PROTOBUF_PROTO/google/protobuf" ]; then - PROTOBUF_PROTO="$LOCAL_PROTOBUF_PROTO" - else - PROTOBUF_PROTO="$(pkg-config --variable=includedir protobuf 2>/dev/null || echo /usr/include)" - fi -fi -TABLEAU_PROTO="./third_party/_submodules/tableau/proto" -ROOTDIR="./test/csharp-tableau-loader" -PLUGIN_DIR="./cmd/protoc-gen-csharp-tableau-loader" -PROTOCONF_IN="./test/proto" -PROTOCONF_OUT="${ROOTDIR}/protoconf" -LOADER_OUT="${ROOTDIR}/tableau" - -# remove old generated files -rm -rfv "$PROTOCONF_OUT" "$LOADER_OUT" -mkdir -p "$PROTOCONF_OUT" "$LOADER_OUT" - -# build -cd "${PLUGIN_DIR}" && go build && cd - - -export PATH="$(pwd)/${PLUGIN_DIR}:${PATH}" - -# Collect all .proto files (use `find` for cross-platform compatibility). -PROTO_FILES=$(find "$PROTOCONF_IN" -name "*.proto") - -${PROTOC} \ - --csharp_out="$PROTOCONF_OUT" \ - --csharp-tableau-loader_out="$LOADER_OUT" \ - --csharp-tableau-loader_opt=paths=source_relative \ - --proto_path="$PROTOBUF_PROTO" \ - --proto_path="$TABLEAU_PROTO" \ - --proto_path="$PROTOCONF_IN" \ - $PROTO_FILES - -TABLEAU_IN="$TABLEAU_PROTO/tableau/protobuf" -TABLEAU_OUT="${ROOTDIR}/protoconf/tableau" -# remove old generated files -rm -rfv "$TABLEAU_OUT" -mkdir -p "$TABLEAU_OUT" - -${PROTOC} \ - --csharp_out="$TABLEAU_OUT" \ - --proto_path="$PROTOBUF_PROTO" \ - --proto_path="$TABLEAU_PROTO" \ - "$TABLEAU_IN/tableau.proto" \ - "$TABLEAU_IN/wellknown.proto" diff --git a/test/csharp-tableau-loader/tableau/HeroConf.pc.cs b/test/csharp-tableau-loader/tableau/HeroConf.pc.cs index 576ea607..c84ca61c 100644 --- a/test/csharp-tableau-loader/tableau/HeroConf.pc.cs +++ b/test/csharp-tableau-loader/tableau/HeroConf.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: hero_conf.proto // #nullable enable diff --git a/test/csharp-tableau-loader/tableau/Hub.pc.cs b/test/csharp-tableau-loader/tableau/Hub.pc.cs index a076b694..490b8f92 100644 --- a/test/csharp-tableau-loader/tableau/Hub.pc.cs +++ b/test/csharp-tableau-loader/tableau/Hub.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // #nullable enable using System; diff --git a/test/csharp-tableau-loader/tableau/IndexConf.pc.cs b/test/csharp-tableau-loader/tableau/IndexConf.pc.cs index fab40217..ee404d5a 100644 --- a/test/csharp-tableau-loader/tableau/IndexConf.pc.cs +++ b/test/csharp-tableau-loader/tableau/IndexConf.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: index_conf.proto // #nullable enable diff --git a/test/csharp-tableau-loader/tableau/ItemConf.pc.cs b/test/csharp-tableau-loader/tableau/ItemConf.pc.cs index 19f884ef..153c68bd 100644 --- a/test/csharp-tableau-loader/tableau/ItemConf.pc.cs +++ b/test/csharp-tableau-loader/tableau/ItemConf.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: item_conf.proto // #nullable enable diff --git a/test/csharp-tableau-loader/tableau/Load.pc.cs b/test/csharp-tableau-loader/tableau/Load.pc.cs index 463f9aa8..0f378066 100644 --- a/test/csharp-tableau-loader/tableau/Load.pc.cs +++ b/test/csharp-tableau-loader/tableau/Load.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // #nullable enable using System; diff --git a/test/csharp-tableau-loader/tableau/PatchConf.pc.cs b/test/csharp-tableau-loader/tableau/PatchConf.pc.cs index 6290448b..3aeebc50 100644 --- a/test/csharp-tableau-loader/tableau/PatchConf.pc.cs +++ b/test/csharp-tableau-loader/tableau/PatchConf.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: patch_conf.proto // #nullable enable diff --git a/test/csharp-tableau-loader/tableau/TestConf.pc.cs b/test/csharp-tableau-loader/tableau/TestConf.pc.cs index 577bf334..8905584d 100644 --- a/test/csharp-tableau-loader/tableau/TestConf.pc.cs +++ b/test/csharp-tableau-loader/tableau/TestConf.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: test_conf.proto // #nullable enable diff --git a/test/csharp-tableau-loader/tableau/Util.pc.cs b/test/csharp-tableau-loader/tableau/Util.pc.cs index c907729d..09b7ae06 100644 --- a/test/csharp-tableau-loader/tableau/Util.pc.cs +++ b/test/csharp-tableau-loader/tableau/Util.pc.cs @@ -2,7 +2,7 @@ // Code generated by protoc-gen-csharp-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-csharp-tableau-loader v0.1.0 -// - protoc v3.19.3 +// - protoc (unknown) // #nullable enable using System; diff --git a/test/go-tableau-loader/buf.gen.yaml b/test/go-tableau-loader/buf.gen.yaml new file mode 100644 index 00000000..d1926bc5 --- /dev/null +++ b/test/go-tableau-loader/buf.gen.yaml @@ -0,0 +1,11 @@ +version: v2 +plugins: + - remote: buf.build/protocolbuffers/go:v1.34.2 + out: protoconf + opt: paths=source_relative + - local: ["go", "run", "../../cmd/protoc-gen-go-tableau-loader"] + out: protoconf/loader + opt: + - paths=source_relative + - pkg=loader + strategy: all \ No newline at end of file diff --git a/test/go-tableau-loader/gen.bat b/test/go-tableau-loader/gen.bat deleted file mode 100644 index 2520760e..00000000 --- a/test/go-tableau-loader/gen.bat +++ /dev/null @@ -1,71 +0,0 @@ -@echo off -setlocal -setlocal enabledelayedexpansion - -for /f "delims=" %%i in ('git rev-parse --show-toplevel') do set repoRoot=%%i -cd /d "%repoRoot%" - -REM Allow overriding protoc via environment variable. -REM Default to locally compiled protoc for local development; fallback to system protoc. -if not defined PROTOC ( - if exist "%repoRoot%\third_party\_submodules\protobuf\cmake\build\protoc.exe" ( - set "PROTOC=%repoRoot%\third_party\_submodules\protobuf\cmake\build\protoc.exe" - ) else ( - where protoc >nul 2>nul - if !errorlevel! equ 0 ( - for /f "delims=" %%p in ('where protoc') do set "PROTOC=%%p" - ) else ( - echo Error: protoc not found. Please build protobuf submodule or install protoc. >&2 - exit /b 1 - ) - ) -) -REM Allow overriding protobuf include path via environment variable. -REM Default to local submodule source; fallback to system include path. -if not defined PROTOBUF_PROTO ( - if exist "%repoRoot%\third_party\_submodules\protobuf\src\google\protobuf" ( - set "PROTOBUF_PROTO=%repoRoot%\third_party\_submodules\protobuf\src" - ) else ( - for /f "delims=" %%p in ('where protoc 2^>nul') do set "_PROTOC_DIR=%%~dpp" - if defined _PROTOC_DIR ( - set "PROTOBUF_PROTO=!_PROTOC_DIR!..\include" - ) else ( - set "PROTOBUF_PROTO=%repoRoot%\third_party\_submodules\protobuf\src" - ) - ) -) -set "TABLEAU_PROTO=%repoRoot%\third_party\_submodules\tableau\proto" -set "PLGUIN_DIR=%repoRoot%\cmd\protoc-gen-go-tableau-loader" -set "PROTOCONF_IN=%repoRoot%\test\proto" -set "PROTOCONF_OUT=%repoRoot%\test\go-tableau-loader\protoconf" -set "LOADER_OUT=%PROTOCONF_OUT%\loader" - -REM remove old generated files -rmdir /s /q "%PROTOCONF_OUT%" "%LOADER_OUT%" 2>nul -mkdir "%PROTOCONF_OUT%" "%LOADER_OUT%" - -REM build -pushd "%PLGUIN_DIR%" -go build -popd - -set "PATH=%PATH%;%PLGUIN_DIR%" - -set protoFiles= -pushd "%PROTOCONF_IN%" -for /R %%f in (*.proto) do ( - set protoFiles=!protoFiles! "%%f" -) -popd -"%PROTOC%" ^ ---go-tableau-loader_out="%LOADER_OUT%" ^ ---go-tableau-loader_opt=paths=source_relative,pkg=loader ^ ---go_out="%PROTOCONF_OUT%" ^ ---go_opt=paths=source_relative ^ ---proto_path="%PROTOBUF_PROTO%" ^ ---proto_path="%TABLEAU_PROTO%" ^ ---proto_path="%PROTOCONF_IN%" ^ -!protoFiles! - -endlocal -endlocal diff --git a/test/go-tableau-loader/gen.sh b/test/go-tableau-loader/gen.sh deleted file mode 100755 index 0c74e757..00000000 --- a/test/go-tableau-loader/gen.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -# set -eux -set -e -set -o pipefail - -cd "$(git rev-parse --show-toplevel)" - -# Allow overriding protoc via environment variable. -# Default to locally compiled protoc for local development; fallback to system protoc. -LOCAL_PROTOC="./third_party/_submodules/protobuf/cmake/build/protoc" -if [ -z "$PROTOC" ]; then - if [ -x "$LOCAL_PROTOC" ]; then - PROTOC="$LOCAL_PROTOC" - else - PROTOC="$(which protoc 2>/dev/null || true)" - fi -fi -if [ -z "$PROTOC" ]; then - echo "Error: protoc not found. Please build protobuf submodule or install protoc." >&2 - exit 1 -fi -# Allow overriding protobuf include path via environment variable. -# Default to local submodule source; fallback to system include path. -LOCAL_PROTOBUF_PROTO="./third_party/_submodules/protobuf/src" -if [ -z "$PROTOBUF_PROTO" ]; then - if [ -d "$LOCAL_PROTOBUF_PROTO/google/protobuf" ]; then - PROTOBUF_PROTO="$LOCAL_PROTOBUF_PROTO" - else - PROTOBUF_PROTO="$(pkg-config --variable=includedir protobuf 2>/dev/null || echo /usr/include)" - fi -fi -TABLEAU_PROTO="./third_party/_submodules/tableau/proto" -PLUGIN_DIR="./cmd/protoc-gen-go-tableau-loader" -PROTOCONF_IN="./test/proto" -PROTOCONF_OUT="./test/go-tableau-loader/protoconf" -LOADER_OUT="$PROTOCONF_OUT/loader" - -# remove old generated files -rm -rfv "$PROTOCONF_OUT" "$LOADER_OUT" -mkdir -p "$PROTOCONF_OUT" "$LOADER_OUT" - -# build -cd "${PLUGIN_DIR}" && go build && cd - - -export PATH="$(pwd)/${PLUGIN_DIR}:${PATH}" - -# Collect all .proto files (use `find` for cross-platform compatibility). -PROTO_FILES=$(find "$PROTOCONF_IN" -name "*.proto") - -${PROTOC} \ - --go-tableau-loader_out="$LOADER_OUT" \ - --go-tableau-loader_opt=paths=source_relative,pkg=loader \ - --go_out="$PROTOCONF_OUT" \ - --go_opt=paths=source_relative \ - --proto_path="$PROTOBUF_PROTO" \ - --proto_path="$TABLEAU_PROTO" \ - --proto_path="$PROTOCONF_IN" \ - $PROTO_FILES diff --git a/test/go-tableau-loader/protoconf/loader/hero_conf.pc.go b/test/go-tableau-loader/protoconf/loader/hero_conf.pc.go index a47a64cc..85d23cc6 100644 --- a/test/go-tableau-loader/protoconf/loader/hero_conf.pc.go +++ b/test/go-tableau-loader/protoconf/loader/hero_conf.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: hero_conf.proto package loader diff --git a/test/go-tableau-loader/protoconf/loader/hub.pc.go b/test/go-tableau-loader/protoconf/loader/hub.pc.go index 6af49131..435279d4 100644 --- a/test/go-tableau-loader/protoconf/loader/hub.pc.go +++ b/test/go-tableau-loader/protoconf/loader/hub.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) package loader diff --git a/test/go-tableau-loader/protoconf/loader/index_conf.pc.go b/test/go-tableau-loader/protoconf/loader/index_conf.pc.go index 6ec07e40..379b0c4b 100644 --- a/test/go-tableau-loader/protoconf/loader/index_conf.pc.go +++ b/test/go-tableau-loader/protoconf/loader/index_conf.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: index_conf.proto package loader diff --git a/test/go-tableau-loader/protoconf/loader/item_conf.pc.go b/test/go-tableau-loader/protoconf/loader/item_conf.pc.go index 86b117d5..563b8cd3 100644 --- a/test/go-tableau-loader/protoconf/loader/item_conf.pc.go +++ b/test/go-tableau-loader/protoconf/loader/item_conf.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: item_conf.proto package loader diff --git a/test/go-tableau-loader/protoconf/loader/messager.pc.go b/test/go-tableau-loader/protoconf/loader/messager.pc.go index 4675c1c1..60c5b980 100644 --- a/test/go-tableau-loader/protoconf/loader/messager.pc.go +++ b/test/go-tableau-loader/protoconf/loader/messager.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) package loader diff --git a/test/go-tableau-loader/protoconf/loader/messager_container.pc.go b/test/go-tableau-loader/protoconf/loader/messager_container.pc.go index a6e08fbe..96b08f30 100644 --- a/test/go-tableau-loader/protoconf/loader/messager_container.pc.go +++ b/test/go-tableau-loader/protoconf/loader/messager_container.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) package loader diff --git a/test/go-tableau-loader/protoconf/loader/patch_conf.pc.go b/test/go-tableau-loader/protoconf/loader/patch_conf.pc.go index e75f0106..31c8845c 100644 --- a/test/go-tableau-loader/protoconf/loader/patch_conf.pc.go +++ b/test/go-tableau-loader/protoconf/loader/patch_conf.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: patch_conf.proto package loader diff --git a/test/go-tableau-loader/protoconf/loader/test_conf.pc.go b/test/go-tableau-loader/protoconf/loader/test_conf.pc.go index f6e78a8f..466eb20d 100644 --- a/test/go-tableau-loader/protoconf/loader/test_conf.pc.go +++ b/test/go-tableau-loader/protoconf/loader/test_conf.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) // source: test_conf.proto package loader diff --git a/test/go-tableau-loader/protoconf/loader/util.pc.go b/test/go-tableau-loader/protoconf/loader/util.pc.go index 6bafc42b..11ea5d9d 100644 --- a/test/go-tableau-loader/protoconf/loader/util.pc.go +++ b/test/go-tableau-loader/protoconf/loader/util.pc.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-tableau-loader. DO NOT EDIT. // versions: // - protoc-gen-go-tableau-loader v0.11.0 -// - protoc v3.19.3 +// - protoc (unknown) package loader diff --git a/third_party/_submodules/tableau b/third_party/_submodules/tableau deleted file mode 160000 index 0d308e52..00000000 --- a/third_party/_submodules/tableau +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0d308e52f7ca68ae770d7da40598ef84c7136fb3