dub icon indicating copy to clipboard operation
dub copied to clipboard

option to tell which dependencies added a particular library dependency

Open timotheecour opened this issue 8 years ago • 1 comments
trafficstars

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;

timotheecour avatar Feb 04 '17 01:02 timotheecour

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 describe shows full tree of dependencies
  • e.g. dub describe eventcore lets 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

WebFreak001 avatar Feb 26 '23 17:02 WebFreak001