# PkgBenchmark on project with unregistered dependency

**URL:** https://discourse.julialang.org/t/pkgbenchmark-on-project-with-unregistered-dependency/29350
**Category:** New to Julia
**Tags:** package, benchmarktools, ci
**Created:** [October 1, 2019, 4:23am UTC](https://discourse.julialang.org/t/pkgbenchmark-on-project-with-unregistered-dependency/29350 "2019-10-01T04:23:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![milesf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milesf/32/9289_2.png) [@milesf](https://discourse.julialang.org/u/milesf)
#### Post date: [October 1, 2019, 4:23am UTC](https://discourse.julialang.org/t/pkgbenchmark-on-project-with-unregistered-dependency/29350/1 "2019-10-01T04:23:39Z")

</div>

I’m struggling to get PkgBenchmark working for packages that require an unregistered dependency.

A simple demo of this issue is [Example.jl](https://github.com/milesfrain/Example), which depends on the `newfeature` branch of [ExampleDep.jl](https://github.com/milesfrain/ExampleDep/).

Example.jl has no issues being checked-out and tested.

```julia
git clone https://github.com/milesfrain/Example.git
cd Example/
julia --project=. -e 'using Pkg; Pkg.test()'
...
   Testing Example tests passed

```

But attempts with PkgBenchmark fail to find ExampleDep.jl.

```julia
julia -e 'using PkgBenchmark; benchmarkpkg(".")'
...
PkgBenchmark: Running benchmarks...
Activating new environment at `/tmp/jl_BNuh4Z/Project.toml`
 Resolving package versions...
ERROR: LoadError: Unsatisfiable requirements detected for package ExampleDep [68615898]:
 ExampleDep [68615898] log:
 ├─ExampleDep [68615898] has no known versions!
 └─restricted to versions * by Example [d4a85bec] — no versions left
   └─Example [d4a85bec] log:
     ├─possible versions are: 0.1.0 or uninstalled
     └─Example [d4a85bec] is fixed to version 0.1.0

```

Is the this same problem covered by [Pkg#492](https://github.com/JuliaLang/Pkg.jl/issues/492)? What are the possible workarounds?

---

<div class="post-metadata">

### Author: ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)
#### Post date: [October 1, 2019, 4:36am UTC](https://discourse.julialang.org/t/pkgbenchmark-on-project-with-unregistered-dependency/29350/2 "2019-10-01T04:36:05Z")

</div>

The easiest solution is to check in `benchmark/Manifest.toml`. For an example, see: [https://github.com/tkf/ChainCutters.jl](https://github.com/tkf/ChainCutters.jl) (which depends on an unregistered package [https://github.com/tkf/BroadcastableStructs.jl](https://github.com/tkf/BroadcastableStructs.jl))

---

<div class="post-metadata">

### Author: ![milesf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milesf/32/9289_2.png) [@milesf](https://discourse.julialang.org/u/milesf)
#### Post date: [October 1, 2019, 5:10am UTC](https://discourse.julialang.org/t/pkgbenchmark-on-project-with-unregistered-dependency/29350/3 "2019-10-01T05:10:06Z")

</div>

Wonderful. Thanks!  
I got it working now.  
For reference, here’s a [branch](https://github.com/milesfrain/Example/tree/fixed) with the required fixes for this minimal example.

---

<div class="post-metadata">

### Author: ![milesf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milesf/32/9289_2.png) [@milesf](https://discourse.julialang.org/u/milesf)
#### Post date: [October 1, 2019, 5:35am UTC](https://discourse.julialang.org/t/pkgbenchmark-on-project-with-unregistered-dependency/29350/4 "2019-10-01T05:35:43Z")

</div>

Having another strange issue now.

When I try to setup `Project.toml` and `Manifest.toml` in my main project, Pkg3 wants to update my simplified Example project (deleted from disk), which has no relation. Do I need to reset the registry?

```julia
(v1.2) pkg> activate .
Activating new environment at `~/projects/MainProject/benchmark/Project.toml`

(benchmark) pkg> status
    Status `~/projects/MainProject/benchmark/Project.toml`
  (empty environment)

(benchmark) pkg> add ..
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `/home/miles/temp/depdemo/Example`
ERROR: failed to fetch from /home/miles/temp/depdemo/Example, error: GitError(Code:ERROR, Class:Net, unsupported URL protocol)

```

**Update:**

Turns out that deleting `~/.julia/registries/General` followed by a `pkg update` is not enough. There are remnants of this example project still in `~/.julia` that break pkg commands in other completely unrelated and freshly-generated projects. Seems like this is one of those situations where it’s faster to just declare bankruptcy and delete `~./julia`.

```julia
clones/430150191978257116/FETCH_HEAD
1:624af93193f0c073255ca746a2567d72d5a1fa35 not-for-merge branch 'fixed' of /home/miles/temp/depdemo/Example
2:624af93193f0c073255ca746a2567d72d5a1fa35 not-for-merge branch 'master' of /home/miles/temp/depdemo/Example
3:f62aaded21271266f784212bcc7fa3b5e84bdd0c not-for-merge 'refs/remotes/origin/HEAD' of /home/miles/temp/depdemo/Example
4:624af93193f0c073255ca746a2567d72d5a1fa35 not-for-merge 'refs/remotes/origin/fixed' of /home/miles/temp/depdemo/Example
5:f62aaded21271266f784212bcc7fa3b5e84bdd0c not-for-merge 'refs/remotes/origin/master' of /home/miles/temp/depdemo/Example

clones/430150191978257116/config
6: url = /home/miles/temp/depdemo/Example

```
