Commit a8d0d93d authored by Tobias Hunger's avatar Tobias Hunger
Browse files

dependencyInfo script: List library dependencies



Change-Id: If595bccab1ebc16d894cf703cccedd7957b78edc
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 60cd9882
...@@ -150,6 +150,7 @@ class SymbolResolver: ...@@ -150,6 +150,7 @@ class SymbolResolver:
self._resolve(i) self._resolve(i)
def _resolve(self, plugin): def _resolve(self, plugin):
print 'Resolving symbols for {}...'.format(plugin.name)
for symbol in plugin.importedSymbols: for symbol in plugin.importedSymbols:
lib = self._resolveSymbol(symbol) lib = self._resolveSymbol(symbol)
if lib: if lib:
...@@ -174,9 +175,12 @@ class Reporter: ...@@ -174,9 +175,12 @@ class Reporter:
spec = plugin.specDependencies spec = plugin.specDependencies
symb = {} symb = {}
lib = {}
for p in plugin.symbolDependencies: for p in plugin.symbolDependencies:
if p.isPlugin(): if p.isPlugin():
symb[p.name] = plugin.symbolDependencies[p] symb[p.name] = plugin.symbolDependencies[p]
else:
lib[p.name] = plugin.symbolDependencies[p]
for i in spec: for i in spec:
if i in symb: if i in symb:
...@@ -194,6 +198,9 @@ class Reporter: ...@@ -194,6 +198,9 @@ class Reporter:
total = symb[i]['total'] total = symb[i]['total']
print ' {}: ERROR: undeclared ({} usages)'.format(i, total) print ' {}: ERROR: undeclared ({} usages)'.format(i, total)
self._printSome(symb[i]) self._printSome(symb[i])
for i in lib:
total = lib[i]['total']
print ' LIBRARY {} used ({} usages)'.format(i, total)
def _printSome(self, data): def _printSome(self, data):
keys = data.keys() keys = data.keys()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment