diff --git a/cpp/obs/CMakeLists.txt b/cpp/obs/CMakeLists.txt index ad250c05f66..0fefebd895c 100644 --- a/cpp/obs/CMakeLists.txt +++ b/cpp/obs/CMakeLists.txt @@ -26,6 +26,10 @@ else() endif() include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/common/bootstrap.cmake" NO_POLICY_SCOPE) +# The template turns this on for every directory, which puts cpp/obs and cpp/moq on the +# include path; on case-insensitive filesystems their VERSION files then answer +# `#include `. Every plugin include is a same-directory quoted one, so nothing needs it. +set(CMAKE_INCLUDE_CURRENT_DIR FALSE) project(${_name} VERSION ${_version}) diff --git a/quest/m1/cpp/README.md b/quest/m1/cpp/README.md index faaa895b06c..1abd4fa9f98 100644 --- a/quest/m1/cpp/README.md +++ b/quest/m1/cpp/README.md @@ -66,7 +66,7 @@ Confirmed in [#4100](https://github.com/moq-dev/moq/pull/4100): ## Required -- [OBS builds on case-insensitive filesystems](/quest/m1/cpp/obs-version-header.md) - `cpp/moq/VERSION` stops shadowing ``, so the macOS and Windows OBS jobs build again +- [Generated bindings end with a newline](/quest/m1/cpp/generated-newline.md) - uniffi-bindgen-cpp stops tripping `-Wnewline-eof`, so the macOS OBS job builds again - [Client settings parity](/quest/m1/cpp/client-config.md) - moq-ffi offers libmoq's client knobs, and the OBS advanced settings get back the ones the migration dropped - [Session report parity](/quest/m1/cpp/session-report.md) - a session reports its negotiated draft and reconnect failures, so the OBS dock shows them again - [Catalog switch](/quest/m1/cpp/catalog-switch.md) - a catalog update keeps OBS playback running until the replacement track is decoding diff --git a/quest/m1/cpp/generated-newline.md b/quest/m1/cpp/generated-newline.md new file mode 100644 index 00000000000..c4d7a4d6ca7 --- /dev/null +++ b/quest/m1/cpp/generated-newline.md @@ -0,0 +1,29 @@ +# [S] Generated bindings end with a newline + +## Goal + +`OBS (macOS)` in `platform.yml` builds the plugin against the in-tree +`cpp/moq`. Today it fails with `no newline at end of file +[-Werror,-Wnewline-eof]` on the rendered `moq.hpp`, `moq.cpp`, and +`moq_scaffolding.hpp`. + +## Plan + +Askama drops each template's final newline, so uniffi-bindgen-cpp writes +files that end mid-line. The OBS template builds with `-Wnewline-eof` and +warnings as errors, and any consumer compiling the published `moq.cpp` with +the same flags hits it too, so fix the generator, not the OBS flags. + +In the fork (`kixelated/uniffi-bindgen-cpp`, branch `kixelated/uniffi-0.32`), +append `"\n"` to the three `fs::write` calls in +`bindgen/src/bindings/cpp/mod.rs`, and build `cpp-tests` with +`-Werror=newline-eof` on clang as the regression check. Tag +`v0.11.0-kixelated.3+v0.32.2` and bump every pin site (grep the old tag; +`flake.nix` also needs its hashes), as #4292 did. + +The fork release needs the maintainer: an unattended agent was refused +permission to cut it. + +## Related + +- [C++ through moq-ffi](/quest/m1/cpp/README.md) - the line this blocks diff --git a/quest/m1/cpp/obs-version-header.md b/quest/m1/cpp/obs-version-header.md deleted file mode 100644 index 0183f1cdece..00000000000 --- a/quest/m1/cpp/obs-version-header.md +++ /dev/null @@ -1,24 +0,0 @@ -# [XS] OBS builds on case-insensitive filesystems - -## Goal - -The `OBS (macOS)` and `OBS (Windows)` jobs in `platform.yml` build the plugin -against the in-tree `cpp/moq` again. The line's CI is green before it lands. - -## Plan - -Both jobs fail compiling `cpp/moq/src/moq.cpp` with errors pointing at -`cpp/moq/version` line 1. `cpp/obs/cmake/common/bootstrap.cmake` sets -`CMAKE_INCLUDE_CURRENT_DIR` globally, so the `add_subdirectory` of `cpp/moq` -puts its source directory on the include path. On a case-insensitive -filesystem `cpp/moq/VERSION` then answers the standard library's -`#include `. - -Fix it at the source rather than renaming the file: keep the source -directory off `moq-cpp`'s include path (unset `CMAKE_INCLUDE_CURRENT_DIR` for -the subdirectory, or scope it to the plugin target). `cpp/obs/VERSION` has -the same shape if the plugin's own directory is ever on a C++ include path. - -## Related - -- [C++ through moq-ffi](/quest/m1/cpp/README.md) - the line this blocks