Skip to content

Commit

Permalink
always get supported Dalamud.NET.Sdk packages, as SDKs are not in loc…
Browse files Browse the repository at this point in the history
…kfiles
  • Loading branch information
goaaats committed Jun 6, 2024
1 parent 13f9697 commit 73a5a52
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Plogon/BuildProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public class BuildProcessor

private const string DOCKER_IMAGE = "mcr.microsoft.com/dotnet/sdk";
private const string DOCKER_TAG = "8.0";

// This field specifies which dependency package is to be fetched depending on the .net target framework.
// The values to use in turn depend on the used SDK (see DOCKER_TAG) and what gets resolved at compile time.
// If a plugin breaks with a missing runtime package you might want to add the package here.
Expand All @@ -91,6 +92,17 @@ public class BuildProcessor
}
};

// This field specifies a list of packages that must be present in the package cache, no matter
// whether they are present in the lockfile. This is necessary for SDK packages, as they are not
// added to lockfiles.
private readonly Dictionary<string, string[]> FORCE_PACKAGES = new()
{
{ "Dalamud.NET.Sdk", new[]
// This should have all of the SDK packages we still support.
{ "9.0.1" }
},
};

private const string EXTENDED_IMAGE_HASH = "fba5ce59717fba4371149b8ae39d222a29a7f402c10e0941c85a27e8d1bb6ce4";

private const string S3_BUCKET_NAME = "dalamud-plugin-archive";
Expand Down Expand Up @@ -388,6 +400,11 @@ await Task.WhenAll(
{
Log.Warning(e, "Failed to fetch runtime dependency");
}

foreach (var (name, versions) in this.FORCE_PACKAGES)
{
await Task.WhenAll(versions.Select(version => GetDependency(name, new() { Resolved = version }, pkgFolder, client)));
}
}

async Task GetNeeds(BuildTask task, DirectoryInfo needs)
Expand Down

0 comments on commit 73a5a52

Please sign in to comment.