dub
dub copied to clipboard
option to tell which dependencies added a particular library dependency
in a large program I'm trying to figure out which dependency produced -L-lsasl2 which is in the final linking stage (that fails);
ideally it would show a dependency path:
current=>dependency1=>dependency2=>sasl2
but at least for starters showing dependency2=>sasl2 would help.
in the meantime, how would i modify the code to show this
NOTE
dub describe shows everything but sasl2 is not in the list
EDIT:
with --vverbose, it shows:
Using pkg-config to resolve library flags for cairo, libcrypto, libcurl, libmongoc-1.0, libevent, libevent_pthreads, libssl
pkg-config --libs libmongoc-1.0
-Lbrew/Cellar/mongo-c-driver/1.5.4/lib -Lbrew/Cellar/openssl/1.0.2k/lib -Lbrew/Cellar/mongo-c-driver/1.5.4/lib -lmongoc-1.0 -lsasl2 -lssl -lcrypto -lrt -lbson-1.0
but libsasl2.* is nowhere in these directories; maybe a linuxbrew bug
NOTE: this helped debugging (in buildsettings.d)
void addLFlags(in string[] value...) {
import std.conv:text;
import std.algorithm:canFind;
if(value.canFind("-lsasl2"))
assert(0, value); // and show stacktrace
lflags~=value;
}
in any case, would be really useful to show the full dependencies (including expanded via pkg-config) in dub describe;
Since users are most likely interested in the dependency tree, that's what we will focus on the most. Showing linked in libraries / system libraries is a good idea to add into that tree as well though.
so this plus requirements that came from #2359:
- idea of PR is that
dub describeshows full tree of dependencies - e.g.
dub describe eventcorelets me know that my app depends on vibe-d which depends on vibe-core which depends on eventcore. - show linker / system dependencies for each package inside the tree, or allow the option to do this