mindoc
mindoc copied to clipboard
Potential dependency inconsistency
Dependency line:
github.com/mindoc-org/mindoc --> github.com/beego/beego --> github.com/gomodule/redigo
github.com/beego/beego v2.0.5 --> github.com/gomodule/redigo v1.8.8
https://github.com/beego/beego/blob/v2.0.5/go.mod#L79
Background
Repo github.com/beego/beego
at version v2.0.5
uses replace directive to pin dependency github.com/gomodule/redigo
to version v1.8.8
.
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. And it turns out that mindoc-org/mindoc
indirectly relies on gomodule/[email protected]
, which is different from the pinned version beego/beego
needed.
https://github.com/mindoc-org/mindoc/blob/master/go.mod(Line 32)
github.com/gomodule/redigo v2.0.0+incompatible // indirect
https://github.com/beego/beego/blob/v2.0.5/go.mod(line 17&79)
github.com/gomodule/redigo v2.0.0+incompatible
replace github.com/gomodule/redigo => github.com/gomodule/redigo v1.8.8
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/beego/beego
You may try upgrading dependency github.com/beego/beego
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/gomodule/redigo => github.com/gomodule/redigo v1.8.8