erikgeiser / promptkit

Go prompt library
MIT License
249 stars 21 forks source link

Tests fail with github.com/muesli/termenv v0.13.0 #15

Closed mikelolasagasti closed 1 year ago

mikelolasagasti commented 1 year ago

All tests in confirmation and textinput fail with newer termenv release.

termenv 0.13.0 is a dependency on newer bubbletea.

I noticed this while packaging prompkit for Fedora, as Fedora uses available dependency versions rather than versions declared in go.mod.

erikgeiser commented 1 year ago

Yes, that's why the go.mod specifies the dependency versions that are actually supported. Jokes aside, thank you for reporting this. I'm sure you know this and I do some distro packaging myself, so I am quite painfully aware that the distro packaging model often heavily conflicts with how software development usually works.

I've tagged and released a new version which supportes termenv v0.13.0. However, this version also includes a breaking API change in promptkit's selection prompt (it now uses generics). I hope you can still use this release without breaking other packages, but if you previously built straight from main rather than v0.7.0 you should be fine. The changes have been on main for quite some time.

Lastly, the disclaimer in the README.md clearly states that "The API of library is not yet stable. Expect significant changes in minor versions before v1.0.0". This means that packaging this library is quite dangerous as different projects that depend on promptkit may only work against certain minor versions.

mikelolasagasti commented 1 year ago

Thanks Eric for your fast reply.

Yes, that's why the go.mod specifies the dependency versions that are actually supported. Jokes aside, thank you for reporting this. I'm sure you know this and I do some distro packaging myself, so I am quite painfully aware that the distro packaging model often heavily conflicts with how software development usually works.

Distro packaging vs new software building methods clash with the classical/old model of how packages were built & delivered. I'm just trying to get tools I use in Fedora so it's easier for me and hopefully others to use them. Great you didn't kill the messenger ;-)

I've tagged and released a new version which supportes termenv v0.13.0. However, this version also includes a breaking API change in promptkit's selection prompt (it now uses generics). I hope you can still use this release without breaking other packages, but if you previously built straight from main rather than v0.7.0 you should be fine. The changes have been on main for quite some time.

Nice!

Lastly, the disclaimer in the README.md clearly states that "The API of library is not yet stable. Expect significant changes in minor versions before v1.0.0". This means that packaging this library is quite dangerous as different projects that depend on promptkit may only work against certain minor versions.

I'll check if dependent package works fine before pushing this new release. For now there is just one package in Fedora depending on promptkit, doctl, so any API break issue would have very limited impact.

erikgeiser commented 1 year ago

The release page for v0.8.0 also contains a migration guide you can point people to if something breaks.