How to set up Travis dependency for an external unregistered package?

This is typical problem I have when working with GitHub and the solution seems to be undocumented:

  • I have an unregistered package A on GitHub
  • I have an unregistered package B on GitHub
  • the package B references the package A

When testing package B locally I can typically issue a command such as Pkg.add(PackageSpec(url="")) and then run tests.

However, I do not know what is the standard practice for the .travis.yml for the package B?

Now I just add to every place in .travis.yml the command above but it looks kind of ugly.

This also means that I can not run the default Julia Travis configuration (this is the one that executes command julia --color=yes -e "if VERSION < v\"0.7.0-DEV.5183\"; Pkg.clone(pwd());\"${JL_PKG}\"); else using Pkg; if VERSION >= v\"1.1.0-rc1\";; else; end; end") because it will obviously fail with the A has no known versions! message.

I also tried running Pkg.add on activated B package but the modifications made to the *.toml files do not seem to help Travis to successfully build.

Is there any nice Julian way to configure such dependency or am I forced to poke Pkg.add(PackageSpec(url="..")) everywhere?

Commit your Manifest.toml and you are good to go.

You most certainly can.

1 Like

I tried this few times but then I was getting this A has no known versions! and restricted to versions * by an explicit requirement — no versions left message. Having such information message does not help to debug.

Are there any other things that determine whether it works or does not work?

Are the repositories public?

As long as you have committed B/Manifest.toml and A is in it with the correct information it should work.

Are the repositories public?

yes, but they ended up with Pkg.add(PackageSpec(url="..")) lines in Travis :slight_smile:

maybe I will retry with B/Manifest.toml and when it crashes post a link…

@fredrikekre yes, that works!

You just have to remember to remove all those Pkg.add(...) lines from Travis