@@ -709,7 +709,9 @@ private IEnumerable<PSResourceInfo> SearchByNames(ServerApiCall currentServer, R
709709 {
710710 ErrorRecord errRecord = null ;
711711 ConcurrentQueue < ErrorRecord > errorMsgs = new ConcurrentQueue < ErrorRecord > ( ) ;
712+ ConcurrentQueue < string > warningMsgs = new ConcurrentQueue < string > ( ) ;
712713 ConcurrentQueue < string > debugMsgs = new ConcurrentQueue < string > ( ) ;
714+ ConcurrentQueue < string > verboseMsgs = new ConcurrentQueue < string > ( ) ;
713715 List < PSResourceInfo > parentPkgs = new List < PSResourceInfo > ( ) ;
714716 string tagsAsString = String . Empty ;
715717 bool isV2Resource = currentResponseUtil is V2ResponseUtil ;
@@ -912,7 +914,7 @@ private IEnumerable<PSResourceInfo> SearchByNames(ServerApiCall currentServer, R
912914 Task < FindResults > response = null ;
913915 if ( currentServer . Repository . ApiVersion == PSRepositoryInfo . APIVersion . V2 ) {
914916 string key = $ "{ pkgName } |{ _nugetVersion . ToNormalizedString ( ) } |{ _type } ";
915- response = cachedNetworkCalls . GetOrAdd ( key , _ => currentServer . FindVersionAsync ( pkgName , _nugetVersion . ToNormalizedString ( ) , _type , errorMsgs , debugMsgs ) ) ;
917+ response = cachedNetworkCalls . GetOrAdd ( key , _ => currentServer . FindVersionAsync ( pkgName , _nugetVersion . ToNormalizedString ( ) , _type , errorMsgs , warningMsgs , debugMsgs , verboseMsgs ) ) ;
916918
917919 responses = response . GetAwaiter ( ) . GetResult ( ) ;
918920
@@ -997,7 +999,7 @@ private IEnumerable<PSResourceInfo> SearchByNames(ServerApiCall currentServer, R
997999 Task < FindResults > response = null ;
9981000 if ( currentServer . Repository . ApiVersion == PSRepositoryInfo . APIVersion . V2 ) {
9991001 string key = $ "{ pkgName } |{ _versionRange . ToString ( ) } |{ _type } ";
1000- response = cachedNetworkCalls . GetOrAdd ( key , _ => currentServer . FindVersionGlobbingAsync ( pkgName , _versionRange , _prerelease , _type , getOnlyLatest : false , errorMsgs , debugMsgs ) ) ;
1002+ response = cachedNetworkCalls . GetOrAdd ( key , _ => currentServer . FindVersionGlobbingAsync ( pkgName , _versionRange , _prerelease , _type , getOnlyLatest : false , errorMsgs , warningMsgs , debugMsgs , verboseMsgs ) ) ;
10011003
10021004 responses = response . GetAwaiter ( ) . GetResult ( ) ;
10031005 }
@@ -1192,7 +1194,7 @@ internal void FindDependencyPackagesHelper(ServerApiCall currentServer, Response
11921194 Parallel . ForEach ( currentPkg . Dependencies , new ParallelOptions { MaxDegreeOfParallelism = maxDegreeOfParallelism } , dep =>
11931195 {
11941196 debugMsgs . Enqueue ( $ "Finding dependency '{ dep . Name } ' version range '{ dep . VersionRange } '") ;
1195- FindDependencyPackageVersion ( dep , currentServer , currentResponseUtil , currentPkg , repository , errorMsgs , verboseMsgs , warningMsgs ) ;
1197+ FindDependencyPackageVersion ( dep , currentServer , currentResponseUtil , currentPkg , repository , errorMsgs , warningMsgs , debugMsgs , verboseMsgs ) ;
11961198 } ) ;
11971199 // TODO: what is perf if parallel.ForEach is always run?
11981200 }
@@ -1201,7 +1203,7 @@ internal void FindDependencyPackagesHelper(ServerApiCall currentServer, Response
12011203 foreach ( var dep in currentPkg . Dependencies )
12021204 {
12031205 debugMsgs . Enqueue ( $ "Finding dependency '{ dep . Name } ' version range '{ dep . VersionRange } '") ;
1204- FindDependencyPackageVersion ( dep , currentServer , currentResponseUtil , currentPkg , repository , errorMsgs , verboseMsgs , warningMsgs ) ;
1206+ FindDependencyPackageVersion ( dep , currentServer , currentResponseUtil , currentPkg , repository , errorMsgs , warningMsgs , debugMsgs , verboseMsgs ) ;
12051207 }
12061208 }
12071209
@@ -1237,8 +1239,9 @@ private void FindDependencyPackageVersion(
12371239 PSResourceInfo currentPkg ,
12381240 PSRepositoryInfo repository ,
12391241 ConcurrentQueue < ErrorRecord > errorMsgs ,
1240- ConcurrentQueue < string > verboseMsgs ,
1241- ConcurrentQueue < string > warningMsgs )
1242+ ConcurrentQueue < string > warningMsgs ,
1243+ ConcurrentQueue < string > debugMsgs ,
1244+ ConcurrentQueue < string > verboseMsgs )
12421245 {
12431246 PSResourceInfo depPkg = null ;
12441247
@@ -1254,7 +1257,7 @@ private void FindDependencyPackageVersion(
12541257 else
12551258 {
12561259 // Find this version from the server
1257- depPkg = FindDependencyWithLowerBound ( dep , currentServer , currentResponseUtil , currentPkg , repository , errorMsgs , verboseMsgs ) ;
1260+ depPkg = FindDependencyWithLowerBound ( dep , currentServer , currentResponseUtil , currentPkg , repository , errorMsgs , warningMsgs , debugMsgs , verboseMsgs ) ;
12581261 }
12591262 }
12601263 else if ( dep . VersionRange . HasLowerBound && dep . VersionRange . MinVersion . Equals ( dep . VersionRange . MaxVersion ) )
@@ -1271,7 +1274,7 @@ private void FindDependencyPackageVersion(
12711274 }
12721275 else
12731276 {
1274- depPkg = FindDependencyWithSpecificVersion ( dep , currentServer , currentResponseUtil , currentPkg , repository , errorMsgs , verboseMsgs , warningMsgs ) ;
1277+ depPkg = FindDependencyWithSpecificVersion ( dep , currentServer , currentResponseUtil , currentPkg , repository , errorMsgs , warningMsgs , debugMsgs , verboseMsgs ) ;
12751278 }
12761279 }
12771280 else
@@ -1287,7 +1290,7 @@ private void FindDependencyPackageVersion(
12871290 }
12881291 else
12891292 {
1290- depPkg = FindDependencyWithUpperBound ( dep , currentServer , currentResponseUtil , currentPkg , repository , errorMsgs , verboseMsgs ) ;
1293+ depPkg = FindDependencyWithUpperBound ( dep , currentServer , currentResponseUtil , currentPkg , repository , errorMsgs , warningMsgs , debugMsgs , verboseMsgs ) ;
12911294 }
12921295 }
12931296 }
@@ -1300,8 +1303,9 @@ private PSResourceInfo FindDependencyWithSpecificVersion(
13001303 PSResourceInfo currentPkg ,
13011304 PSRepositoryInfo repository ,
13021305 ConcurrentQueue < ErrorRecord > errorMsgs ,
1303- ConcurrentQueue < string > verboseMsgs ,
1304- ConcurrentQueue < string > warningMsgs )
1306+ ConcurrentQueue < string > warningMsgs ,
1307+ ConcurrentQueue < string > debugMsgs ,
1308+ ConcurrentQueue < string > verboseMsgs )
13051309 {
13061310 PSResourceInfo depPkg = null ;
13071311 ErrorRecord errRecord = null ;
@@ -1313,7 +1317,7 @@ private PSResourceInfo FindDependencyWithSpecificVersion(
13131317 // See if the network call we're making is already cached, if not, call FindNameAsync() and cache results
13141318 string key = $ "{ dep . Name } |{ dep . VersionRange . MaxVersion . ToString ( ) } |{ _type } ";
13151319 verboseMsgs . Enqueue ( "Checking if network call is cached." ) ;
1316- response = _cachedNetworkCalls . GetOrAdd ( key , _ => currentServer . FindVersionAsync ( dep . Name , dep . VersionRange . MaxVersion . ToString ( ) , _type , errorMsgs , verboseMsgs ) ) ;
1320+ response = _cachedNetworkCalls . GetOrAdd ( key , _ => currentServer . FindVersionAsync ( dep . Name , dep . VersionRange . MaxVersion . ToString ( ) , _type , errorMsgs , warningMsgs , debugMsgs , verboseMsgs ) ) ;
13171321
13181322 responses = response . GetAwaiter ( ) . GetResult ( ) ;
13191323 }
@@ -1374,6 +1378,8 @@ private PSResourceInfo FindDependencyWithLowerBound(
13741378 PSResourceInfo currentPkg ,
13751379 PSRepositoryInfo repository ,
13761380 ConcurrentQueue < ErrorRecord > errorMsgs ,
1381+ ConcurrentQueue < string > warningMsgs ,
1382+ ConcurrentQueue < string > debugMsgs ,
13771383 ConcurrentQueue < string > verboseMsgs )
13781384 {
13791385 PSResourceInfo depPkg = null ;
@@ -1386,7 +1392,7 @@ private PSResourceInfo FindDependencyWithLowerBound(
13861392 // See if the network call we're making is already cached, if not, call FindNameAsync() and cache results
13871393 string key = $ "{ dep . Name } |*|{ _type } ";
13881394 verboseMsgs . Enqueue ( "Checking if network call is cached." ) ;
1389- response = _cachedNetworkCalls . GetOrAdd ( key , _ => currentServer . FindNameAsync ( dep . Name , includePrerelease : true , _type , errorMsgs , verboseMsgs ) ) ;
1395+ response = _cachedNetworkCalls . GetOrAdd ( key , _ => currentServer . FindNameAsync ( dep . Name , includePrerelease : true , _type , errorMsgs , warningMsgs , debugMsgs , verboseMsgs ) ) ;
13901396
13911397 responses = response . GetAwaiter ( ) . GetResult ( ) ;
13921398 }
@@ -1446,6 +1452,8 @@ private PSResourceInfo FindDependencyWithUpperBound(
14461452 PSResourceInfo currentPkg ,
14471453 PSRepositoryInfo repository ,
14481454 ConcurrentQueue < ErrorRecord > errorMsgs ,
1455+ ConcurrentQueue < string > warningMsgs ,
1456+ ConcurrentQueue < string > debugMsgs ,
14491457 ConcurrentQueue < string > verboseMsgs )
14501458 {
14511459 PSResourceInfo depPkg = null ;
@@ -1460,7 +1468,7 @@ private PSResourceInfo FindDependencyWithUpperBound(
14601468 // See if the network call we're making is already caced, if not, call FindNameAsync() and cache results
14611469 string key = $ "{ dep . Name } |{ dep . VersionRange . MaxVersion . ToString ( ) } |{ _type } ";
14621470 verboseMsgs . Enqueue ( "Checking if network call is cached." ) ;
1463- response = cachedNetworkCalls . GetOrAdd ( key , _ => currentServer . FindVersionGlobbingAsync ( dep . Name , dep . VersionRange , includePrerelease : true , ResourceType . None , getOnlyLatest : true , errorMsgs , verboseMsgs ) ) ;
1471+ response = cachedNetworkCalls . GetOrAdd ( key , _ => currentServer . FindVersionGlobbingAsync ( dep . Name , dep . VersionRange , includePrerelease : true , ResourceType . None , getOnlyLatest : true , errorMsgs , warningMsgs , debugMsgs , verboseMsgs ) ) ;
14641472
14651473 responses = response . GetAwaiter ( ) . GetResult ( ) ;
14661474
0 commit comments