Changing an existing patch is problematic in some situations
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- nodejs, typescript
- 领域
- documentation, tooling
调研方向
从 README 的“Updating patches”部分开始,跟踪 issue 中提到的补丁完整性检查和补丁应用失败路径。针对已经应用补丁或已缓存的 node_modules 树重新生成更新后的补丁,然后确定项目能够支持哪些行为和失败信息。完成的结果应包括关于更新补丁的有文档记录且经过测试的结果,以及更清晰的失败诊断或达成一致的变通方案。
由索引模型根据 Issue 内容生成。
描述
Hey there! I'm so glad patch-package exists - it is really helping me with a problematic package that I needed to fix urgently. But I ran into a problem... I created a patch, it got picked up by my team and our build servers, and then after a few weeks I realized I needed to refine the patch. I had seen this in the readme:
"Updating patches
Use exactly the same process as for making patches in the first place, i.e. make more changes, run patch-package, commit the changes to the patch file."
But what I experienced is not so carefree as this makes it sound. When I published the new version of the patch, all of a sudden other machines were getting this error:
ERROR Failed to apply patch for package
And there wasn't much to go on as far as what the problem was (I see some todos in the code about providing more information about why something failed - that would be good to do.)
Fast-forwarding, I finally realized that because the other developers/servers had applied that first patch, their copies of node_modules were modified and therefore, the patch integrity check fails. This is also a problem for some build servers which cached copies of node_modules instead of running "fully clean" builds. So, the only recourse has been to notify our whole development team to remove their node_modules folder.
I think it would at least be good to mention this in your readme RE Updating patches to offer more cautious advice. And of course, it would be really awesome to have something in the implementation that allows for at least a workaround if not something official, like a pre-patch-process which reverts the old patch before applying the new one. And of course, it would be great to get more info about a failure when it happens.
Thanks very much!
- 主要语言
- TypeScript
- 星标
- 11.2k
- 派生
- 327
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ds300/patch-package 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
ds300/patch-package#617 · 1 个 reaction ·
-
No more working under npm 12可能已有人在做 @DinoscapeProgramming 于 70 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
ds300/patch-package#615 · 1 条评论 · 5 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 62/100
ds300/patch-package#216 ·
-
难度 4/5 3-5 天 新手友好度 52/100
ds300/patch-package#618 · 3 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 25/100
ds300/patch-package#611 · 1 条评论 ·
查看 ds300/patch-package 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
TomerAberbach/profiler-md#733 ·
维护者通常 1 天内回复
-
bug priority: medium
难度 2/5 1-3 小时 新手友好度 68/100
brentspine/brents-toasts#143 ·
-
🐛 bug 🗺️ DB Models & Ops
难度 2/5 1-3 小时 新手友好度 83/100
LibreChat-AI/LibreChat#17214 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
Wavvon/Wavvon-clients#136 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
umami-software/umami#4637 ·
维护者通常 3 天内回复