Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ static ApplePlatform GetPlatform (string platform)

static int Fix (ApplePlatform platform, string output)
{
var frameworks = Frameworks.GetFrameworks (platform, false)!.Values.Where (v => !v.IsFrameworkUnavailable ());
if (!Frameworks.TryGetFrameworks (platform, out var fwks))
return 1;

var frameworks = fwks.Values.Where (v => !v.IsFrameworkUnavailable ());
var sb = new StringBuilder ();

sb.AppendLine ("namespace ObjCRuntime {");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ internal static bool ValidateLibraryPathValue (Binding binding, RootContext cont
return false;
}

var appleFrameworks = Frameworks.GetFrameworks (platformName.ToApplePlatform (), false);
if (appleFrameworks is null) {
if (!Frameworks.TryGetFrameworks (platformName.ToApplePlatform (), out var appleFrameworks)) {
// we could not get the frameworks, we have a bug
// we could not identify the platform, we have a bug
diagnostics = [Diagnostic.Create (
Expand Down
3 changes: 1 addition & 2 deletions tools/common/Driver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,7 @@ public static string CorlibName {

public static Frameworks GetFrameworks (Application app)
{
var rv = Frameworks.GetFrameworks (app.Platform, app.IsSimulatorBuild);
if (rv is null)
if (!Frameworks.TryGetFrameworks (app.Platform, out var rv))
throw ErrorHelper.CreateError (71, Errors.MX0071, app.Platform, app.ProductName);
return rv;
}
Expand Down
Loading
Loading