Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove support for android workload arm64 linux #207

Merged
merged 4 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions UnoCheck/Checkups/DotNetWorkloadsCheckup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ public DotNetWorkloadsCheckup(SharedState sharedState, string sdkVersion, Manife

SdkRoot = dotnet.DotNetSdkLocation.FullName;
SdkVersion = sdkVersion;
RequiredWorkloads = requiredWorkloads.Where(w => w.SupportedPlatforms?.Contains(Util.Platform) ?? false).ToArray();
RequiredWorkloads = requiredWorkloads.Where(FilterPlatform).ToArray();
NuGetPackageSources = nugetPackageSources;
}

private static bool FilterPlatform(Manifest.DotNetWorkload w)
{
var arch = Util.IsArm64 ? "arm64" : "x64";
var targetPlatform = Util.Platform + "/" + arch;

return w.SupportedPlatforms?.Any(sp => sp == (sp.Contains("/") ? targetPlatform : Util.Platform.ToString())) ?? false;
}

public readonly string SdkRoot;
public readonly string SdkVersion;
public readonly string[] NuGetPackageSources;
Expand Down Expand Up @@ -57,7 +65,6 @@ public override async Task<DiagnosticResult> Examine(SharedState history)


var validWorkloads = RequiredWorkloads
.Where(w => w.SupportedPlatforms?.Contains(Util.Platform) ?? false)
.ToArray();

var workloadManagers = validWorkloads
Expand All @@ -79,16 +86,16 @@ public override async Task<DiagnosticResult> Examine(SharedState history)
throw new Exception($"Unable to find workload manager for version [{rp.Id}: {rp.Version}]");
}

var installedPackageWorkloads = workloadManager.GetInstalledWorkloads();
var installedPackageWorkloads = workloadManager.GetInstalledWorkloads();

if (!NuGetVersion.TryParse(workloadVersion, out var rpVersion))
if (!NuGetVersion.TryParse(workloadVersion, out var rpVersion))
rpVersion = new NuGetVersion(0, 0, 0);

#if DEBUG
foreach(var installedWorload in installedPackageWorkloads)
{
ReportStatus($"Reported installed: {installedWorload.id}: {installedWorload.version}", null);
}
foreach (var installedWorload in installedPackageWorkloads)
{
ReportStatus($"Reported installed: {installedWorload.id}: {installedWorload.version}", null);
}
#endif

// TODO: Eventually check actual workload resolver api for installed workloads and
Expand All @@ -109,7 +116,7 @@ public override async Task<DiagnosticResult> Examine(SharedState history)

var genericWorkloadManager = new DotNetWorkloadManager(SdkRoot, sdkVersion, NuGetPackageSources);

return new DiagnosticResult(
return new DiagnosticResult(
Status.Error,
this,
new Suggestion("Install or Update SDK Workloads",
Expand Down
2 changes: 1 addition & 1 deletion UnoCheck/Manifest/DotNetWorkload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ public partial class DotNetWorkload
public List<string> IgnoredPackIds { get; set; }

[JsonProperty("supportedPlatforms")]
public List<Platform> SupportedPlatforms { get; set; }
public List<string> SupportedPlatforms { get; set; }
}
}
6 changes: 3 additions & 3 deletions UnoCheck/Manifest/Manifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ namespace DotNetCheck.Manifest
{
public partial class Manifest
{
public const string DefaultManifestUrl = "https://raw.githubusercontent.com/unoplatform/uno.check/3475568d48cb47165f6f9cc7d0c86e01a3f9e6a0/manifests/uno.ui.manifest.json";
public const string PreviewManifestUrl = "https://raw.githubusercontent.com/unoplatform/uno.check/3475568d48cb47165f6f9cc7d0c86e01a3f9e6a0/manifests/uno.ui-preview.manifest.json";
public const string PreviewMajorManifestUrl = "https://raw.githubusercontent.com/unoplatform/uno.check/3475568d48cb47165f6f9cc7d0c86e01a3f9e6a0/manifests/uno.ui-preview-major.manifest.json";
public const string DefaultManifestUrl = "https://raw.githubusercontent.com/unoplatform/uno.check/cf0141ad351d96d3f1773b634ed74523b6ee26d0/manifests/uno.ui.manifest.json";
public const string PreviewManifestUrl = "https://raw.githubusercontent.com/unoplatform/uno.check/cf0141ad351d96d3f1773b634ed74523b6ee26d0/manifests/uno.ui-preview.manifest.json";
public const string PreviewMajorManifestUrl = "https://raw.githubusercontent.com/unoplatform/uno.check/cf0141ad351d96d3f1773b634ed74523b6ee26d0/manifests/uno.ui-preview-major.manifest.json";

public static Task<Manifest> FromFileOrUrl(string fileOrUrl)
{
Expand Down
2 changes: 1 addition & 1 deletion manifests/uno.ui.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"workloadManifestId": "microsoft.net.sdk.android",
"packageId": "Microsoft.NET.Sdk.Android.Manifest-8.0.100",
"version": "$(ANDROID_SDK_VERSION)",
"supportedPlatforms": [ "Windows", "OSX", "Linux" ]
"supportedPlatforms": [ "Windows", "OSX", "Linux/x64" ]
},
{
"workloadId": "ios",
Expand Down
Loading