Repository navigation
fix: restore main CI after module path rename merge skew - #696
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The changes are mechanical module-path import rewrites plus a FuncMap switch that matches the established pattern at every other call site, and I verified completeness with no stale imports or compile issues remaining.
No open issues 🎉
What changed in this PR
This PR restores the main branch CI, which went red after #687 renamed the Go module to github.com/goblogplatform/goblog. PRs branched before that rename (#688–#693) merged with stale goblog/... import lines. The PR rewrites those stale imports to the new module path and, in two tests, replaces a hand-rolled template FuncMap (which was missing the commaList function introduced by #685) with the canonical theme.FuncMap().
I verified:
- The module path in
go.modisgithub.com/goblogplatform/goblog, matching the rewritten imports. theme.FuncMap()(theme/load.go:26-41) provides bothrawHTMLandcommaList;commaListis referenced bytemplates/shared/_head.html:98, so the previous hand-rolled maps would have failedParseGlob. The switch is correct and necessary.- The two changed test files are external test packages (
blog_test,admin_test), so adding thethemeimport introduces no import cycle. - All remaining
goblog/...occurrences are the intentional Yaegi alias strings (plugin/symbols.go, loader_test.go, validate_test.go, hello.go.example) left untouched as described, not real imports. - Completeness: all other template-parsing test sites already use
theme.FuncMap(), so no other test file remains broken.
Changes:
- Rewrite stale
goblog/...import lines to thegithub.com/goblogplatform/goblog/...module path across several (mostly test) files. - Switch
blog/post_type_test.goandadmin/crud_validation_test.gototheme.FuncMap()to pick up thecommaListtemplate function.
| File | Description |
|---|---|
| wizard/handlers_test.go | Rewrites datadir import to module path |
| tools/seed_backlinks_test.go | Rewrites blog/tools imports to module path |
| plugin/wasm/contract.go | Rewrites plugin import to module path |
| plugin/posts.go | Rewrites blog import to module path |
| plugin/posts_test.go | Rewrites blog/plugin imports to module path |
| blog/post_type_test.go | Module-path imports + switches to theme.FuncMap() for commaList |
| admin/settings_api_test.go | Rewrites admin/auth/blog/plugin imports to module path |
| admin/login_methods.go | Rewrites datadir import to module path |
| admin/login_methods_test.go | Rewrites admin/blog/datadir imports to module path |
| admin/crud_validation_test.go | Module-path imports + switches to theme.FuncMap() for commaList |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Main has been red since #687 renamed the module to
github.com/goblogplatform/goblog. PRs branched earlier (#688–#693) merged with oldgoblog/...imports."goblog/plugin"Yaegi alias strings inplugin/symbols.go,loader_test.go,validate_test.gountouched.blog/post_type_test.goandadmin/crud_validation_test.goused a hand-rolled FuncMap missingcommaList(from feat: optional person schema fields (jobTitle, worksFor, alumniOf, knowsAbout) #685); switched totheme.FuncMap()like other tests.Verified locally:
go build ./...andgo test -race ./...pass.🤖 Generated with Claude Code