Repository navigation
fix(obs): keep VERSION files off the include path - #4747
Conversation
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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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)
|
MERGE Reviewed head Turns off No blocking issues. The fix matches the failure mode: bootstrap sets Non-blocking
This is an automated review, not the maintainer's decision |
|
Status: merging. Merged the base in with #4748 (msvc-pkg-config), resolved the quest cross-links, and re-ran CI on 439acce.
(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
Completes quest/m1/cpp/obs-version-header.md.
Problem
OBS (macOS)andOBS (Windows)fail compilingcpp/moq/src/moq.cpp(run 36499239784):cpp/obs/cmake/common/bootstrap.cmake(the vendored obs-plugintemplate) setsCMAKE_INCLUDE_CURRENT_DIRglobally, socpp/moq(viaadd_subdirectory) andcpp/obsland on the include path. On a case-insensitive filesystem theirVERSIONfiles answer#include <version>.cpp/obs/VERSION(added in #4281) would break the plugin target the same way oncemoq-cppcompiled.Fix
Turn
CMAKE_INCLUDE_CURRENT_DIRoff incpp/obs/CMakeLists.txtright after the bootstrap. Every plugin include is a same-directory quoted include, which resolves relative to the including file;plugin-supportalready 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 generatedmoq.hpp,moq.cpp, andmoq_scaffolding.hppend without a newline, and the OBS template builds with-Wnewline-eofas 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'spkg-config, tracked byquest/m1/cpp/msvc-pkg-config.md.API / wire impact
None. Build-system only.
🤖 Generated with Claude Code