HACKER Q&A
📣 kulor

Best practices of publishing a forked repo


Scenario: your project is blocked by a bug in an open source dependency. You find a fix for the OSS and create a PR. At this point whilst waiting for a merge (which may never happen), I tend to publish my own fork with a username prefix but is there another, better way?


  👤 armchairhacker Accepted Answer ✓
It depends how useful you think the patch is, and maybe also how likely you think it will get merged.

In most cases I simply keep my fork as a PR and use the package either by vendoring or directly from the repo. If anyone else encounters the same bug, they will see my PR referencing the issue, they can do the same.

If many people are encountering the bug and using the package, and/or if the project seems dead, then it's a good idea to publish. You can do username prefix or you can just add "2" at the end. I've seen this for other repos, This is what https://crates.io/crates/zmq2 did while https://crates.io/crates/zmq was inactive, though the latter's maintainer became active and merged what the former's maintainer had done - you can see there is no animosity or anything.