Skip to content

fix: Solve the conflict problem of introducing multiple versions of knadh #772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: develop-tmp
Choose a base branch
from

Conversation

panlei-coder
Copy link

@panlei-coder panlei-coder commented Feb 10, 2025

1bf4369 该 pr 引入了 knadh 两个版本 v1.5.0 和 v2.1.2,seata-go-sample 中引入的是 v1.4.4 版本,导致多个不同的版本引入冲突。通过 go mod graph 查看了项目中库的依赖关系,主要是 dubbo-go 中依赖 knadh,目前最新版本的 dubbo-go 引入的是 v1.5.0,所以将 dubbo-go 的版本升级到了 v3.1.1,knadh 统一成了 v1.5.0。

seata-go-sample pr : apache/incubator-seata-go-samples#60

Copy link

@AlexStocks
Copy link
Contributor

Pls fix the ci failure

@github-actions github-actions bot added the ci/cd label Mar 29, 2025
@r1ngtone
Copy link

Perhaps you can add the following step above - name: "golang ci lint" to resolve the issue:

- name: Download Go modules
        run: |
          go clean -modcache
          go mod download

@AlexStocks
Copy link
Contributor

@panlei-coder please fix the ci failure

@github-actions github-actions bot added the bug Something isn't working label Apr 27, 2025
@luky116 luky116 requested a review from Copilot May 19, 2025 00:38
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR resolves dependency conflicts by unifying the knadh/koanf version used across the seata-go project and its samples by upgrading dubbo-go and removing an outdated knadh/koanf/v2 dependency. Key changes include updating import statements in pkg/client/config.go, modifying go.mod to remove the v2 dependency, and disabling caching in the GolangCI-Lint workflow.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
pkg/client/config.go Updated the import to use knadh/koanf v1.5.0 by removing the alias for the v2 package
go.mod Removed dependency on github.com/knadh/koanf/v2 to enforce usage of v1.5.0
.github/workflows/golangci-lint.yml Disabled caching with skip-cache and skip-pkg-cache flags to ensure fresh linting runs
Comments suppressed due to low confidence (3)

go.mod:41

  • The removal of the v2 dependency is intentional to resolve conflicts; please confirm that there are no residual references to the v2 API elsewhere in the project.
github.com/knadh/koanf/v2 v2.1.2

pkg/client/config.go:29

  • Ensure that the change from importing knadh/koanf/v2 to knadh/koanf v1.5.0 is fully consistent with the API usage in this file, and verify that no functions exclusive to the v2 API are still being used.
"github.com/knadh/koanf"

.github/workflows/golangci-lint.yml:61

  • Disabling cache may slow down CI runs; ensure that this configuration change is intentional and its impact on build times is acceptable.
skip-cache: true

@MinatoWu MinatoWu mentioned this pull request Jun 7, 2025
@Code-Fight Code-Fight changed the base branch from master to develop-tmp June 8, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci/cd coding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants