What is/should be the approach for "patching" dependencies?

Open source workflow:

  1. Fetch the dependency source code to your computer
  2. Check out the version that you are using
  3. Use the --fork flag in your project to swap your dependency for that
  4. Try a newer version of the dependency to see if it fixes your problem
  5. Try patching the dependency to fix your problem
  6. Send the patch upstream
  7. Push your fork somewhere
  8. Update your project to use your fork while waiting for upstream
  9. Work with upstream to get your patch landed
  10. After upstream makes a release that includes your patch, switch back your dependency to upstream
  11. Delete your fork
15 Likes