From 9392ac93e2a2243eaec0d6064daf2c1e340f0ab7 Mon Sep 17 00:00:00 2001 From: Gino Canessa Date: Tue, 17 Sep 2024 17:17:31 -0500 Subject: [PATCH] Fix: CI package changes from work on Firely.Packages. --- fhir-candle.props | 2 +- src/fhir-candle/Services/FhirPackageService.cs | 17 ++++------------- src/fhir-candle/_ForPackages/FhirCiClient.cs | 2 +- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/fhir-candle.props b/fhir-candle.props index 7fc9500..aa9f582 100644 --- a/fhir-candle.props +++ b/fhir-candle.props @@ -14,7 +14,7 @@ FHIR Foundation Project Copyright 2022-2024 git - https://github.com/GinoCanessa/fhir-candle + https://github.com/FHIR/fhir-candle en diff --git a/src/fhir-candle/Services/FhirPackageService.cs b/src/fhir-candle/Services/FhirPackageService.cs index 63bbc0b..ff37157 100644 --- a/src/fhir-candle/Services/FhirPackageService.cs +++ b/src/fhir-candle/Services/FhirPackageService.cs @@ -419,27 +419,18 @@ public async Task> InstallPackages( private async ValueTask<(PackageReference, IPackageServer?)> ResolveLatest(string name) { - ConcurrentBag<(PackageReference pr, IPackageServer server)> latestRecs = new(); + List<(PackageReference pr, IPackageServer server)> latestRecs = new(); - IEnumerable tasks = _packageClients.Select(async server => + foreach (IPackageServer server in _packageClients) { PackageReference pr = await server.GetLatest(name); if (pr == PackageReference.None) { - return; + continue; } - latestRecs.Add((pr, server)); - }); - - Task t = System.Threading.Tasks.Task.WhenAll(tasks); - - try - { - await t.WaitAsync(TimeSpan.FromSeconds(30)); } - catch { } - + if (latestRecs.Count == 0) { return (PackageReference.None, null); diff --git a/src/fhir-candle/_ForPackages/FhirCiClient.cs b/src/fhir-candle/_ForPackages/FhirCiClient.cs index 8f83868..c240241 100644 --- a/src/fhir-candle/_ForPackages/FhirCiClient.cs +++ b/src/fhir-candle/_ForPackages/FhirCiClient.cs @@ -829,7 +829,7 @@ private async ValueTask downloadPackage(PackageReference reference, Fhir { if (url.StartsWith("HL7/fhir/", StringComparison.OrdinalIgnoreCase)) { - url = "https://build.fhir.org/" + url; + url = "https://build.fhir.org/" + url.Substring(9); } else {