charmbracelet/bubbletea

autocomplete example not valid anymore

erdemkosk opened this issue · 5 comments

Describe the bug
When try to run this example there is no such a SetSuggestions and ti.ShowSuggestions = true values in textInput.

Setup
Please complete the following information along with version numbers, if applicable.

  • OS [macOS]
  • Shell [zsh,]
  • Terminal Emulator [iterm]

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://github.com/charmbracelet/bubbletea/blob/master/examples/autocomplete/main.go'
  2. Try to run in local

m.textInput.SetSuggestions undefined (type textinput.Model has no field or method SetSuggestions)compilerMissingFieldOrMethod

m.textInput.SetSuggestions undefined (type textinput.Model has no field or method SetSuggestions)compilerMissingFieldOrMethod

The autocomplete functionality is not yet included in a bubbles release. Therefore, bubbles dependency in the examples module is pinned to a commit that includes autocomplete functionality. Please check the version of bubbles you are using (e.g. in case you are using replace directive to use a local copy of bubbles that is older than charmbracelet/bubbles@eda8912).

Hi! So if I'm understanding things correctly we just need to do a release on Bubbles, correct? If that's indeed the case that's easy enough and we'd be happy to do so.

@meowgorithm I could not reproduce the OP issue, to me the autocomplete example works OK locally (the bubbles dependency in examples module was bumped to commit that includes the autocomplete functionality, so a new bubbles release should not be needed just for that).

From the error message it looks like an old version of bubbles is being used, so I suspect there might be some misconfiguration on OP's end.

Thanks, @naglis! In any case, we just did a proper bubbles release and this should sort things out (@erdemkosk, let us know if not).