Skip to content

Commit 73a5a52

Browse files
committed
always get supported Dalamud.NET.Sdk packages, as SDKs are not in lockfiles
1 parent 13f9697 commit 73a5a52

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Plogon/BuildProcessor.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public class BuildProcessor
6969

7070
private const string DOCKER_IMAGE = "mcr.microsoft.com/dotnet/sdk";
7171
private const string DOCKER_TAG = "8.0";
72+
7273
// This field specifies which dependency package is to be fetched depending on the .net target framework.
7374
// The values to use in turn depend on the used SDK (see DOCKER_TAG) and what gets resolved at compile time.
7475
// If a plugin breaks with a missing runtime package you might want to add the package here.
@@ -91,6 +92,17 @@ public class BuildProcessor
9192
}
9293
};
9394

95+
// This field specifies a list of packages that must be present in the package cache, no matter
96+
// whether they are present in the lockfile. This is necessary for SDK packages, as they are not
97+
// added to lockfiles.
98+
private readonly Dictionary<string, string[]> FORCE_PACKAGES = new()
99+
{
100+
{ "Dalamud.NET.Sdk", new[]
101+
// This should have all of the SDK packages we still support.
102+
{ "9.0.1" }
103+
},
104+
};
105+
94106
private const string EXTENDED_IMAGE_HASH = "fba5ce59717fba4371149b8ae39d222a29a7f402c10e0941c85a27e8d1bb6ce4";
95107

96108
private const string S3_BUCKET_NAME = "dalamud-plugin-archive";
@@ -388,6 +400,11 @@ await Task.WhenAll(
388400
{
389401
Log.Warning(e, "Failed to fetch runtime dependency");
390402
}
403+
404+
foreach (var (name, versions) in this.FORCE_PACKAGES)
405+
{
406+
await Task.WhenAll(versions.Select(version => GetDependency(name, new() { Resolved = version }, pkgFolder, client)));
407+
}
391408
}
392409

393410
async Task GetNeeds(BuildTask task, DirectoryInfo needs)

0 commit comments

Comments
 (0)