Closed divan closed 5 years ago
Thanks for the suggestions. So I'm pretty confused about this whole go modules business tbh. I checked out the go modules wiki and it sounds like:
v3
release to properly add go module support.go.mod
to include v3
.v3
in the import path.How would that compare to just updating the current go.mod
file to include v2
in the module definition like you said?
Also, termui is still in the process of figuring out the API, so more breaking changes may still be in the works so doing a major bump right now would be unfortunate.
Another question, is there any issues with installing termui using the recommended method of doing
go get -u github.com/gizak/termui@master
in regards to go modules for the time being? Genuinely curious, especially since termui is still in flux atm.
edit: So it seems like the +incompatible
occurs when using v2.3.0
which doesn't support Go modules. Should I backport go module support and add a v2.3.1
release? Would that fix these issues?
I am very new to this as well, and am getting the +incompatible flag and the old tag doesn't seem to compile for me.
I think adding a 2.3.1 tag would fix it.
edit:
also, go get -u github.com/gizak/termui@master
does seem to fix it as well, it updates go.mod
So v3 was just released with Go module support! You'll have to update your import paths to include v3
as per Go modules convention for modules >v1. There was also a few minor breaking changes just to clean up the API, but those are all done now :relieved: . Also, I don't think backporting Go modules to v2 is really worth it. So at this point, I think this issue is resolved. I'm closing this but let me know if there's any issues with Go modules or migrating to v3.
As termui is a project that's actively being developed through years and sometimes breaks API, It would be awesome to make it friendly to the Go modules.
A couple of specific things here:
termui
as+incompatible
because of v2 version. You will probably need to change module definition in go.mod tomodule github.com/gizak/termui/v2
to play nice with Go modules.Thanks for the terrific library!