# Reccomended workflow to "patch" another person's package?

**URL:** <https://discourse.julialang.org/t/reccomended-workflow-to-patch-another-persons-package/52220>\
**Category:** General Usage\
**Created:** [December 22, 2020, 10:01am UTC](https://discourse.julialang.org/t/reccomended-workflow-to-patch-another-persons-package/52220 "2020-12-22T10:01:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [December 22, 2020, 10:01am UTC](https://discourse.julialang.org/t/reccomended-workflow-to-patch-another-persons-package/52220/1 "2020-12-22T10:01:52Z")

</div>

Hello, which is the “suggested” workflow to “patch” someone else package and (hopefully) automatically issue a pull request on the package ? I see that PkgDev no longer ship with a “submit(package)” function…

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [December 22, 2020, 10:09am UTC](https://discourse.julialang.org/t/reccomended-workflow-to-patch-another-persons-package/52220/2 "2020-12-22T10:09:40Z")

</div>

What I often do is

- fork the package on GitHub
- `] dev --local` (in Julia) the fork (alternatively you can `git clone` and create a temp environment manually)
- `using Revise, using <ThePackage>`
- Fix the package src code. Revise will automatically track the changes such that you can try out everything in the REPL interactively.
- After things are fixed, add a new test that tests the now corrected behavior.
- `git checkout -b myfixbranch`, followed by `git add <files>` and `git commit -m "my awesome fix"`.  
` git push --set-upstream origin myfixbranch` (origin is my fork).
- Open the fork on GitHub and click on the green create pull request button that appears at the very top automatically.

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [December 22, 2020, 3:52pm UTC](https://discourse.julialang.org/t/reccomended-workflow-to-patch-another-persons-package/52220/3 "2020-12-22T15:52:51Z")

</div>

Thank you… this should indeed work, but there isn’t any “shortcut” to avoid manually fork/clone/push ?

If I recall correctly, in the pre-1.0 era one could simply do:

- pkg\> develop pkgName
- [patch, commit & test]
- using PkgDev; PkgDev.submit(pkgName)

EDIT: I can see there is already [an other thread](https://discourse.julialang.org/t/recommended-way-to-develop-fix-with-packages/14436/8) on this exact question… on that thread it is stated that _“Once PkgDev is ready for 1.0 we hopefully have that workflow again”_ … but it was in 2018 :-/  
By the way, is there any difference between `] dev pkgName` and `] develop pkgName` ?

---

<div class="post-metadata">

**Author:** ![CameronBieganek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cameronbieganek/32/6915_2.png) [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Post date:** [December 22, 2020, 4:08pm UTC](https://discourse.julialang.org/t/reccomended-workflow-to-patch-another-persons-package/52220/4 "2020-12-22T16:08:19Z")

</div>

> [@carstenbauer](#):
>
> After things are fixed, add a new test that tests the now corrected behavior.

In theory, if you’re following test-driven development, you should add the unit test before you correct the bug. 😉

Of course I can’t say that I consistently follow this maxim…
