Am 21.06.2016 um 00:37 schrieb Basile B.:
You should add a system to support example files, without dependency.
For example in a static library, something that would indicate that the
package in which the file resides is itself a dependency but don't have
to be downloaded:
package
examples
ex1.d
ex2.d
source
package
src1.d
ex1.d
/+ dub.sdl:
name "package"
dependency "this" (or dependency "../..")
+/
from ex1 you should be able to locate the package by using .dirName
until a dub.json is found. Maybe that if the dep value is a relative
path that leads to a description this works too.
This currently works using
dependency "package" path="../../"
I'd like to avoid making this smarter, because currently (sub) packages
are all logically distinct, which helps a lot to keep the internal logic
simple in various places. An exception to this rule is that versions of
sub packages are locked to the version of the parent package, which
causes quite some complications in the dependency resolution algorithm,
which in turn has often been a source of bugs.