Objective
Upgrade the charmbracelet/huh interactive form library from github.com/charmbracelet/huh v0.8.0 to charm.land/huh/v2 v2.0.3, removing the orphan github.com/charmbracelet/lipgloss v1 dependency that exists solely due to huh v0.8.0.
Context
From discussion #24261 (Go Fan module review). gh-aw has already migrated to:
charm.land/bubbletea/v2 v2.0.2
charm.land/lipgloss/v2 v2.0.2
charm.land/bubbles/v2 v2.1.0
But huh is still on the old path, forcing github.com/charmbracelet/lipgloss v1 to remain as an orphan dependency. There's even a comment in pkg/styles/huh_theme.go acknowledging this workaround.
Steps
- Run
go get charm.land/huh/v2@v2.0.3
- Update all 13 import sites across
pkg/console/ and pkg/cli/ from github.com/charmbracelet/huh → charm.land/huh/v2 (can use sed -i 's|github.com/charmbracelet/huh|charm.land/huh/v2|g' $(grep -rl 'github.com/charmbracelet/huh' --include='*.go'))
- Fix any compilation errors from API changes between v0 and v2 (see upgrade guide at
github.com/charmbracelet/huh releases)
- Run
go mod tidy to remove github.com/charmbracelet/huh and github.com/charmbracelet/lipgloss (v1) from go.mod/go.sum
- Verify
github.com/charmbracelet/lipgloss no longer appears in go.mod as a direct dependency
Files to Modify
go.mod / go.sum — dependency update
- All 13 files in
pkg/console/ and pkg/cli/ that import github.com/charmbracelet/huh
pkg/styles/huh_theme.go — import change from github.com/charmbracelet/lipgloss to charm.land/lipgloss/v2 (v1 only needed for huh compat)
Acceptance Criteria
Generated by Plan Command for issue #discussion #24261 · ● 188.9K · ◷
Objective
Upgrade the
charmbracelet/huhinteractive form library fromgithub.com/charmbracelet/huh v0.8.0tocharm.land/huh/v2 v2.0.3, removing the orphangithub.com/charmbracelet/lipgloss v1dependency that exists solely due to huh v0.8.0.Context
From discussion #24261 (Go Fan module review).
gh-awhas already migrated to:charm.land/bubbletea/v2 v2.0.2charm.land/lipgloss/v2 v2.0.2charm.land/bubbles/v2 v2.1.0But
huhis still on the old path, forcinggithub.com/charmbracelet/lipgloss v1to remain as an orphan dependency. There's even a comment inpkg/styles/huh_theme.goacknowledging this workaround.Steps
go get charm.land/huh/v2@v2.0.3pkg/console/andpkg/cli/fromgithub.com/charmbracelet/huh→charm.land/huh/v2(can usesed -i 's|github.com/charmbracelet/huh|charm.land/huh/v2|g' $(grep -rl 'github.com/charmbracelet/huh' --include='*.go'))github.com/charmbracelet/huhreleases)go mod tidyto removegithub.com/charmbracelet/huhandgithub.com/charmbracelet/lipgloss(v1) fromgo.mod/go.sumgithub.com/charmbracelet/lipglossno longer appears ingo.modas a direct dependencyFiles to Modify
go.mod/go.sum— dependency updatepkg/console/andpkg/cli/that importgithub.com/charmbracelet/huhpkg/styles/huh_theme.go— import change fromgithub.com/charmbracelet/lipglosstocharm.land/lipgloss/v2(v1 only needed for huh compat)Acceptance Criteria
go.modno longer containsgithub.com/charmbracelet/huhgo.modno longer containsgithub.com/charmbracelet/lipglossas a direct dependencycharm.land/huh/v2make buildsucceedsmake test-unitpasses