feat: Go CLI skeleton — version command and lola mod stubs#188
feat: Go CLI skeleton — version command and lola mod stubs#188mrbrandao wants to merge 11 commits into
Conversation
Add .tool-versions to .gitignore to prevent local asdf version configuration from being tracked by git.
Initialize Go module and root command scaffold for the lola CLI, using github.com/spf13/cobra as the CLI framework.
… domain Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… test - Replace currentVersion() call in versionCmd.Run with cmd.Root().Version for single source of truth between 'lola version' and 'lola --version' - Add boundary test case for exactly 7-char vcsRevision to cover min(7, len(vcsRevision)) logic - All tests pass including new case Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Adds Go build targets to the Makefile alongside existing Python targets. Includes version stamping from git tags via LDFLAGS when on a tag, otherwise falls through to VCS stamping for dev builds. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Add standard Go ignores (binaries, test artifacts, coverage output, go.work), exclude also custom bin/ dir
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (16)
📝 WalkthroughWalkthroughThis PR establishes the Go project skeleton for lola, introducing build infrastructure, a Cobra-based CLI framework with root and version commands, and a module management command group with operation stubs that currently return a sentinel "not yet implemented" error. ChangesGo Project Skeleton
Sequence DiagramsequenceDiagram
participant main as main()
participant Execute as cmd.Execute()
participant rootCmd as rootCmd
participant versionCmd as versionCmd
participant resolveVersion as resolveVersion()
main->>Execute: invoke
Execute->>rootCmd: rootCmd.Execute()
rootCmd->>rootCmd: Load version via currentVersion()
rootCmd->>versionCmd: Register versionCmd
rootCmd->>resolveVersion: Resolve version<br/>with fallback chain
resolveVersion-->>rootCmd: Return version string
rootCmd-->>Execute: Command result
Execute-->>main: Return or exit(1)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e2ae4b9dc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Note: This is not a review. @mrbrandao try to use an agent to extract the feature files from #184 and write the steps for Go to check the feasibility of that PR for the Go implementation. (No need to change this PR, just a test to see how it goes.) |
Summary
Bootstraps the Lola Go CLI with the initial project structure, version
command, and
lola modskeleton. This is the first PR in the Go portseries (
go-port-00), establishing the foundation for all subsequentcommand implementations.
main.go,cmd/root.go)lola version/lola --version/lola -vwith dynamic versionresolution (ldflags →
go installmodule version → VCS commit hash →0.0.0-devfallback)lola modcommand group with 6 no-op subcommands:add,rm,ls,info,update,initinternal/modules/domain package with stub functions and per-packageerror sentinel (
ErrNotImplemented)mk/go.mkwithgo-build,go-test,go-vetMakefile targets.gitignoreupdated with Go and SuperPowers sectionsTest plan
lola --version/lola -vprints version string (e.g.0.0.0-dev+279d87c)lola versionprintslola version 0.0.0-dev+279d87c linux/amd64lola mod --helplists all 6 subcommands, nosearchlola mod <sub>printsnot yet implementedto stderr, exits 1make go-testpassesmake go-vetcleanRelated issues
Closes #182 — Go project skeleton
Part of the Go migration (ADR: go-migration)
AI Disclosure
AI-assisted with Claude Code
Summary by CodeRabbit
New Features
Chores