Skip to content
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

Dependency version warning #41

Open
Ben131-Go opened this issue Jan 29, 2023 · 0 comments
Open

Dependency version warning #41

Ben131-Go opened this issue Jan 29, 2023 · 0 comments

Comments

@Ben131-Go
Copy link

Dependency line:

github.com/javadmohebbi/goNfCollector --> github.com/influxdata/influxdb-client-go --> github.com/deepmap/oapi-codegen

github.com/influxdata/influxdb-client-go v2.2.2 --> github.com/deepmap/oapi-codegen baf7136

https://github.com/influxdata/influxdb-client-go/blob/v2.2.2/go.mod#L14

Background

Repo github.com/influxdata/influxdb-client-go at version v2.2.2 uses replace directive to pin dependency github.com/deepmap/oapi-codegen to version baf7136.

According to Go Modules wikis, replace directives in modules other than the main module are ignored when building the main module.
It means such replace usage in dependency's go.mod cannot be inherited when building main module. In general, javadmohebbi/goNfCollector would indirectly depend on deepmap/[email protected] when building this module, which is different from the pinned version influxdata/influxdb-client-go needed.

https://github.com/influxdata/influxdb-client-go/blob/v2.2.2/go.mod(line 6&14)

github.com/deepmap/oapi-codegen v1.3.13
replace github.com/deepmap/oapi-codegen v1.3.13 => github.com/bonitoo-io/oapi-codegen v1.3.8-0.20201014090437-baf71361141f

So this is just a reminder in the hope that you can notice such an inconsistency.

Solution

1. Bump the version of dependency github.com/influxdata/influxdb-client-go

You can try upgrading dependency ggithub.com/influxdata/influxdb-client-go to a newer version, which may have eliminated the use of this directive.

2. Add the same replace rule to your go.mod

replace github.com/deepmap/oapi-codegen v1.3.13 => github.com/bonitoo-io/oapi-codegen v1.3.8-0.20201014090437-baf71361141f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant