Skip to content

Commit 02cf0c6

Browse files
committed
C#: Uncondionally log the number of Restore Nuget Dlls using nuget.exe and log non-excluded candidates as debug info.
1 parent bf023c5 commit 02cf0c6

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,9 @@ public HashSet<AssemblyLookupLocation> Restore()
148148
.Where(path => IsPathInSubfolder(path, legacyPackageDirectory.DirInfo.FullName, "tools"))
149149
.ToList();
150150

151-
if (nugetPackageDllPaths.Count > 0)
152-
{
153-
logger.LogInfo($"Restored {nugetPackageDllPaths.Count} NuGet DLLs.");
154-
}
151+
152+
logger.LogInfo($"Restored {nugetPackageDllPaths.Count} NuGet DLLs.");
153+
155154
if (excludedPaths.Count > 0)
156155
{
157156
logger.LogInfo($"Excluding {excludedPaths.Count} NuGet DLLs.");
@@ -163,6 +162,13 @@ public HashSet<AssemblyLookupLocation> Restore()
163162
}
164163

165164
nugetPackageDllPaths.ExceptWith(excludedPaths);
165+
166+
logger.LogInfo($"Using {nugetPackageDllPaths.Count} NuGet DLLs as dependency candidates.");
167+
foreach (var path in nugetPackageDllPaths)
168+
{
169+
logger.LogDebug($"Using NuGet DLL as dependency candidate: {path}");
170+
}
171+
166172
assemblyLookupLocations.UnionWith(nugetPackageDllPaths.Select(p => new AssemblyLookupLocation(p)));
167173
}
168174
catch (Exception exc)

0 commit comments

Comments
 (0)