go-kod / kod

A generics based dependency injection application framework for Go, support OpenTelemetry trace/metric/log natively 🚀🚀🚀
https://pkg.go.dev/github.com/go-kod/kod
Apache License 2.0
106 stars 3 forks source link

tasks `install:mockgen` and `install:golangci-lint` are installing specific version for all my machine #154

Closed ccoVeille closed 2 weeks ago

ccoVeille commented 4 weeks ago

If I have golang 1.59.0, or a custom version locally

the code will nuke it as it would install the version needed by your tool, which is the 1.56.0 for now

same for mockgen

https://github.com/go-kod/kod/blob/795c83bdc17cf77e647ee6f750c5e0efe2c6125e/Taskfile.yml#L78-L92

sysulq commented 3 weeks ago

fixed in #155

ccoVeille commented 3 weeks ago

It's not completed.

The fix I made was there to check the binary presence before calling it.

The issue described here differs.

If I have golangci-lint 1.59 (or 1.52), launching task test will reinstall the version you expect for

The check should be (and it's not obvious) to validate the version installed is at least tge one you expect

Please reopen

sysulq commented 3 weeks ago

Alright, reopened.

ccoVeille commented 3 weeks ago

Maybe it's something that could be solved by using the technique used here

https://gitlab.com/gitlab-org/cloud-native/gitlab-operator/-/blob/master/Taskfile.yaml#L73

By defining a local GOBIN folder you would be able to install and use the version you expect from golangci-lint and mockery

sysulq commented 3 weeks ago

Maybe it's something that could be solved by using the technique used here

https://gitlab.com/gitlab-org/cloud-native/gitlab-operator/-/blob/master/Taskfile.yaml#L73

By defining a local GOBIN folder you would be able to install and use the version you expect from golangci-lint and mockery

Nice point, We can do it like this.

sysulq commented 2 weeks ago

fixed in latest commit.

ccoVeille commented 2 weeks ago

Fixed in 0e89facf06dbe306f48059504709e93ebd6165c6 and fbba16c6f535dd82117650beea875d619290480c