window vscode debug单元测试,运行报错 go.sum go module 没有拉去最新的tag,默认 t tag v1.0.9

问题: 今天刚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.com/Sirupsen/logrus ,都是小写,没有找到大写地方。

go_sum
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=

github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=

github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=

github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA

不清楚问题哪里,如何查看,这个是刚搭建的,采用都是最高版本。

我的配置

运行命令 go test -check.f testAddIndexWithPK 正常。VScode F5不行。错误在上面。

image

  • 其他人是否遇到过

https://github.com/sirupsen/logrus/issues/1170。

补充:
这是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

可以看下 Selecting which tests to run

https://labix.org/gocheck

已经解决。