Skip to content

[Due for payment 2025-06-02] Clean up and formalise patch management #61814

Description

@mountiny

Problem

Over time, our ./patches directory has grown to include over 110 files.

Managing such a large collection has become increasingly difficult, particularly during dependency upgrades (e.g., react-native). It is often unclear whether a given patch is still necessary or when it was originally introduced. Tracing its origin typically requires digging through GitHub history, as blame often fails to link back to the original pull request, especially after file renames.

Solution

Restructure the patches directory into subdirectories based on the target library:

patches/
├── react-native-pdf/
│   ├── details.md
│   ├── react-native-pdf+6.7.3+001+initial.patch
│   ├── react-native-pdf+6.7.3+002+fix-incorrect-decoding.patch
│   └── react-native-pdf+6.7.3+003+update-podspec.patch
├── react-native/
│   ├── details.md
│   ├── patch1.patch
│   └── ...

Each details.md file would contain a table (exact format to be discussed) listing each patch, the rationale for its introduction, and links to both the app-level and upstream pull requests.

Additionally, we would require contributors to update the corresponding details.md file whenever a patch is added or modified. This will ensure that all patches are documented and will encourage the creation of upstream pull requests, which is currently rare

Issue OwnerCurrent Issue Owner: @dylanexpensify

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionNewFeatureSomething to build that is a new item.ReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions