Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Changing an existing patch is problematic in some situations

オープン
#557 コメント 5 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
nodejs, typescript

調査の方向性

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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ds300/patch-package のほかの issue

ds300/patch-package の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。