Move the SliceEquivalent gocheck checker out of rsqueue/utils production code
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
阅读 pkg/rsqueue/utils/utils.go 和提到的四个测试文件:agent_test.go、queue_test.go、runnerfactory_test.go 和 utils_test.go。检查它们如何使用 SliceEquivalent,以及 testify 的 ElementsMatch 是否合适。移动或替换检查器,使生产依赖不再包含 gopkg.in/check.v1;使用提供的 go list -deps 命令验证。
由索引模型根据 Issue 内容生成。
描述
Problem
pkg/rsqueue/utils/utils.go is production code, but it defines the gocheck checker SliceEquivalent and imports gopkg.in/check.v1. The production packages rsqueue/agent and rsqueue/impls/database import rsqueue/utils for IsSqliteLockError. As a result, every program that uses the rsqueue agent or the database queue links gopkg.in/check.v1.
Only tests use SliceEquivalent: agent_test.go, queue_test.go, runnerfactory_test.go and utils_test.go.
Package Manager is removing gopkg.in/check.v1 (rstudio/package-manager#22451). After that work, this package is the only path that links gopkg.in/check.v1 into the Package Manager server binary.
Fix
Move SliceEquivalent out of utils.go, for example into the _test.go files that use it or into a test-only helper package. Or replace it with testify's ElementsMatch. Then make a new release.
How to reproduce
With platform-lib v4.5.0:
go list -deps github.com/rstudio/platform-lib/v4/pkg/rsqueue/agent | grep check.v1
The command prints gopkg.in/check.v1.
- 主要语言
- Go
- 星标
- 12
- 派生
- 0
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 8
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rstudio/platform-lib 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 72/100
rstudio/platform-lib#314 ·
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 65/100
rstudio/platform-lib#309 ·
维护者通常 2 天内回复
-
Remove use of `fmt.Sprintf` of with `slog`可能重新可做 @IrvingMg 于 344 天前认领,目前没有进行中的 PR。 未关闭good first issue tech debt
难度 3/5 1-2 天 新手友好度 48/100
rstudio/platform-lib#245 · 1 条评论 ·
维护者通常 2 天内回复
-
Enable Go StaticCheck linter for platform-lib可能重新可做 @CDRayn 于 401 天前认领,目前没有进行中的 PR。 未关闭tech debt
rstudio/platform-lib#234 · 已指派 1 人 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 45/100
rstudio/platform-lib#207 · 1 条评论 ·
维护者通常 2 天内回复
查看 rstudio/platform-lib 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
keyxmakerx/Chronicle#2616 ·
维护者通常 1 天内回复
-
go good first issue help wanted
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 80/100
维护者通常 1 天内回复
-
hive size:simple
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
nwverse/persona#12800 · 1 条评论 ·
维护者通常 1 天内回复