Skip to content

fix(obs): keep VERSION files off the include path - #4747

Merged
kixelated merged 4 commits into
quest/m1/cpp/READMEfrom
quest/m1/cpp/obs-version-header
Oct 3, 2026
Merged

kixelated merged 4 commits into
quest/m1/cpp/READMEfrom
quest/m1/cpp/obs-version-header

Conversation

@kixelated

@kixelated kixelated commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Completes quest/m1/cpp/obs-version-header.md.

Problem

OBS (macOS) and OBS (Windows) fail compiling cpp/moq/src/moq.cpp (run 36499239784):

cpp/moq/version:1:1: error: expected unqualified-id          (macOS, via <limits>)
D:\a\moq\moq\cpp\moq\version(1,1): error C2059: syntax error  (MSVC)

cpp/obs/cmake/common/bootstrap.cmake (the vendored obs-plugintemplate) sets CMAKE_INCLUDE_CURRENT_DIR globally, so cpp/moq (via add_subdirectory) and cpp/obs land on the include path. On a case-insensitive filesystem their VERSION files answer #include <version>. cpp/obs/VERSION (added in #4281) would break the plugin target the same way once moq-cpp compiled.

Fix

Turn CMAKE_INCLUDE_CURRENT_DIR off in cpp/obs/CMakeLists.txt right after the bootstrap. Every plugin include is a same-directory quoted include, which resolves relative to the including file; plugin-support already sets its own include directory, and Qt's autogen directory is added by CMake regardless. The vendored template file stays untouched, and no file is renamed.

Deletes the quest and its references.

Result

  • OBS (Windows) passes (run 37099184547); OBS (Linux) still passes.
  • OBS (macOS) is past the <version> error and now hits a second, previously masked failure: the generated moq.hpp, moq.cpp, and moq_scaffolding.hpp end without a newline, and the OBS template builds with -Wnewline-eof as an error. That is a uniffi-bindgen-cpp bug (Askama drops each template's final newline), tracked as the new quest quest/m1/cpp/generated-newline.md, which needs a fork release.
  • C++ (MSVC) still fails on Strawberry Perl's pkg-config, tracked by quest/m1/cpp/msvc-pkg-config.md.

API / wire impact

None. Build-system only.

🤖 Generated with Claude Code

kixelated and others added 2 commits October 2, 2026 22:01
The OBS plugin template sets CMAKE_INCLUDE_CURRENT_DIR for every
directory, so cpp/obs and the add_subdirectory'd cpp/moq land on the
include path. On case-insensitive filesystems (macOS, Windows) their
VERSION files then answer the standard library's #include <version>,
failing the OBS (macOS) and OBS (Windows) jobs. Every plugin include is
a same-directory quoted one, so turn the flag off after the bootstrap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review October 3, 2026 05:14

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI)

Reviewed commit ff74c01.

No actionable bugs found. Disabling CMAKE_INCLUDE_CURRENT_DIR immediately after bootstrap (cpp/obs/CMakeLists.txt:28-32) is a small, appropriate fix for the VERSION/ collision in both the plugin and its in-tree moq-cpp child. The C++ library keeps its explicit public/generated include directories; the inspected plugin headers use same-directory quoted includes. Qt adds its autogen include directory independently, so renaming VERSION files or modifying the vendored bootstrap would add unnecessary churn. No API or wire change.

Verification limits: source/configuration review and CMake documentation only; I did not build OBS on macOS or Windows or run tests. OBS, Platform, and Check workflows are still in progress, so this does not establish platform-build success.

(Written by OpenAI)

With <version> no longer shadowed, OBS (macOS) reaches the compile and
fails on -Wnewline-eof: uniffi-bindgen-cpp output ends mid-line. The fix
is in the generator fork and needs a fork release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI)

Reviewed a8cff1c against previously reviewed ff74c01. The delta adds the generated-newline plan and its references; build code is unchanged.

No actionable bugs found in this update. The direction in quest/m1/cpp/generated-newline.md:12-21 is appropriate: terminate the generator's three rendered outputs, add a Clang regression check, then update the dependency pins. That addresses every consumer without weakening OBS warning flags.

I independently checked the earlier commit's CI: OBS (Windows) passed, while the macOS log reports missing final newlines in moq_scaffolding.hpp, moq.hpp and moq.cpp, matching the new quest (job). The generator still writes those rendered strings directly. This follow-up accurately records an outstanding build blocker; it does not implement the generator fix. No local builds/tests run, and this is not a claim that the new head or all platform checks pass.

(Written by OpenAI)

@kixelated

Copy link
Copy Markdown
Collaborator Author

MERGE

Reviewed head a8cff1c38a518a7e8847a7822abaa381520be7bc.

Turns off CMAKE_INCLUDE_CURRENT_DIR right after the vendored OBS bootstrap so cpp/obs and the in-tree cpp/moq subdirectory no longer sit on the include path. On case-insensitive filesystems that stops their VERSION files answering #include <version> (the OBS (macOS) / OBS (Windows) failure from run 36499239784). Completes and deletes quest/m1/cpp/obs-version-header.md, and opens generated-newline.md for the next compile failure (-Wnewline-eof on uniffi-bindgen-cpp output).

No blocking issues. The fix matches the failure mode: bootstrap sets CMAKE_INCLUDE_CURRENT_DIR TRUE, nothing later re-enables it, plugin sources use same-directory quoted includes, plugin-support already publishes src/ via target_include_directories, and moq-cpp uses its own explicit include dirs (no reliance on current-dir). Broader than “subdirectory only” from the quest plan, but correctly also covers cpp/obs/VERSION.

Non-blocking

  1. CI still queued on this head. OBS (macOS)/(Windows) have not yet confirmed green after the flag flip; the next known red is the documented newline-eof quest, so this PR can land while OBS is still red until that fork release.

  2. generated-newline.md pin. Plan asks for v0.11.0-kixelated.3+v0.32.2; fork currently tops out at .2 — expected, and correctly notes the release needs the maintainer.

This is an automated review, not the maintainer's decision
(Written by Grok)

@kixelated

kixelated commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

Status: merging. Merged the base in with #4748 (msvc-pkg-config), resolved the quest cross-links, and re-ran CI on 439acce.

  • OBS (Windows), C++ (MSVC), OBS (Linux), Check, Test, macOS and Windows all pass.
  • OBS (macOS) is the only red job. It's past the <version> error and fails only on -Wnewline-eof in the generated moq_scaffolding.hpp, moq.hpp and moq.cpp (job). This also fails on the base. quest/m1/cpp/generated-newline.md tracks it: the fix is in the generator fork (append "\n" to the three fs::write calls in bindgen/src/bindings/cpp/mod.rs, checked locally with clang). It needs a fork tag v0.11.0-kixelated.3+v0.32.2 from the maintainer, then the pins bumped here.

(Written by Claude Opus 5.5)

…m1/cpp/obs-version-header

# Conflicts:
#	quest/m1/cpp/README.md
#	quest/m1/cpp/msvc-pkg-config.md
#	quest/m1/cpp/obs-version-header.md
@kixelated
kixelated merged commit 4e48e0e into quest/m1/cpp/README Oct 3, 2026
8 of 9 checks passed
@kixelated
kixelated deleted the quest/m1/cpp/obs-version-header branch October 3, 2026 06:31
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.

1 participant