`NOB_EXPERIMENTAL_DELETE_OLD` on Windows

未关闭
#111 16 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

@mikmart 已经在做这个了。

开始于 2025年8月24日。

  • #117 来自 @mikmart —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
c
领域
build-system

调研方向

Start with the Windows reproduction in nob.h using the C program, NOB_EXPERIMENTAL_DELETE_OLD, and cl.exe shown in the issue. Trace the rename and deletion steps around nob.exe.old, then verify that rebuilding completes without the access-denied error and that the old executable is removed.

由索引模型根据 Issue 内容生成。

描述

I caught the request for someone to test NOB_EXPERIMENTAL_DELETE_OLD on Windows on stream, but I didn't see the whole thing so not sure if this was already done; apologies if so.

I tried it out with 1.23.0 with the following program and found that for me it doesn't work:

#define NOB_IMPLEMENTATION
#define NOB_EXPERIMENTAL_DELETE_OLD
#include "nob.h"

int main(int arg, char **argv) {
    NOB_GO_REBUILD_URSELF(arg, argv);
    nob_log(NOB_INFO, "Hello, World!");
    return 0;
}
$ nob
[INFO] renaming nob.exe -> nob.exe.old
[INFO] CMD: cl.exe /Fe:nob.exe nob.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.44.35213 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

nob.c
Microsoft (R) Incremental Linker Version 14.44.35213.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:nob.exe
nob.obj
[INFO] deleting nob.exe.old
[ERROR] Could not delete file nob.exe.old: Access is denied.
[INFO] CMD: nob.exe
[INFO] Hello, World!
主要语言
C++
星标
3.4k
派生
216
平均合并
8 分钟
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tsoding/nob.h 的其他 Issue

查看 tsoding/nob.h 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。