Are dependencies constraints inherited between projects ?
Does dep read Gopkg.toml from dependencies ?
I have 2 projects A and B.
Both use golang/dep, with a Gopkg.toml file.
B requires a library lib, with constraint branch = master.
A requires project B.
If I run dep status on B, I see the constraint rule branch master for lib.
However if I do the same on A, I see * for lib.
Is it expected ?
Yes. dep uses the dependencies constraints when attempting to solve.
If you tried dep status -h, will see the following:
Usage: dep status [package...]
With no arguments, print the status of each dependency of the project.
PROJECT Import path
CONSTRAINT Version constraint, from the manifest
VERSION Version chosen, from the lock
REVISION VCS revision of the chosen version
LATEST Latest VCS revision available
PKGS USED Number of packages from this project that are actually used
...
What dep status prints is what's in the manifest (Gopkg.toml) and lock (Gopkg.lock). So even though dep reads and tries to satisfy the constraints of the dependencies, unless you add it to your manifest it won't appear in dep status.
OK, that answers my question.
Thank you ! 馃憤
Most helpful comment
Yes.
depuses the dependenciesconstraints when attempting to solve.If you tried
dep status -h, will see the following:What
dep statusprints is what's in the manifest (Gopkg.toml) and lock (Gopkg.lock). So even thoughdepreads and tries to satisfy the constraints of the dependencies, unless you add it to your manifest it won't appear indep status.