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

**URL:** https://discourse.julialang.org/t/how-to-set-up-travis-dependency-for-an-external-unregistered-package/20995
**Category:** General Usage
**Tags:** travis
**Created:** [February 19, 2019, 10:40pm UTC](https://discourse.julialang.org/t/how-to-set-up-travis-dependency-for-an-external-unregistered-package/20995 "2019-02-19T22:40:26Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![pszufe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pszufe/32/23452_2.png) [@pszufe](https://discourse.julialang.org/u/pszufe)
#### Post date: [February 19, 2019, 10:40pm UTC](https://discourse.julialang.org/t/how-to-set-up-travis-dependency-for-an-external-unregistered-package/20995/1 "2019-02-19T22:40:27Z")

</div>

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="https://github.com/pszufe/A.jl"))` 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()); Pkg.build(\"${JL_PKG}\"); else using Pkg; if VERSION >= v\"1.1.0-rc1\"; Pkg.build(verbose=true); else Pkg.build(); 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?

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [February 19, 2019, 10:45pm UTC](https://discourse.julialang.org/t/how-to-set-up-travis-dependency-for-an-external-unregistered-package/20995/2 "2019-02-19T22:45:58Z")

</div>

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

> [@pszufe](#):
>
> This also means that I can not run the default Julia Travis configuration

You most certainly can.

---

<div class="post-metadata">

### Author: ![pszufe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pszufe/32/23452_2.png) [@pszufe](https://discourse.julialang.org/u/pszufe)
#### Post date: [February 19, 2019, 10:56pm UTC](https://discourse.julialang.org/t/how-to-set-up-travis-dependency-for-an-external-unregistered-package/20995/3 "2019-02-19T22:56:42Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [February 19, 2019, 10:58pm UTC](https://discourse.julialang.org/t/how-to-set-up-travis-dependency-for-an-external-unregistered-package/20995/4 "2019-02-19T22:58:52Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![pszufe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pszufe/32/23452_2.png) [@pszufe](https://discourse.julialang.org/u/pszufe)
#### Post date: [February 19, 2019, 11:09pm UTC](https://discourse.julialang.org/t/how-to-set-up-travis-dependency-for-an-external-unregistered-package/20995/5 "2019-02-19T23:09:32Z")

</div>

> Are the repositories public?

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

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

---

<div class="post-metadata">

### Author: ![abulak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abulak/32/28314_2.png) [@abulak](https://discourse.julialang.org/u/abulak)
#### Post date: [February 21, 2019, 4:18pm UTC](https://discourse.julialang.org/t/how-to-set-up-travis-dependency-for-an-external-unregistered-package/20995/6 "2019-02-21T16:18:45Z")

</div>

@fredrikekre yes, that works!

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