The official config loader for Tableau.
TODO: devcontainer
- C++ standard: at least C++17
- Prepare and init:
- macOS or Linux:
bash init.sh - Windows:
- Run
prepare.batas Administrator to automatically install all build dependencies (Chocolatey, CMake, Ninja, MSVC build tools, and buf), configurePATH, and initialize the MSVC compiler environment:.\prepare.bat
⚠️ Admin required: This script uses Chocolatey and MSI installers that write to system-protected directories (C:\ProgramData,C:\Program Files). Right-click Command Prompt → Run as administrator, then execute the script.Preview what the script would do without making any changes:
.\prepare.bat --dry-run
- Run
init.batto initialize submodules and build protobuf:.\init.bat
Note: The installation part of
prepare.batonly runs once per machine — it detects already-installed tools (Chocolatey, Ninja, CMake, MSVC Build Tools, buf) and skips them, so no manual installation is required.However, the MSVC compiler environment (
cl.exeonPATH, plusINCLUDE/LIB/LIBPATH/WindowsSdkDir/VCToolsInstallDir) is exported to the current cmd session only —vcvarsall.batdoes not (and should not) write these into the persistent userPATH. You therefore need to re-run.\prepare.batin every new cmd window before invokinginit.bator building the loader. Subsequent runs are near-instant since no installation work is repeated. - Run
- macOS or Linux:
Fast path (idempotent re-runs): Building protobuf takes 5–15 minutes. To make repeated runs cheap, both
init.shandinit.batshort-circuit and exit immediately whenthird_party/_submodules/protobuf/.build/_installalready contains a validprotobuf-config.cmake(the marker that the previous build finished). This means:
- Re-running
init.sh/init.batafter a successful first run is a no-op (a second or two).- CI workflows cache
.build/_install(see.github/workflows/testing-cpp.yml) and the fast path then turns the "build protobuf" step into a near-instant cache restore.- To force a clean rebuild (e.g. after changing protobuf flags or switching
PROTOBUF_REFto a version whose previously-installed artefacts are still around), setFORCE_REBUILD_PROTOBUF=1:FORCE_REBUILD_PROTOBUF=1 bash init.sh # macOS / LinuxOr simply deleteset FORCE_REBUILD_PROTOBUF=1 && .\init.bat :: Windows (cmd)third_party/_submodules/protobuf/.build/before rerunning.
- Chocolatey
- CMake 3.31.8
- Ninja
- Visual Studio 2022
- Use the Microsoft C++ Build Tools from the command line
- buf CLI
- Change dir:
cd test/cpp-tableau-loader - Generate protoconf:
PATH=../../third_party/_submodules/protobuf/.build/_install/bin:$PATH buf generate .. - CMake:
- C++17:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug - C++20:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=20 - clang:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=clang++
- C++17:
- Build:
cmake --build build --parallel - Test:
ctest --test-dir build --output-on-failure
Important: CMake with Ninja requires MSVC environment variables (
cl.exe,INCLUDE,LIB, etc.) to be active. Run.\prepare.batfrom the loader root in the same cmd session (use cmd, not PowerShell —prepare.batexports vars viaendlocal & set ...which only works for a cmd parent process) before switching to the test directory. Opening a new terminal window will lose these variables.Build type: The protobuf submodule is built as Debug (
/MTd) byinit.bat. To avoid LNK2038_ITERATOR_DEBUG_LEVEL/RuntimeLibraryCRT-mismatch errors, the loader must also be built as Debug.CMakeLists.txtdoes not set a default, so always pass-DCMAKE_BUILD_TYPE=Debugexplicitly — also required for multi-config generators (Visual Studio default = Debug, but stay explicit to match the cached protobuf).
- 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:
- cmd:
cmd /C "set PATH=..\..\third_party\_submodules\protobuf\.build\_install\bin;%PATH% && buf generate .." - PowerShell:
$env:PATH = "..\..\third_party\_submodules\protobuf\.build\_install\bin;" + $env:PATH; buf generate ..
- cmd:
- CMake:
- C++17:
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug - C++20:
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=20
- C++17:
- Build:
cmake --build build --parallel - Test:
ctest --test-dir build --output-on-failure
Note: Tests are written with GoogleTest, pulled in via CMake
FetchContent(no manual installation needed).
- Install: go1.24 or above
- Change dir:
cd test/go-tableau-loader - Generate protoconf:
buf generate .. - Test:
go test ./...
- Unity 2022.3 LTS (C# 9)
- dotnet-sdk-8.0
- Install: dotnet-sdk-8.0
- Change dir:
cd test/csharp-tableau-loader - Generate protoconf:
- macOS / Linux:
PATH=../../third_party/_submodules/protobuf/.build/_install/bin:$PATH buf generate .. - Windows (cmd):
cmd /C "set PATH=..\..\third_party\_submodules\protobuf\.build\_install\bin;%PATH% && buf generate .." - Windows (PowerShell):
$env:PATH = "..\..\third_party\_submodules\protobuf\.build\_install\bin;" + $env:PATH; buf generate ..
- macOS / Linux:
- Test:
dotnet test
Note: Tests are written with xUnit.
- nodejs v16.0.0
- protobufjs v7.2.3
- Change dir:
cd test/ts-tableau-loader - Install depedencies:
npm install - Generate protoconf:
npm run generate - Test:
npm run test
Problems in protobufjs:
- Unable to use Google well known types
- google.protobuf.Timestamp deserialization incompatible with canonical JSON representation
- Implement wrapper for google.protobuf.Timestamp, and correctly generate wrappers for static target.
If using reflection (.proto or JSON) but not static code, and for well-known types support, then proto3-json-serializer is a good option. This library implements proto3 JSON serialization and deserialization for
protobuf.js protobuf objects
according to the spec.