diff --git a/py/moq-rs/docs/conf.py b/py/moq-rs/docs/conf.py index c19f8f36bad..9f221cd32eb 100644 --- a/py/moq-rs/docs/conf.py +++ b/py/moq-rs/docs/conf.py @@ -44,6 +44,9 @@ suppress_warnings = ["autodoc.mocked_object"] autosummary_generate = True +# The `moq.media.catalog` and `moq.media.Catalog` stubs collide on +# case-insensitive filesystems (macOS), so the function's stub gets its own name. +autosummary_filename_map = {"moq.media.catalog": "moq.media.catalog-function"} autodoc_typehints = "description" autodoc_member_order = "bysource" napoleon_google_docstring = True diff --git a/quest/m0/macos-check.md b/quest/m0/macos-check.md deleted file mode 100644 index 4e54a219342..00000000000 --- a/quest/m0/macos-check.md +++ /dev/null @@ -1,42 +0,0 @@ -# [S] just check passes on macOS - -## Goal - -`just check` on a clean `main` checkout passes on a macOS host inside the Nix -dev shell, as it already does on Linux. -[moq-dev/moq#8426](https://github.com/moq-dev/moq/pull/8426) fixed the -failures in scripts, tests, and Linux-only crate docs; two remain, both seen -on the maintainer's aarch64-darwin host on 2026-11-10 with -`quest gate nix develop --command just check` selecting the whole tree: - -- `check cpp`: the build stops at - `clang++: error: -Wl,-lintl: 'linker' input unused [-Werror,-Wunused-command-line-argument]`, - after the `probe` builds pass, in a CMake build under - `cpp/moq/build/test-*` whose compiler is the mbx `clang++` shim. -- `check py`: Sphinx, which treats warnings as errors, stops with - `py/moq-rs/docs/index.md:147: WARNING: autosummary: stub file not found 'moq.media.catalog'. Check your autosummary_generate setting.` - -Non-goal: a macOS runner on the PR gate (rejected in -[macos.md](/quest/m0/nightly/macos.md)). - -## Plan - -Planned 2026-11-09 (maintainer, /quest-complete follow-up of #8392 and #8394). -Milestone: ✅ m0 (rejected: a later milestone). Narrowed 2026-11-10 -(maintainer): ✅ land #8426 and keep this quest for what remains (rejected: -widen #8426 again). - -Causes are not yet diagnosed: - -- `check cpp`: `-lintl` is gettext's library, which the Nix darwin stdenv - adds to link flags; it likely reaches a compile-only clang++ step through - `NIX_LDFLAGS` or the CMake flags `cpp/` passes. Find which step gets it and - keep link flags off compile steps rather than dropping `-Werror`. -- `check py`: check whether `moq.media.catalog` exists in the built module on - macOS (a cfg-gated or feature-gated binding would explain a missing stub), - then align the docs index with what the module exports there. - -Verify on a macOS host (a maintainer machine or a manual Platform dispatch), -and on Linux. - -Public API: none. Wire: none. diff --git a/rs/moq-audio/src/capture.rs b/rs/moq-audio/src/capture.rs index 4c619ed2b32..5a0a541c9e2 100644 --- a/rs/moq-audio/src/capture.rs +++ b/rs/moq-audio/src/capture.rs @@ -180,7 +180,7 @@ fn opening_error(error: cpal::Error, device: &str, layout: Layout) -> Error { /// /// Backends stay private behind the shared capture producer. #[cfg_attr( - test, + all(test, not(target_os = "macos")), expect( clippy::large_enum_variant, reason = "a synthetic stream has no device allocation; one enum per capture" diff --git a/rs/moq-bench/src/host.rs b/rs/moq-bench/src/host.rs index 5904e0e1362..f9df98871f9 100644 --- a/rs/moq-bench/src/host.rs +++ b/rs/moq-bench/src/host.rs @@ -38,10 +38,6 @@ impl std::str::FromStr for PositiveDuration { /// Sample CPU, memory, context-switch and UDP socket counters for a running process. #[derive(usage_rs::Args, Clone, Debug)] #[usage(unknown_flags = "error", args_override_self = false)] -#[cfg_attr( - not(target_os = "linux"), - expect(dead_code, reason = "only the Linux sampler reads the arguments") -)] pub struct Args { /// Sample these PIDs. When set, --name is ignored. #[usage(long)] diff --git a/rs/moq-c/src/video.rs b/rs/moq-c/src/video.rs index 22ac6c9c984..3634e5ddbfe 100644 --- a/rs/moq-c/src/video.rs +++ b/rs/moq-c/src/video.rs @@ -1466,8 +1466,11 @@ mod tests { .with_catalog(moq_mux::catalog::hang::Catalog::::default()); let catalog = moq_mux::catalog::Producer::new(&mut broadcast, config).unwrap(); let consumer = broadcast.consume(); - // Probed rather than hand-built, so the test track carries what a real one would. - let encode = moq_video::encode::Config::new(320, 240, moq_video::FrameRate::new(30, 1).unwrap()); + // Probed rather than hand-built, so the test track carries what a real one would. Software, + // like the encoders the tests open: a hardware default (VideoToolbox on macOS) declares + // another profile, so the first software frame would already move to a new track. + let mut encode = moq_video::encode::Config::new(320, 240, moq_video::FrameRate::new(30, 1).unwrap()); + encode.kind = moq_video::encode::Kind::Software; let rendition = encode.probe().await.unwrap(); let reserved = catalog.reserve().with_interval(encode.effective_join()); let track = broadcast diff --git a/sh/cpp/check.sh b/sh/cpp/check.sh index 50393f27573..9daf6e1e10b 100755 --- a/sh/cpp/check.sh +++ b/sh/cpp/check.sh @@ -94,13 +94,15 @@ if [[ "$(uname -s)" == MINGW* || "$(uname -s)" == MSYS* ]]; then exit 0 fi -# The samples in doc/lib/cpp compile against the installed headers. +# The samples in doc/lib/cpp compile against the installed headers. These compile-only steps +# use -c rather than -fsyntax-only: the Nix cc-wrapper adds its link flags unless it sees -c, +# and clang -Werror rejects them as unused. bash ../doc/lib/samples.sh cpp ../doc/lib/cpp/index.md >"$build/doc-samples.cpp" -"${CXX:-c++}" -std=c++17 -fsyntax-only -Wall -Werror -include moq/test/doc-samples.hpp \ +"${CXX:-c++}" -std=c++17 -c -o /dev/null -Wall -Werror -include moq/test/doc-samples.hpp \ -I"$prefix/include" "$build/doc-samples.cpp" # The nightly runs the binding benchmark; compiling it here catches wrapper drift per PR. -"${CXX:-c++}" -std=c++20 -fsyntax-only -Wall -Werror -I"$prefix/include" moq/bench/main.cpp +"${CXX:-c++}" -std=c++20 -c -o /dev/null -Wall -Werror -I"$prefix/include" moq/bench/main.cpp if command -v pkg-config >/dev/null 2>&1; then pc="$prefix/lib/pkgconfig/moq-cpp.pc" diff --git a/sh/js/audit.test.py b/sh/js/audit.test.py index 69f3c47e3e8..008dd33d08d 100644 --- a/sh/js/audit.test.py +++ b/sh/js/audit.test.py @@ -14,7 +14,8 @@ class Audit(unittest.TestCase): def run_audit(self, failing): with tempfile.TemporaryDirectory() as directory: - root = Path(directory) + # Resolved, since macOS's /tmp is a symlink and `bun` logs the shell's $PWD. + root = Path(directory).resolve() for project in PROJECTS: (root / project).mkdir(parents=True, exist_ok=True) tools = root / "bin"