程序员小王
(程序员小王)
1
问题: 今天刚fork tidb代码,上周在公司fork时候并没有运行报错。
vscode debug单元测试 采用dlv方式 ,运行提示
go.sum 提示:Sirupsen与sirupsen 不正确
go: github.com/watchpoints/tidb/ddl imports
github.com/Sirupsen/logrus: github.com/Sirupsen/logrus@v1.6.0: parsing go.mod:
module declares its path as: github.com/sirupsen/logrus
but was required as: github.com/Sirupsen/logrus
1 tidb\ddl 模块 引用的小写
log "github.com/sirupsen/logrus"
2 我搜索代码TIDB工程 和本地磁盘 GitHub - sirupsen/logrus: Structured, pluggable logging for Go. ,都是小写,没有找到大写地方。
go_sum
GitHub - sirupsen/logrus: Structured, pluggable logging for Go. v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
GitHub - sirupsen/logrus: Structured, pluggable logging for Go. v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
GitHub - sirupsen/logrus: Structured, pluggable logging for Go. v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
GitHub - sirupsen/logrus: Structured, pluggable logging for Go. v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA
不清楚问题哪里,如何查看,这个是刚搭建的,采用都是最高版本。
我的配置
运行命令 go test -check.f testAddIndexWithPK 正常。VScode F5不行。错误在上面。
![image](https://asktug.com/uploads/default/original/3X/8/d/8d14460dd446a2e72f56c3c92d1072aea237e923.png)
Issues · sirupsen/logrus · GitHub
1 个赞
程序员小王
(程序员小王)
2
补充:
这是Go modules:我真在研究,没看过
the result go get tag v1.0.9
> go: finding module for package github.com/watchpoints/tidb/ddl
> go: found github.com/watchpoints/tidb/ddl in github.com/watchpoints/tidb v1.0.9
>
> go: finding module for package github.com/pingcap/tidb/inspectkv
> go: finding module for package github.com/pingcap/tidb/util/types
>
> go: finding module for package github.com/pingcap/tidb
> go: finding module for package github.com/pingcap/tidb/store/localstore
> go: finding module for package github.com/pingcap/tidb/parser
> go: found github.com/Sirupsen/logrus in github.com/Sirupsen/logrus v1.6.0
> go: found github.com/twinj/uuid in github.com/twinj/uuid v1.0.0
> go: github.com/watchpoints/tidb/ddl imports
> github.com/Sirupsen/logrus: github.com/Sirupsen/logrus@v1.6.0: parsing go.mod:
> module declares its path as: github.com/sirupsen/logrus
> but was required as: github.com/Sirupsen/logrus
看上去是Windows文件大小写敏感导致的,应该是会有地方使用了github.com/Sirupsen/logrus
吧
https://github.com/sirupsen/logrus#case-sensitivity
可以看下 Selecting which tests to run
https://labix.org/gocheck
system
(system)
关闭
7
此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。