formula classfile#160
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Review: formula classfile (Gop → XGo migration)
This is a clean, focused migration renaming the classfile convention Gopt_*_Main → XGot_*_Main and GopPackage → XGoPackage, plus a demo formula, gox.mod, and .gitignore. The functional rename is complete and correct on the runtime path — the ixgo export.go reflection map keys and the UntypedConsts entry were both updated (that's exactly where a partial rename would break the interpreter at runtime rather than compile time). go build ./... and go test ./formula/... pass. internal/formula test failure is a pre-existing ixgo toolchain linker issue (math/rand/v2.globalRand), unrelated to this PR.
Findings below are consistency / documentation-accuracy issues — nothing blocks correctness.
Stale Gopt_ references left after the rename (not in this diff, but describe the renamed symbol):
internal/formula/formula.go:73— doc-comment example still showsformula.Gopt_ModuleF_Main(this); the symbol no longer exists, so copying the example would fail to compile. Update toXGot_ModuleF_Main.internal/formula/formula.go:81— prose comment "Calling Main() triggersGopt_ModuleF_Main…" is now inaccurate.internal/formula/formula.go:143— inline comment "triggers:formula.Gopt_ModuleF_Main(this)" is now inaccurate.AGENTS.md:51, 94, 106— still document theGopt_<ClassName>_Mainconvention / generated-code shape this PR changed. Worth a follow-up so the migration is complete.
Minor (style): cmp/cmp.go and formula/classfile.go wrap a single constant in a const ( … ) block; the single-line form (const XGoPackage = true) is more idiomatic for a lone constant. Cosmetic only.
See inline comments for the remaining items.
Findings without inline locations
formula/classfile_test.go:34: The test body was updated toXGot_ModuleF_Main(line 36) and the failure message on line 39, but the function nameTestGopt_ModuleF_Mainand the doc comment on lines 31-32 ("exercises…", "Going throughGopt_ModuleF_Main…") still use the oldGopt_name. Rename toTestXGot_ModuleF_Mainand update the comment for consistency with the symbol under test. (Line 109 in this file has the same stale reference.)
| *.o | ||
| *.a | ||
| *.so | ||
| *.txt |
There was a problem hiding this comment.
*.txt is a very broad ignore pattern. It won't un-track already-committed files, but any newly added .txt will be silently ignored — including build-critical / fixture files this repo relies on (e.g. internal/build/testdata/.../CMakeLists.txt, config.txt, expected-output .txt). That's easy to forget and can produce non-reproducible CI. Recommend scoping it to specific artifact paths. Also, coverage.txt on line 30 becomes redundant once *.txt is present.
Minor: the # gop / # gopfmt / # goptestgo comments on lines 9-11 are stale relative to the XGo migration.
No description provided.