`add`ing an unregistred package in CI installation process


I have two unregistered packages, call them “First” and “Second”. Second is dependent on First, and I’ve ran add [github/path/First.git] to reflect that in Second’s Manifest - so far so good. Everything works well locally, but when I try to test Second on CircleCI, the build breaks in the package resolving step

 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package First [31779860]:
 First [31779860] log:
 ├─First [31779860] has no known versions!
 └─restricted to versions * by Second [8c69bf56] — no versions left
   └─Second [8c69bf56] log:
     ├─possible versions are: 0.2.0 or uninstalled
     └─Second [8c69bf56] is fixed to version 0.2.0

I gather this has something to do with the versions of the two packages, but am unsure of how to parse that message.

As a side-note, both of these packages are in private repositories, and required github credentials during the local add step. Can I provide github credentials to the Pkg.add command in my CI by using environment variables?


Did you commit Second/Manifest.toml?

Yes. And the block for First inside Second/Manifest.toml looks like this:

deps = ["DataFrames", "Dates", "HTTP", "JSON", "LibPQ", "MySQL", "Statistics", "YAML"]
git-tree-sha1 = "98b99d879ed774205e23c79626da04d2d8647b5c"
repo-rev = "relevant/branch"
repo-url = "https://github.com/Organization/First.git"
uuid = "31779860-03a7-11e9-31c4-a5a2e3d9393f"
version = "0.3.0" 


How do you invoke the tests? Is Second the active project such that Second/Manifest.toml is used?

Yes, I believe so. Previous versions of Second that did not rely on First pass the tests on CI. Here is my CI setup file:

version: 2
    working_directory: /root/project/Second   # Clone into a directory whose name matches your Package.
      - image: julia:1.1                # image comes from Docker hub
      - checkout
      - run:
          name: Install and Test this package
          command: julia -e 'using Pkg; Pkg.update(); Pkg.clone(pwd()); Pkg.build("Second"); Pkg.test("Second", coverage = true);'

Ok, so you are not using Second/Manifest.toml. You can simplify the above to:

julia --project=/path/to/package/clone -e 'using Pkg; Pkg.test(; coverage=true)'

which will run the test with Second as the active project, and thus use Second/Manifest.toml.


Ah, I see what you mean now. This solved it, thank you so much for your help!

I had a second question in my original post regarding giving Pkg git credentials to be able to install a private package during the CI step, should I open a separate topic for that?

I have no experience with this. Feel free to open a new topic if you haven’t solved it yet.