Open niclausse opened 3 years ago
怎么解决的呢
遇到此问题+1,简单研究了一下,原因其实比较简单
github.com/antlr/antlr4 v0.0.0-20210105192202-5c2b686f95e1
,这个版本的在 github.com/antlr/antlr4/runtime/Go/antlr
目录下缺少go.mod文件,所以go mod会自动依赖到最上层github.com/antlr/antlr4/runtime/Go/antlr v1.4.10
解决方法是更新gengine依赖的antlr4版本,并直接依赖到 github.com/antlr/antlr4/runtime/Go/antlr
目录,稍后我提个Pull Request
在上述 https://github.com/bilibili/gengine/pull/57 被合入之前,可以先在 go.mod
里加以下的 replace 语句
replace (
github.com/bilibili/gengine => github.com/BiscuitAtLinux/gengine v0.0.0-20221223083655-5abe637b1d7b
)
../../../../pkg/mod/github.com/bilibili/gengine@v1.5.7/builder/rule_builder.go:6:2: ambiguous import: found package github.com/antlr/antlr4/runtime/Go/antlr in multiple modules: