extenddb version prints the first build's commit after a rebuild in the same target directory
维护者通常 4 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 70/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust
- 领域
- build-system
调研方向
从 crates/bin/build.rs 开始,检查它如何发出 Cargo 重新构建指令;了解 git rev-parse --git-dir 如何识别 Git 目录,包括在 worktree 中的情况。提交后在同一目标目录中重新构建,并检查 extenddb version;完成的标准是它报告当前 commit 和构建时间,包括 worktree 的情况。
由索引模型根据 Issue 内容生成。
描述
crates/bin/build.rs bakes the commit hash and the build time into the binary, and tells cargo to run it again only when EXTENDDB_GIT_HASH or EXTENDDB_BUILD_TIME changes (cargo:rerun-if-env-changed). A later build in the same target directory recompiles the crates that changed and links a new binary, but does not run the build script again, so extenddb version still prints the commit and time of the first build there.
Seen on 30 October: a release binary rebuilt in the same target directory after three commits printed the commit it was first built at, with the old build time.
Setting EXTENDDB_GIT_HASH for each build works around it. A fix is to also emit cargo:rerun-if-changed for the git HEAD file and the ref it points to, found through git rev-parse --git-dir so that a worktree works too.
- 主要语言
- Rust
- 星标
- 517
- 派生
- 60
- 平均合并
- 4 天 22 小时
- 30 天内合并 PR
- 40
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ExtendDB/extenddb 的其他 Issue
-
Launch-prep: scope statement + backend tiers + version policy可能已有人在做 @navareamol 今天认领。 未关闭
难度 2/5 3-5 天 新手友好度 65/100
ExtendDB/extenddb#662 · 已指派 1 人 ·
维护者通常 4 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 84/100
ExtendDB/extenddb#658 · 1 条评论 ·
维护者通常 4 天内回复
-
backend:postgresql bug
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 4 天内回复
-
backend:mongodb bug
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 4 天内回复
查看 ExtendDB/extenddb 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 77/100
yunfie-twitter/Palleria#474 ·
维护者通常 1 天内回复
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 72/100
servo/rust-smallvec#827 ·
维护者通常 1 天内回复
-
bug tests
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复