Repository navigation
quest(m4/go): plan the follow-ups of rust2-go configless - #630
Conversation
Five quests from #614's follow-ups and its OpenAI review: pub constants and statics, exported names off the runtime's, a Go API for exported enums with an external test package, trait-impl methods, and methods reached only through a specialized alias. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 37 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head 772227e against base 9dc8ba1.
No actionable defects found in this planning-only diff. The five quests separate the remaining export gaps, require the configless work that introduces their current refusals, and leave representation/naming choices visible. The specialized-alias plan explicitly covers shared instances and impl applicability, and the enum plan incorporates an external importing Go test rather than checking generated names alone.
Direction for implementation: preserve the distinction between a Rust const's fresh value at each use and a static's shared storage when emitting non-basic constants as Go variables; add mutation/copy cases to the external-package tests. The runtime-package move also needs a collision-safe import name and an actual importing-package build. These are implementation acceptance checks, not blockers to recording the quests. The epic's speed/drop decision remains in force; these documents do not demonstrate that the performance bar has been met.
Limits: GitHub-only review of all six changed documents, the Go epic/configless/speed plans, and the relevant prior #614 review context. No executable code changes, builds, tests, quest context, or quest validation were run. I did not independently verify the claimed exhaustive overlap search or maintainer decisions. This COMMENT is not merge approval.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Summary
Plans the follow-ups of moq-dev/rust2#614 (rust2-go configless, quest/m4/go/configless.md) as five m4 quests beside the other Go quests, ranked in quest/m4/go/README.md by what blocks translation first:
quest/m4/go/consts.md: exportpubconstants and statics, associated ones included, instead of refusing them. A static is one Go variable that translated code and Go callers share, so statics get translated too, not only exported.quest/m4/go/runtime-names.md: a crate'spub type Result<T> = Result<T, Error>or ownFormatterexports beside the runtime's. Recommends moving the runtime into its own imported Go package, as rust2-ts importsrs, with the module path read from thego.modabove--out.quest/m4/go/enums.md: a Go API for exported enums: an exported tag, variant constants and constructors, and enums passed whole across every root. Includes the OpenAI review's suggestion: an external Go test package that imports the translated items package and constructs and calls its exports, so accessibility is pinned.quest/m4/go/trait-impls.md: export apubtype's trait-impl methods by a naming rule. Recommends rust2-ffi's Go names for std's traits (String(),GoString(),Equal), and leaves the general rule open.quest/m4/go/alias-methods.md: methods reached only through a specialized alias (pub type Byte = Value<u8>): dedupe instances across aliases of one specialization, a wrapper per alias, and impl applicability through rustc's trait solver.Each quest records "Decided with the maintainer on 2026-11-07: m4 (from #614's follow-ups)" and requires
configless.md, since the code it changes lands in #614.quest check --fixdrops that link once #614 merges.runtime-names.mdandtrait-impls.mdnote that moq-dev/rust2#599 moves rust2-ffi's Go exports toward a Go package per Rust module, which bears on their naming.Overlap
None found. I searched the quest tree, quests deleted in git history, and open PRs touching
quest/. quest/m4/go/coverage.md covers language constructs (Drop, floats, trait objects), not the exported API. rust2-ffi's Go generator (ffi/README.md) already names enums, constants, and std trait impls for its cgo bindings, so the quests cite it as a precedent.Choices made without asking
go/. These quests carry the same risk, but configless itself was planned ungated, so I followed that. If you'd rather gate them, each one can add speed to itsRequired.enums.md): keep the layout translated code uses and export its parts, instead of rust2-ffi's Go form (anint32for a plain enum, a sealed interface for one with data). This follows feat(go)!: translate a crate's whole pub API with no go.toml #614's follow-up wording and needs no conversion at a root.consts.md): camel case each word (MaxLen), where feat(go)!: translate a crate's whole pub API with no go.toml #614's rule givesMAXLENand rust2-ffi's Go keepsLIMIT.Public API
None. This PR changes only quests.
Checks
just check(lint andquest check) passes on 772227e.Models
Size: S
Implementer: Claude Code, claude-opus-5-5, high effort
Review
Rewritten by
quest reviewafter each round.01a1b448-9e10-72a1-96d4-e670db6e6683, round 1The specified diff adds five follow-up quest documents and index links, changes no executable code, and contains no actionable defects under the repository’s review rules.