Skip to content

Update yaml-cpp and cxxopts to fix CodeQL builds on Ubuntu 26.04 - #2706

Merged
brondani merged 3 commits into
mainfrom
yaml-cpp-fix-codeql
Nov 16, 2026
Merged

brondani merged 3 commits into
mainfrom
yaml-cpp-fix-codeql

Conversation

@brondani

@brondani brondani commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes

  • Fix CodeQL's Build code for analysis failure after the ubuntu-latest runner migration reached this workflow on November 13, 2026.

The workflow selects ubuntu-latest. The successful November 10 run used Ubuntu 24.04.5 and GCC 13.3.0, whereas the latest failed run used Ubuntu 26.04.1 and GCC 15.2.0.

The newer toolchain exposed missing direct <cstdint> includes in two bundled dependencies:

  • yaml-cpp 0.8.0 fails in src/emitterutils.cpp because uint16_t is undeclared.
  • cxxopts fails in include/cxxopts.hpp because uint8_t is undeclared, preventing cbuildgen compilation and causing additional cascading errors.

In both cases, the compiler identifies <cstdint> as the missing header. These dependency build failures stop the workflow before CodeQL analysis can run; they are not CodeQL security findings or transient runner failures.

GitHub announced the staged migration in actions/runner-images#14748:

This change will be rolled out over a period of several weeks beginning October 19, 2026.
We plan to complete the migration by November 19, 2026.

Changes

  • Update yaml-cpp from 0.8.0 to the latest release, yaml-cpp-0.9.0, pinned to 56e3bb550c91fd7005566f19c079cb7a503223cf. This release already includes the required <cstdint> header.
  • Port the local patch while preserving duplicate-key rejection, the force-insert bypass, empty-null formatting, literal-string handling, and the ampersand adjustment.
  • Adapt literal-string prefix checks and ProjMgr's IsNullString calls to upstream's pointer-and-length APIs.
  • Add regression tests for the preserved YAML behavior, including length-bounded buffer writes.
  • Update cxxopts to v3.3.1, pinned to 44380e5a44706ab7347f400698c703eb2a196202. This release includes the missing-header fix for GCC 15.
  • Remove external/cxxopts.patch and its CMake application: the custom-help spacing fix is already upstream.
  • Replace cxxopts::OptionException with cxxopts::exceptions::exception in cbuildgen, projmgr, packgen, packchk, and svdconv.
  • Keep ubuntu-latest; address the dependency compatibility issue rather than pinning the workflow to the older runner image.

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Test Results

  5 files   39 suites   3m 34s ⏱️
185 tests 168 ✅ 17 💤 0 ❌
509 runs  458 ✅ 51 💤 0 ❌

Results for commit 4d2d18e.

♻️ This comment has been updated with latest results.

@brondani brondani changed the title Update yaml-cpp to 0.9.0 to fix CodeQL builds on Ubuntu 26.04 Update yaml-cpp and cxxopts to fix CodeQL builds on Ubuntu 26.04 Nov 13, 2026
@brondani
brondani marked this pull request as ready for review November 13, 2026 18:16
@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.57%. Comparing base (8abbe99) to head (4d2d18e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2706   +/-   ##
=======================================
  Coverage   87.57%   87.57%           
=======================================
  Files         208      208           
  Lines       33747    33748    +1     
=======================================
+ Hits        29553    29554    +1     
  Misses       4194     4194           
Flag Coverage Δ
buildmgr-cov 89.51% <100.00%> (ø)
ctrace-cov 100.00% <ø> (ø)
packchk-cov 80.38% <100.00%> (ø)
packgen-cov 88.66% <100.00%> (ø)
projmgr-cov 95.22% <100.00%> (+<0.01%) ⬆️
svdconv-cov 74.62% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
tools/buildmgr/cbuildgen/src/CbuildGen.cpp 90.09% <100.00%> (ø)
tools/packchk/src/ParseOptions.cpp 69.29% <100.00%> (ø)
tools/packgen/src/PackGen.cpp 88.66% <100.00%> (ø)
tools/projmgr/src/ProjMgr.cpp 93.70% <100.00%> (ø)
tools/projmgr/src/ProjMgrYamlParser.cpp 91.77% <100.00%> (+<0.01%) ⬆️
tools/svdconv/SVDConv/src/ParseOptions.cpp 79.31% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The omitted gitlink diffs and absent dependency sources prevent verification that both submodules pin the revisions required by the rebased YAML patch and new cxxopts exception API.

No open issues 🎉

What changed in this PR

Updates dependency integration to address CodeQL build failures with Ubuntu 26.04 and GCC 15, while retaining ubuntu-latest and preserving local YAML behavior.

Changes:

  • Adapts YAML handling and command-line exception catches to the updated dependency APIs.
  • Ports the yaml-cpp patch, adds regression tests, and removes the obsolete cxxopts patch.
  • Updates third-party version, revision, and usage notices.
File Description
tools/​svdconv/​SVDConv/​src/​ParseOptions.cpp Uses the updated cxxopts exception type.
tools/​projmgr/​src/​ProjMgrYamlParser.cpp Passes pointer and length to YAML null-string checks.
tools/​projmgr/​src/​ProjMgr.cpp Uses the updated cxxopts exception type.
tools/​packgen/​src/​PackGen.cpp Uses the updated cxxopts exception type.
tools/​packchk/​src/​ParseOptions.cpp Uses the updated cxxopts exception type.
tools/​ctrace/​docs/​THIRD_PARTY_NOTICES.md Updates dependency versions and pinned revisions.
tools/​buildmgr/​cbuildgen/​src/​CbuildGen.cpp Uses the updated cxxopts exception type.
LICENSE.md Updates dependency versions and usage listings.
libs/​ymltree/​test/​YmlTreeTest.cpp Adds regression coverage for patched YAML behavior and bounded writes.
external/​yaml-cpp.patch Ports local YAML customizations to the updated upstream APIs.
external/​cxxopts.patch Removes the help-spacing patch now included upstream.
CMakeLists.txt Stops applying the removed cxxopts patch.

Review effort: Balanced

@brondani
brondani merged commit 9f1bc24 into main Nov 16, 2026
124 checks passed
@brondani
brondani deleted the yaml-cpp-fix-codeql branch November 16, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants