Fix notifications display
All checks were successful
Build / Compute Version (push) Successful in 7s
Build / Build Nuget package (NuGet) (push) Successful in 4m9s
Build / Build Nuget package (CringeBootstrap.Abstractions) (push) Successful in 4m22s
Build / Build Nuget package (SharedCringe) (push) Successful in 4m18s
Build / Build Nuget package (CringePlugins) (push) Successful in 4m42s
Build / Build Launcher (push) Successful in 5m29s

Rename default source
Remove plugins that aren't found (404)
Fix duplicate ids in plugins list
This commit is contained in:
2025-06-08 01:34:13 -04:00
parent 60b8a94ab2
commit fb75897810
6 changed files with 39 additions and 20 deletions

View File

@@ -87,7 +87,7 @@ public static class BuiltInPackages
steam.AsDependency(libraries)
]
#if DEBUG
, version: new(0, 1, 21)
, version: new(0, 1, 84)
#endif
),
];

View File

@@ -11,7 +11,7 @@ namespace CringePlugins.Resolver;
public class PackageResolver(NuGetFramework runtimeFramework, ImmutableArray<PackageReference> references, PackageSourceMapping packageSources)
{
private static readonly ILogger Log = LogManager.GetCurrentClassLogger();
public async Task<ImmutableSortedSet<ResolvedPackage>> ResolveAsync(DirectoryInfo baseDir, bool disableUpdates)
public async Task<ImmutableSortedSet<ResolvedPackage>> ResolveAsync(DirectoryInfo baseDir, bool disableUpdates, List<PackageReference> invalidPackages)
{
var order = 0;
var packages = new Dictionary<Package, CatalogEntry>();
@@ -31,6 +31,12 @@ public class PackageResolver(NuGetFramework runtimeFramework, ImmutableArray<Pac
}
catch (HttpRequestException ex)
{
if (ex.StatusCode == System.Net.HttpStatusCode.NotFound)
{
//package isn't on this source, and should be removed from the config
invalidPackages.Add(reference);
}
Log.Warn("Failed to resolve package {Package}: {Message}", reference.Id, ex.Message);
continue;
}
@@ -71,8 +77,6 @@ public class PackageResolver(NuGetFramework runtimeFramework, ImmutableArray<Pac
if (!packages.TryGetValue(package, out var existingEntry))
throw new InvalidOperationException($"Duplicate package error {package.Id}");
if (package.Version < existingEntry.Version)
throw new NotSupportedException($"Package reference {package.Id} has lower version {package.Version} than already resolved {existingEntry.Version}");