esimov / caire

Content aware image resize library
MIT License
10.36k stars 384 forks source link

imported and not used "fmt" #51

Closed AdrianTudC closed 5 years ago

AdrianTudC commented 5 years ago

I get this error when I use the lib as described in this tutorial: https://getstream.io/blog/go-1-11-rocket-tutorial/

# github.com/esimov/caire ../go/pkg/mod/github.com/esimov/caire@v1.2.2/process.go:18:2: imported and not used: "fmt"

Is there something related to the way the tutorial imports CAIRE ? If I delete the "fmt" import myself, then it works fine.

esimov commented 5 years ago

I could not find the fmt package being used in the process.go file. Did you sorted it out the issue?

AdrianTudC commented 5 years ago

I just did the tutorial steps again on a completely new machine (didn't even had go on it) and I still encounter the same error. And I can still see "fmt" as the last import in process.go file.

I think the version is wrong. the go.mod file is listing v1.2.2. Where can I see what the latest version is?

esimov commented 5 years ago

The latest version is v1.2.2. I haven't gone trough the tutorial, but please take note that Caire is in active development and many things have been changed since the tutorial has been published. So I suggest to try to run the tool as it is described in the readme file.

johanbrandhorst commented 5 years ago

This is definitely still a problem with the latest release, but fixed on master:

$ go get github.com/esimov/caire/cmd/caire@latest
# github.com/esimov/caire
../../../go/pkg/mod/github.com/esimov/caire@v1.2.2/process.go:18:2: imported and not used: "fmt"
$ go get github.com/esimov/caire/cmd/caire@master
go: finding github.com master
go: finding github.com/esimov/caire/cmd/caire master
go: finding github.com/esimov/caire master
go: finding github.com/esimov master
go: finding github.com/esimov/caire/cmd master
go: downloading github.com/esimov/caire v1.2.3-0.20190708153325-c5821f66daef
go: extracting github.com/esimov/caire v1.2.3-0.20190708153325-c5821f66daef
$

I suggest making a new release.

esimov commented 5 years ago

Thanks for pointing me to the right direction. Definitely this was the problem, one of the release source file contained an orphan fmt package imported, which was not the case on the master. I did a new release, hopefully this will fix the issue. @johanbrandhorst and @Edeph can you check it again?

johanbrandhorst commented 5 years ago

I tested and it is still failing. It looks to me like you simple overwrite the 1.2.2 tag? This will not work with go modules, you will need to release 1.2.3 with the bug fix. Please revert the 1.2.2 tag or it will become unusable. The module wiki has some information on why this is forbidden.

esimov commented 5 years ago

I've published a new v1.2.3 release. I really hope this will fix the issue. Unfortunately I could not do a revert to the old 1.2.2 tag, since i have overwritten. Can you check it now please?

johanbrandhorst commented 5 years ago

It works fine now, thank you! This issue can be closed again.

esimov commented 5 years ago

Thank you too for support and help!!