-
Notifications
You must be signed in to change notification settings - Fork 322
[plan] Upgrade charmbracelet/huh to charm.land/huh/v2 v2.0.3 #24313
Copy link
Copy link
Closed
Labels
Description
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.2charm.land/lipgloss/v2 v2.0.2charm.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/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')) - Fix any compilation errors from API changes between v0 and v2 (see upgrade guide at
github.com/charmbracelet/huhreleases) - Run
go mod tidyto removegithub.com/charmbracelet/huhandgithub.com/charmbracelet/lipgloss(v1) fromgo.mod/go.sum - Verify
github.com/charmbracelet/lipglossno longer appears ingo.modas a direct dependency
Files to Modify
go.mod/go.sum— dependency update- All 13 files in
pkg/console/andpkg/cli/that importgithub.com/charmbracelet/huh pkg/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/huh -
go.modno longer containsgithub.com/charmbracelet/lipglossas a direct dependency - All imports updated to
charm.land/huh/v2 -
make buildsucceeds -
make test-unitpasses - Interactive forms still work (forms render, selections work)
Generated by Plan Command for issue #discussion #24261 · ● 188.9K · ◷
- expires on Apr 5, 2026, 1:46 PM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.