leonelquinteros / gotext

Go (Golang) GNU gettext utilities package
Other
432 stars 58 forks source link

Upgrade to ensure compatibility with generics #66

Closed Jguer closed 1 year ago

Jguer commented 1 year ago

Is this a fix, improvement or something else?

Hey, I was facing the issue of xgotext not working since go1.18 and the introduction of generics

Upgrading the text and tools package fixed the issue

What does this change implement/fix?

Upgrades the go.mod dependencies of the project

I have ...

leonelquinteros commented 1 year ago

Hi, could you explain what's exactly the issue? The build workflow is using 1.18 for a while and all tests are passing.

Also, could you include tests for your use case, that fails with current version and are fixed after your PR?

Thanks!

Jguer commented 1 year ago

Go version: 1.19.4

I had produced this patch a while back and I think the error on master was different but I think it was updated meanwhile. :sweat_smile: . For reference, what I can reproduce now:

version: github.com/leonelquinteros/gotext/cli/xgotext@latest / github.com/leonelquinteros/gotext/cli/xgotext@v1.5.0

command: xgotext -in . -out ./po
cwd: yay root folder
error:

internal error: package "context" without types was imported from "github.com/Jguer/yay/v11"

Using go install github.com/leonelquinteros/gotext/cli/xgotext@master made it work :+1:

Sorry for the noise, thanks for the project

leonelquinteros commented 1 year ago

Thanks for the details! I'll work on tagging a new minor version soon to reflect these improvements on @master that aren't in the latest release.