You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That’s because the mvdan/sh has already renamed it’s import path from "github.com/mvdan/sh" to "mvdan.cc/sh". When you used the old path "github.com/mvdan/sh" to import mvdan/sh, go will reintroduces mvdan/sh through the import statements "import mvdan.cc/sh/…" in the go source file of mvdan/sh.
Background
I find that
mvdan.cc/sh
andgithub.com/mvdan/sh
coexist in this repo:https://github.com/garetht/amanar/blob/master/go.mod (Line 14 & 25)
That’s because the
mvdan/sh
has already renamed it’s import path from "github.com/mvdan/sh" to "mvdan.cc/sh". When you used the old path "github.com/mvdan/sh" to importmvdan/sh
, go will reintroducesmvdan/sh
through the import statements "import mvdan.cc/sh/…" in the go source file ofmvdan/sh
.https://github.com/mvdan/sh/blob/v2.6.4/expand/braces.go#L6
The "mvdan.cc/sh" and "github.com/mvdan/sh" are the same repos. This will work in isolation, bring about potential risks and problems.
Solution
Follow the requirements of mvdan/sh doc:
Replace all the old import paths, change
"github.com/mvdan/sh"
to"mvdan.cc/sh "
.Where did you import it: https://github.com/garetht/amanar/search?q=github.com%2Fmvdan%2Fsh&unscoped_q=github.com%2Fmvdan%2Fsh
The text was updated successfully, but these errors were encountered: