Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.25 KB

File metadata and controls

51 lines (37 loc) · 1.25 KB

OpenCode Agent Guide

Common Issues and Fixes

CMake Config Warnings

CMake feature detection tests fail on Linux for Windows-specific types. These are warnings, not errors.

Fix: Add || true to prevent workflow failure:

- name: configure build
  run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release 2>&1 | tee cmake_config.log || true

Build Error Detection

Don't flag CMake config warnings as build failures. Only catch actual compilation errors:

if echo "$BUILD_LOG" | grep -qE "error:.*\.(cpp|c|h|cc|cxx):[0-9]+:"; then
  BUILD_STATUS="Failed"
fi

Locked Issue/PR Error

When commenting on issues/PRs, check if locked. For workflows that handle both issues and PRs:

const item = context.payload.issue || context.payload.pull_request;
if (!item?.locked) {
  await github.rest.issues.createComment({...});
}

Tracking Workflow

Use repository variable TRACKING_ISSUE_NUMBER instead of hardcoding:

const trackingIssueNumber = '${{ vars.TRACKING_ISSUE_NUMBER }}';
if (!trackingIssueNumber) return;

GitHub Variables vs Env

Use vars. not env. for repository variables:

if: vars.TRACKING_ISSUE_NUMBER != ''

Package Names

  • Use libattr1-dev not libxattr-dev on Ubuntu