# How to specify package requirements for unmereged PRs?

**URL:** https://discourse.julialang.org/t/how-to-specify-package-requirements-for-unmereged-prs/5757
**Category:** General Usage
**Tags:** question
**Created:** [September 7, 2017, 11:18am UTC](https://discourse.julialang.org/t/how-to-specify-package-requirements-for-unmereged-prs/5757 "2017-09-07T11:18:59Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [September 7, 2017, 11:18am UTC](https://discourse.julialang.org/t/how-to-specify-package-requirements-for-unmereged-prs/5757/1 "2017-09-07T11:18:59Z")

</div>

A package I’m writing relies on a bunch of other registered packages. I have a few issues with a couple of them. I’ve submitted PRs to fix those issues. While this works locally on my machine (because I can have those packages set on the branch I created that fixes said issues), it does not work when people `Pkg.clone` my package.

How do I specify the versions (PR) of the packages my package requires if said versions are unmerged PR of registered packages?

---

<div class="post-metadata">

### Author: ![avik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/avik/32/17_2.png) [@avik](https://discourse.julialang.org/u/avik)
#### Post date: [September 7, 2017, 11:26am UTC](https://discourse.julialang.org/t/how-to-specify-package-requirements-for-unmereged-prs/5757/2 "2017-09-07T11:26:59Z")

</div>

There is no other way than to work with the authors of those packages to merge those PRs, I’m afraid. Till then, you can provide documentation in your README asking your users to checkout your branches, but that is messy and most people would not bother. It probably doesn’t make sense to register your package till your dependencies are merged.

Feel free to bump your PR’s if you haven’t had a response.

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [September 7, 2017, 11:28am UTC](https://discourse.julialang.org/t/how-to-specify-package-requirements-for-unmereged-prs/5757/3 "2017-09-07T11:28:21Z")

</div>

Thanks @avik! OK. That answers my question… I’m at least happy to hear that I haven’t missed anything.

---

<div class="post-metadata">

### Author: ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)
#### Post date: [September 7, 2017, 11:29am UTC](https://discourse.julialang.org/t/how-to-specify-package-requirements-for-unmereged-prs/5757/4 "2017-09-07T11:29:34Z")

</div>

It’s unfortunately not possible to specify that in `REQUIRE`. This is a big limitation of the current `Pkg` system. What I typically do is to manually check out the desired SHA in `.travis.yml` and friends to get CI to pass on the master branch of your package, so that you can keep making progress, and then to wait until new versions of all of your dependencies get tagged. This can be somewhat frustrating.

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [September 7, 2017, 11:32am UTC](https://discourse.julialang.org/t/how-to-specify-package-requirements-for-unmereged-prs/5757/5 "2017-09-07T11:32:34Z")

</div>

Sounds interesting though, could you please specify the details as best you can (maybe with an example)? It would be great if it works (even if it is a bit tedious).

---

<div class="post-metadata">

### Author: ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)
#### Post date: [September 7, 2017, 9:05pm UTC](https://discourse.julialang.org/t/how-to-specify-package-requirements-for-unmereged-prs/5757/6 "2017-09-07T21:05:19Z")

</div>

Something like [this](https://github.com/tkoolen/MotionCaptureJointCalibration.jl/blob/5dd9188e4db9eba658c3a7ab22e68404eefd8e3d/.travis.yml#L38), with the `Pkg.clone` call followed by a `Pkg.checkout` call. Note that you should get rid of the dependency in your `REQUIRE` if you’re explicitly cloning and checking out like this.

If you’re going to be doing this for multiple dependencies, you could also put these commands in a separate file and `include` it.

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [September 8, 2017, 7:19am UTC](https://discourse.julialang.org/t/how-to-specify-package-requirements-for-unmereged-prs/5757/7 "2017-09-08T07:19:09Z")

</div>

Cool. And if the version of the package I’ve forked is a dependency to other packages, Julia’s package manager will know a specific dependency is already met because my version of it is already cloned?

So this will work for travis. What about users?

---

<div class="post-metadata">

### Author: ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)
#### Post date: [September 8, 2017, 1:18pm UTC](https://discourse.julialang.org/t/how-to-specify-package-requirements-for-unmereged-prs/5757/8 "2017-09-08T13:18:27Z")

</div>

> And if the version of the package I’ve forked is a dependency to other packages, Julia’s package manager will know a specific dependency is already met because my version of it is already cloned

Yes.

> So this will work for travis. What about users?

There’s no satisfying answer for users right now, so this is really only to get you unblocked in terms of CI on master. Best you can do is tell users to look at the .travis.yml for installation instructions if they want to use the master branch of your package.

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [September 8, 2017, 1:31pm UTC](https://discourse.julialang.org/t/how-to-specify-package-requirements-for-unmereged-prs/5757/9 "2017-09-08T13:31:21Z")

</div>

Thanks a ton, this really answers all my questions. Hopefully, all of this will be improved in the next release of Pkg.
