charmbracelet / charmbracelet/bubbletea
v2-exp readme tutorial not working
- Dominant language
- Go
- Stars
- 44.9k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
the problem when i use the code specified in the README.md
it gives this errors and not work:
```bash
# github.com/charmbracelet/bubbletea/v2
/home/alaa/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta1/cursed_renderer.go:71:31: cannot use s.lastCur.Color (variable of interface type color.Color) as string value in argument to ansi.SetCursorColor
/home/alaa/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta1/tea.go:596:40: cannot use msg.Color (variable of interface type color.Color) as string value in argument to ansi.SetBackgroundColor
/home/alaa/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta1/tea.go:604:40: cannot use msg.Color (variable of interface type color.Color) as string value in argument to ansi.SetForegroundColor
/home/alaa/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta1/tea.go:612:36: cannot use msg.Color (variable of interface type color.Color) as string value in argument to ansi.SetCursorColor
/home/alaa/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta1/tea.go:1160:37: cannot use p.setBg (variable of interface type color.Color) as string value in argument to ansi.SetBackgroundColor
/home/alaa/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta1/tea.go:1163:37: cannot use p.setFg (variable of interface type color.Color) as string value in argument to ansi.SetForegroundColor
/home/alaa/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta1/tea.go:1166:33: cannot use p.setCc (variable of interface type color.Color) as string value in argument to ansi.SetCursorColor
```
and if i run it using bubbletea v1 it works normally
Contributor guide
Research direction
Reproduce the tutorial from README.md using github.com/charmbracelet/bubbletea/v2@v2.0.0-beta1 and inspect the reported type errors in cursed_renderer.go and tea.go. Compare the v2 dependency and the v1 behavior, then verify that the documented tutorial builds and runs successfully with the intended v2 setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100