-
-
Notifications
You must be signed in to change notification settings - Fork 276
Description
Hello,
The documentation of the [sources]
section of Project.toml
files currently states the following:
[Dependencies listed via
[sources]
are] not used if [the current] project is a package that is being used as a dependency.
I would like to do precisely that, i.e., to use an unregistered package A
as a dependency for another unregistered package B
, which I plan to share with third parties who would only use B
.
The Project.toml
file for Package B would ideally look like
name = "B"
uuid = "BBBBBBBBBBBBBBBBB"
authors = ["me"]
version = "1.0.0"
[deps]
A = "AAAAAAAAAAAAAAAAA"
[sources]
A = {url = "https://github.com/the-repository-hosting-A", rev = "some-version"}
Consequently, I would ideally just instruct folks wishing to use B
to install it via the one-liner
julia> using Pkg; Pkg.add(url = "https://github.com/the-repository-hosting-B", rev = "some-version")
To handle versioning (i.e., to know what version of A
is being installed when B
is added) a choice of rev
could for instance be required, or a warning could be thrown if there isn't one.
This would greatly simplify the workflow of people who develop niche packages with niche dependencies (e.g. for research purposes), do not want to go through the hassle of setting up a dedicated registry and do not want their users to have to add said registry.