Repository navigation
feat(cpp)!: generate unprefixed free functions - #6476
Conversation
Quest-Claim: c281aaeb868af53c
cpp/moq/uniffi.toml sets the generator's new strip_function_prefix = "moq_", so moq::log_level and friends are the generated functions, and moq.hpp drops its five pass-through wrappers. The generator pin moves to v0.11.0-kixelated.6+v0.32.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Implementation is done and stays a draft on one blocker: the generator release. The
(Written by Claude Opus 5.5) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
# Conflicts: # cpp/moq/MIGRATE.md # cpp/moq/include/moq/moq.hpp
|
Merging. Iterated to settle the maintainer's decisions, then chosen for /quest-merge. CI is green, the current head has a non-Grok review, and (Written by Claude Opus 5.5) |
# Conflicts: # cpp/moq/MIGRATE.md # quest/m1/cpp-free-function-prefix.md
|
Merged Local checks on 0bc39ed: Public API: C++ only; generated (Written by Claude Opus 5.5) |
# Conflicts: # cpp/moq/MIGRATE.md
# Conflicts: # cpp/moq/MIGRATE.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Completes quest/m1/cpp-free-function-prefix: generated C++ free functions drop moq-ffi's
moq_prefix the way types already dropMoq, somoq.hppstops wrapping them before C++ first publishes.Changes
cpp/moq/uniffi.tomlsets the generator's newstrip_function_prefix = "moq_", somoq::log_level,moq::mint_epoch,moq::client_defaults,moq::versions,moq::qlog_supported, andmoq::epoch_time_msare the generated functions themselves.moq.hppdeletes its five pass-through wrappers (and the<vector>include only they used).epoch_timestays, since it converts milliseconds to atime_point, and now calls the generatedepoch_time_ms.moq::log_levelinstead ofmoq::moq_log_level.cpp/obs/src,cpp/obs/test,cpp/moq/test, anddoc/lib/cppalready used the short names.cpp/moq/MIGRATE.md, which moq-dev/moq#6610 leaves to the breaking cut.v0.11.0-kixelated.6+v0.32.2everywhere moq-dev/moq#5727 moved it:flake.nix(version, source hash,cargoHash), four workflows,rs/moq-ffi/build.sh, andcpp/moq/README.md. The README and theflake.nixcomment list the new option.quest/m1/README.md.Generator change
kixelated/uniffi-bindgen-cpp#5, merged into
kixelated/uniffi-0.32and taggedv0.11.0-kixelated.6+v0.32.2on the merge commit4cce88c.strip_function_prefixmirrorsstrip_type_prefix: each top-level function named<prefix><name>is renamed through uniffi's ownrenamewhen<name>starts with a lowercase letter, so FFI symbols and checksums are untouched. Methods keep their names. Generation fails if a stripped name is already a function or a C++ keyword, since the generator'sfn_namedoes not escape keywords. Function renames stay out of the type oracle's rename map.Tests in the fork's
cpp-tests:renamed.tomladdsstrip_function_prefix = "capi_"andexpected-testcallscapi::checksum,capi::fail, and asynccapi::sum; two ctest cases check the refusals (async_maybe_collidesasync_maybe_new_megaphonewithnew_megaphone;oops_turnsoops_enumintoenum). The first CI run failed on Windows:--configapplies to every crate in the fixtures library, in a platform-dependent order, soasync_hit coverall'sasync_boolfirst. Each refusal test now uses a prefix that hits only one crate, and the fork's CI passes on Linux, macOS, and Windows.Public API
C++ only, and unreleased (no
cpp-v*tag yet).moq::moq_fooismoq::foo, the namemoq.hppalready wrapped most of them as;moq::moq_epoch_time_msismoq::epoch_time_ms. Regenerate the C++ bindings withuniffi-bindgen-cppv0.11.0-kixelated.6+v0.32.2.moq::moq_log_level,moq::moq_mint_epoch,moq::moq_client_defaults,moq::moq_versions,moq::moq_qlog_supported, andmoq::moq_epoch_time_msare gone. The short names users already wrote still compile, now as the generated functions;moq::epoch_time_msis newly reachable by its short name.moq.hpp.Wire: none.
Checks
nix build .#uniffi-bindgen-cppagainst the published tag, with the recomputed source hash;cargoHashis unchanged sinceCargo.lockis.just checkin the Nix dev shell with that generator, after merging main: js, rs, quest, drill, py, kt, go, dart, and cpp pass (swift skipped: no toolchain). The generatedmoq/ffi/moq.hppdeclareslog_level,epoch_time_ms,mint_epoch,client_defaults,qlog_supported, andversionswith nomoq_names. Local flakes that passed on rerun and are outside this PR: GoTestReservationUpdateReleasesSubscribedTrack(grant unavailable) once, and dart's "build hook rebuilt moq-ffi" guard right after a moq-ffi rebuild.36f8f8b962on aquest/m1/README.mdconflict (main finished neighboring quests). Re-merged main through babb189dd3, keeping main's list minus this PR's quest. Before the last merge (JS-only), in the branch's own Nix shell:just checkpassed every module throughcpp,obs_compile, andobs(flakehits the local sandbox'sunshare uid_maplimit); the remaining modules (markdown, shell, large files, toml, nixfmt, justfile, gh) and the test phase (test rs,test js,test py,test gh) passed when run by hand, andjust test interop --allpassed, including everycpppairing.Decisions
kixelated/uniffi-0.32, merge after CI, and tagv0.11.0-kixelated.6+v0.32.2.flake.nix's source hash was recomputed.strip_function_prefix, matchingstrip_type_prefixand the name moq-dev/moq#5727 proposed.Follow-ups
moq_mint_epoch,MoqClientConfig). Cosmetic and shared with every binding, as moq-dev/moq#5727 noted; recommend leaving it.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code