`]add`ing a package depending on an unregistered package

I have a registered package Preconditioners.jl which depends on an unregistered one IncompleteSelectedInversion.jl. And I want to have this dependency in a v0.7 compatible way.

Previously when I asked the same question a bit over one year ago How to add unregistered packages to REQUIRE? I got the answer to either wait for Pkg3 or put the installation instruction of the unregistered package into the build.jl file of the registered one. This works in v0.6 but not in v0.7. It downloaded the unregistered package in the dev folder since I used Pkg.clone in the build.jl file, but running using Preconditioners gives the following error, which shows that Pkg3 doesn’t approve of this workaround, so what’s the alternative?

ERROR: LoadError: ArgumentError: Package Preconditioners does not have IncompleteSelectedInversion in its dependencies:
 - If you have Preconditioners checked out for development and have
   added IncompleteSelectedInversion as a dependency but haven't updated your primary
   environment's manifest file, try `Pkg.resolve()`.
 - Otherwise you may need to report an issue with Preconditioners.

Stacktrace:
 [1] require(::Module, ::Symbol) at .\loading.jl:821
 [2] include at .\boot.jl:317 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1034
 [4] macro expansion at .\logging.jl:312 [inlined]
 [5] _require(::Base.PkgId) at .\loading.jl:929
 [6] require(::Base.PkgId) at .\loading.jl:838
 [7] require(::Module, ::Symbol) at .\loading.jl:833
in expression starting at C:\Users\user\.julia\dev\Preconditioners\src\Preconditioners.jl:3

And of course Pkg.resolve() doesn’t help.

What if you add IncompleteSelectedInversion to your REQUIRE file?

It is not registered though so it wouldn’t know what to download?

If you make it available by e.g. dev or add url then it doesn’t have to download it.

Sure but I mean for others who want to add Preconditioners, how can they get IncompleteSelectedInversion without a fuss? Oh you mean I keep the Pkg.clone and add it to REQUIRE?

There should not be a registered package that depends on un unregistered one as far as I understand. Why don’t you register the other package too?

1 Like

Apparently the other one is unmaintained and MIT licensed so I am absorbing it into my package for ease of maintenance. The author didn’t want to register it.

1 Like