@@ -12,14 +12,14 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
1212{
1313 public sealed partial class DependencyManager
1414 {
15- private void RestoreNugetPackages ( List < FileInfo > allNonBinaryFiles , IEnumerable < string > allProjects , IEnumerable < string > allSolutions , HashSet < string > dllPaths )
15+ private void RestoreNugetPackages ( List < FileInfo > allNonBinaryFiles , IEnumerable < string > allProjects , IEnumerable < string > allSolutions , HashSet < AssemblyLookupLocation > dllLocations )
1616 {
1717 try
1818 {
1919 var checkNugetFeedResponsiveness = EnvironmentVariables . GetBoolean ( EnvironmentVariableNames . CheckNugetFeedResponsiveness ) ;
2020 if ( checkNugetFeedResponsiveness && ! CheckFeeds ( allNonBinaryFiles ) )
2121 {
22- DownloadMissingPackages ( allNonBinaryFiles , dllPaths , withNugetConfig : false ) ;
22+ DownloadMissingPackages ( allNonBinaryFiles , dllLocations , withNugetConfig : false ) ;
2323 return ;
2424 }
2525
@@ -55,7 +55,7 @@ private void RestoreNugetPackages(List<FileInfo> allNonBinaryFiles, IEnumerable<
5555 }
5656
5757 nugetPackageDllPaths . ExceptWith ( excludedPaths ) ;
58- dllPaths . UnionWith ( nugetPackageDllPaths ) ;
58+ dllLocations . UnionWith ( nugetPackageDllPaths . Select ( p => new AssemblyLookupLocation ( p ) ) ) ;
5959 }
6060 catch ( Exception exc )
6161 {
@@ -72,10 +72,10 @@ private void RestoreNugetPackages(List<FileInfo> allNonBinaryFiles, IEnumerable<
7272 . Paths
7373 . Select ( d => Path . Combine ( packageDirectory . DirInfo . FullName , d ) )
7474 . ToList ( ) ;
75- dllPaths . UnionWith ( paths ) ;
75+ dllLocations . UnionWith ( paths . Select ( p => new AssemblyLookupLocation ( p ) ) ) ;
7676
7777 LogAllUnusedPackages ( dependencies ) ;
78- DownloadMissingPackages ( allNonBinaryFiles , dllPaths ) ;
78+ DownloadMissingPackages ( allNonBinaryFiles , dllLocations ) ;
7979 }
8080
8181 /// <summary>
@@ -148,7 +148,7 @@ private void RestoreProjects(IEnumerable<string> projects, out IEnumerable<strin
148148 CompilationInfos . Add ( ( "Failed project restore with package source error" , nugetSourceFailures . ToString ( ) ) ) ;
149149 }
150150
151- private void DownloadMissingPackages ( List < FileInfo > allFiles , ISet < string > dllPaths , bool withNugetConfig = true )
151+ private void DownloadMissingPackages ( List < FileInfo > allFiles , ISet < AssemblyLookupLocation > dllLocations , bool withNugetConfig = true )
152152 {
153153 var alreadyDownloadedPackages = GetRestoredPackageDirectoryNames ( packageDirectory . DirInfo ) ;
154154 var alreadyDownloadedLegacyPackages = GetRestoredLegacyPackageNames ( ) ;
@@ -206,7 +206,7 @@ private void DownloadMissingPackages(List<FileInfo> allFiles, ISet<string> dllPa
206206
207207 CompilationInfos . Add ( ( "Successfully ran fallback nuget restore" , successCount . ToString ( ) ) ) ;
208208
209- dllPaths . Add ( missingPackageDirectory . DirInfo . FullName ) ;
209+ dllLocations . Add ( missingPackageDirectory . DirInfo . FullName ) ;
210210 }
211211
212212 private string [ ] GetAllNugetConfigs ( List < FileInfo > allFiles ) => allFiles . SelectFileNamesByName ( "nuget.config" ) . ToArray ( ) ;
0 commit comments