How to specify package requirements for unmereged PRs?

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?

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.

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

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.

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).

1 Like

Something like this, 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.

3 Likes

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?

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.

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

1 Like