henomis / lingoose

🪿 LinGoose is a Go framework for building awesome AI/LLM applications.
https://lingoose.io
MIT License
661 stars 56 forks source link

deps: update go and golangci-lint versions #181

Closed seppzer0 closed 6 months ago

seppzer0 commented 8 months ago

Description

This PR primarily contains a bump up to Go 1.22.0 and golangci-lint 1.56.2 . While golangci-lint version is the latest at the moment, there is a newer 1.22.1 version of Go available. However, I'm not sure if it is a good practice to set a project on the edge version of the language, so I decided to stay with second-to-latest.

I should note that there is a //nolint:goconst exception added in transformer/hf-text-to-image.go, as I was not sure where the multiple occurences of the "Bearer " string reported by the linter were. This has been taken into consideration in recent commits, so it is now resolved.

The full list of warning generated (and fixed) by the new linter version is here:
transformer\hf-text-to-image.go:83:34: string `Bearer ` has 3 occurrences, make it a constant (goconst)
        req.Header.Set("Authorization", "Bearer "+h.token)
                                        ^
legacy\pipeline\summarize\summarize.go:35:62: unused-parameter: parameter 'input' seems to be unused, consider removing or renaming it as _ (revive)
        preSummaryCB := pipeline.Callback(func(ctx context.Context, input types.M) (types.M, error) {
                                                                    ^
legacy\pipeline\summarize\summarize.go:51:42: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
        postSummaryCB := pipeline.Callback(func(ctx context.Context, output types.M) (types.M, error) {
                                                ^
legacy\pipeline\summarize\summarize.go:62:40: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
        preRefineCB := pipeline.Callback(func(ctx context.Context, input types.M) (types.M, error) {
                                              ^
legacy\pipeline\summarize\summarize.go:67:41: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
        postRefineCB := pipeline.Callback(func(ctx context.Context, output types.M) (types.M, error) {
                                               ^
legacy\pipeline\sql\sql.go:119:40: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
        preRefineCB := pipeline.Callback(func(ctx context.Context, input types.M) (types.M, error) {
                                              ^
legacy\pipeline\sql\sql.go:123:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
        postRefineCBFn := pipeline.Callback(func(ctx context.Context, output types.M) (types.M, error) {        
                                                 ^
legacy\pipeline\sql\sql.go:141:42: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
        preDescribeCB := pipeline.Callback(func(ctx context.Context, input types.M) (types.M, error) {
                                                ^
legacy\pipeline\sql\sql.go:145:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
        postDescribeCB := pipeline.Callback(func(ctx context.Context, output types.M) (types.M, error) { 

Please let me know if you think bumping the Go version all the way to 1.22.1 is sensible for lingoose.

Type of change

How Has This Been Tested?

I ran golangci-lint with version 1.54.2 (used in the project before my changes), no warnings were generated. With a few changes added, no warnings are now generated for the 1.56.2 version as well.

Additionally, I ran the Go tests with the new Go version.

Checklist:

seppzer0 commented 8 months ago

@henomis , take a look when you have the time. I've resolved the merge conflicts for now.

henomis commented 7 months ago

Is there any issue with go v1.21?

seppzer0 commented 7 months ago

Is there any issue with go v1.21?

@henomis ,

There isn't, at least not that I know of. As the description suggests, this is just a core dependency update. Which as far as I know is a good practice for keeping a project regularly fresh.

seppzer0 commented 7 months ago

@henomis , consider looking back into the PR and leaving a feedback

seppzer0 commented 7 months ago

@henomis , reminder

seppzer0 commented 6 months ago

It is ironic how you documented every corner of your project with "contribution policies" -- some of which you added after this PR was opened --, yet you have intentionally unattended this PR for an entire month if not more.

I could understand if you'd left some sort of a feedback with appropriate reasoning, but you didn't. Evidently though, the majority of PRs you don't have a problem with are exclusively your own. Which really puts under a question your professionality and true intention with this project in the first place.

You are also welcome for the fixes that were mentioned here but you added queitly in your commits.

In any case, I'm closing this PR. In contradiction to your own rules you let it go stale. It is unfortunate it has come down to this, but with management like this, there is no more interest in this project anymore.

@henomis