Skip to content
Open
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
32 changes: 25 additions & 7 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,35 @@
# Ignore build artifacts and large directories
out/
cmake-build-*/
build/
log.txt
designs/
new_designs/

# Ignore IDE files
.vs/
.github/
.idea/

# Ignore Git-related files
.git/
.gitignore
.gitattributes
Dockerfile*

# Ignore GitHub-related files
.github/

# Ignore Docker-related files (except Dockerfile itself)
docker-compose.yml
*.code-workspace

# Ignore vcpkg artifacts
vcpkg_installed/

# Ignore SSL certificates
ssl/
out/
cmake-build-*/
build/
.idea/

# Ignore testing artifacts
Testing/
*.code-workspace

# Ignore other Docker files
Dockerfile*
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

/.vs
/out
/compile_commands.json
/cmake-build-debug
build/
/vcpkg_installed
Expand Down Expand Up @@ -48,3 +49,7 @@ gpg_keys/
#Ignore insiders AI rules
.github\instructions\codacy.instructions.md
/new_designs/
.cursor/hooks/state/continual-learning.json
.cursor/hooks/state/continual-learning-index.json
.qwen/settings.json
.qwen/settings.json.orig
39 changes: 39 additions & 0 deletions .zed/debug.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Project-local debug tasks
//
// For more documentation on how to configure debug tasks,
// see: https://zed.dev/docs/debugger
[
{
"label": "Debug OdbDesignServer",
"build": {
"command": "cmake",
"args": ["--build", "--preset", "linux-debug"],
"cwd": "$ZED_WORKTREE_ROOT",
},

Check failure on line 12 in .zed/debug.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.zed/debug.json#L12

Unexpected character ('}' (code 125)): was expecting double-quote to start field name
"program": "$ZED_WORKTREE_ROOT/out/build/linux-debug/OdbDesignServer/OdbDesignServer",
"request": "launch",
"adapter": "CodeLLDB",
},
{
"label": "Debug OdbDesignApp",
"build": {
"command": "cmake",
"args": ["--build", "--preset", "linux-debug"],
"cwd": "$ZED_WORKTREE_ROOT",
},
"program": "$ZED_WORKTREE_ROOT/out/build/linux-debug/OdbDesignApp/OdbDesignApp",
"request": "launch",
"adapter": "CodeLLDB",
},
{
"label": "Debug OdbDesignTests",
"build": {
"command": "cmake",
"args": ["--build", "--preset", "linux-debug"],
"cwd": "$ZED_WORKTREE_ROOT",
},
"program": "$ZED_WORKTREE_ROOT/out/build/linux-debug/OdbDesignTests/OdbDesignTests",
"request": "launch",
"adapter": "CodeLLDB",
},
]
213 changes: 213 additions & 0 deletions .zed/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
[
// ── Configure ──────────────────────────────────────────────────────────
{
"label": "CMake: Configure (Linux Debug)",
"command": "cmake --preset linux-debug",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "on_success",
},

Check failure on line 11 in .zed/tasks.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.zed/tasks.json#L11

Unexpected character ('}' (code 125)): was expecting double-quote to start field name
{
"label": "CMake: Configure (Linux Release)",
"command": "cmake --preset linux-release",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "on_success",
},
{
"label": "CMake: Configure (Linux Dynamic Debug)",
"command": "cmake --preset linux-dynamic-debug",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "on_success",
},
{
"label": "CMake: Configure (Linux Dynamic Release)",
"command": "cmake --preset linux-dynamic-release",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "on_success",
},

// ── Build ───────────────────────────────────────────────────────────────
{
"label": "CMake: Build (Linux Debug)",
"command": "cmake --build --preset linux-debug",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "on_success",
},
{
"label": "CMake: Build (Linux Release)",
"command": "cmake --build --preset linux-release",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "on_success",
},
{
"label": "CMake: Build (Linux Dynamic Debug)",
"command": "cmake --build --preset linux-dynamic-debug",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "on_success",
},
{
"label": "CMake: Build (Linux Dynamic Release)",
"command": "cmake --build --preset linux-dynamic-release",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "on_success",
},

// ── Test ─────────────────────────────────────────────────────────────────
{
"label": "CMake: Test (Linux Debug)",
"command": "ctest --preset linux-debug --output-on-failure",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "never",
},
{
"label": "CMake: Test (Linux Release)",
"command": "ctest --preset linux-release --output-on-failure",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "never",
},
{
"label": "CMake: Test (Linux Dynamic Debug)",
"command": "ctest --preset linux-dynamic-debug --output-on-failure",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "never",
},
{
"label": "CMake: Test (Linux Dynamic Release)",
"command": "ctest --preset linux-dynamic-release --output-on-failure",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "never",
},

// ── Clean ────────────────────────────────────────────────────────────────
{
"label": "CMake: Clean Build (Linux Debug)",
"command": "cmake --build --preset linux-debug --target clean",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "on_success",
},
{
"label": "CMake: Clean Build (Linux Release)",
"command": "cmake --build --preset linux-release --target clean",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "on_success",
},

// ── Full pipeline: Configure + Build ─────────────────────────────────────
{
"label": "CMake: Configure & Build (Linux Debug)",
"command": "cmake --preset linux-debug && cmake --build --preset linux-debug",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "on_success",
},
{
"label": "CMake: Configure & Build (Linux Release)",
"command": "cmake --preset linux-release && cmake --build --preset linux-release",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "on_success",
},

// ── Full pipeline: Build + Test ──────────────────────────────────────────
{
"label": "CMake: Build & Test (Linux Debug)",
"command": "cmake --build --preset linux-debug && ctest --preset linux-debug --output-on-failure",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "never",
},
{
"label": "CMake: Build & Test (Linux Release)",
"command": "cmake --build --preset linux-release && ctest --preset linux-release --output-on-failure",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "never",
},

// ── Run (start without debugging) ────────────────────────────────────────
{
"label": "Run: OdbDesignServer (Debug)",
"command": "$ZED_WORKTREE_ROOT/out/build/linux-debug/OdbDesignServer/OdbDesignServer",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": true,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "never",
},
{
"label": "Run: OdbDesignApp (Debug)",
"command": "$ZED_WORKTREE_ROOT/out/build/linux-debug/OdbDesignApp/OdbDesignApp",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": true,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "never",
},
{
"label": "Run: OdbDesignServer (Release)",
"command": "$ZED_WORKTREE_ROOT/out/build/linux-release/OdbDesignServer/OdbDesignServer",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": true,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "never",
},
{
"label": "Run: OdbDesignApp (Release)",
"command": "$ZED_WORKTREE_ROOT/out/build/linux-release/OdbDesignApp/OdbDesignApp",
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": true,
"allow_concurrent_runs": false,
"reveal": "always",
"hide": "never",
},
]
17 changes: 17 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,20 @@ See `.github/copilot-instructions.md` for:
- Tool and automation protocols
- Dynamic workflow orchestration
- URL translation for raw GitHub content

---

## Learned User Preferences

- Keep OdbDesign local test env vars in `~/.bashrc` (`ODB_TEST_DATA_DIR`, `ODB_TEST_ENVIRONMENT_VARIABLE`) for routine `ctest` runs on this machine.
- Revert incompatible vcpkg baseline bumps (rather than carrying overlay patches) when `grpc` is pinned and the new baseline breaks the build.

## Learned Workspace Facts

- Release-only SIGABRT on `GET /filemodels/<design>/matrix/matrix` comes from dual static protobuf descriptor pools in `libOdbDesign.so` and `OdbDesignServer`; use `linux-dynamic-debug` / `linux-dynamic-release` presets (`VCPKG_TARGET_TRIPLET=x64-linux-dynamic`) for a single shared protobuf runtime.
- Target `grpc` in `vcpkg.json` must include feature `codegen` so fresh triplet installs export `gRPC::grpc++_reflection` (host-only codegen is insufficient).
- Keep vcpkg baseline at `d1ff36c6520ee43f1a656c03cd6425c2974a449e` while `grpc` is pinned to `1.71.0#3`; baseline `059d760472984042e1b4db0d40efd935a1adcbc9` pulls newer Abseil and breaks gRPC compile (`glob.cc`: `std::any_of`).
- Local test fixtures live in sibling repo `OdbDesignTestData`: set `ODB_TEST_DATA_DIR=/home/nam20485/src/github/nam20485/OdbDesignTestData/TEST_DATA`; design `.tgz` archives at `TEST_DATA/` root, small file-reader fixtures under `TEST_DATA/FILES/`.
- Also set `ODB_TEST_ENVIRONMENT_VARIABLE=ODB_TEST_ENVIRONMENT_VARIABLE_EXISTS` for CrossPlatform env tests; these vars are not baked into CMake presets.
- `OdbDesignServer` loads designs via `--designs-dir`, not `ODB_TEST_DATA_DIR`.
- `CommandLineArgs` treats tokens starting with `/` as flags, so absolute paths after `--designs-dir` parse as boolean `true`; use relative paths (e.g. from `/home/nam20485/src/github/nam20485`: `OdbDesignTestData/TEST_DATA`).
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
# See: https://docs.sonarsource.com/sonarqube-for-ide/vs-code/getting-started/running-an-analysis/#generate-a-compilation-database
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# symlink compile_commands.json to project root so IDEs (clangd, Zed, VS Code)
# can find it without manual configuration
if(EXISTS "${CMAKE_BINARY_DIR}/compile_commands.json")
file(CREATE_LINK
"${CMAKE_BINARY_DIR}/compile_commands.json"
"${CMAKE_SOURCE_DIR}/compile_commands.json"
SYMBOLIC COPY_ON_ERROR
)
endif()

# only use ccache locally, i.e. not in CI
# nm, looks like we re-en-disabled it. Apparently it can speed up CI builds too. (Not sure how since its first one-off single build everytime, but maybe it can cache within a single build run)
#if (NOT DEFINED ENV{CI})
Expand Down
Loading
Loading