Skip to content

Commit 301542a

Browse files
committed
No more MD_APPLE_SDK_ROOT.
Nor warnings about settings files.
1 parent 73119a0 commit 301542a

File tree

7 files changed

+10
-8
lines changed

7 files changed

+10
-8
lines changed

Make.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ endif
223223

224224
# Tell both Xcode and our build logic which Xcode we're using.
225225
export DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT)
226-
export MD_APPLE_SDK_ROOT=$(abspath $(XCODE_DEVELOPER_ROOT)/../..)
227226

228227
# We don't need to be told there are workload updates
229228
export DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE=true

tests/common/BinLog.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ public static IEnumerable<BuildLogEvent> GetBuildLogWarnings (string path)
210210
.Where (v => v.Type == BuildLogEventType.Warning)
211211
// We're often referencing earlier .NET projects (Touch.Unit/MonoTouch.Dialog), so ignore any out-of-support warnings.
212212
.Where (v => v.Message?.Contains ("is out of support and will not receive security updates in the future") != true)
213+
// Ignore any messages about the settings files, we get *a lot* of those
214+
.Where (v => !(v.Message?.Contains ("The settings file '/Users/") == true && v.Message?.Contains ("/Library/Preferences/maui/Settings.plist' is deprecated, and will be ignored in .NET 11+. ") == true))
215+
.Where (v => !(v.Message?.Contains ("The settings file '/Users/") == true && v.Message?.Contains ("/Library/Preferences/Xamarin/Settings.plist' is deprecated, and will be ignored in .NET 11+. ") == true))
213216
;
214217
}
215218

tests/common/Configuration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ public static void SetBuildVariables (ApplePlatform platform, ref Dictionary<str
697697
if (environment is null)
698698
environment = new Dictionary<string, string> ();
699699

700-
environment ["MD_APPLE_SDK_ROOT"] = Path.GetDirectoryName (Path.GetDirectoryName (xcode_root));
700+
environment ["DEVELOPER_DIR"] = Path.GetDirectoryName (Path.GetDirectoryName (xcode_root));
701701

702702
// This is set by `dotnet test` and can cause building legacy projects to fail to build with:
703703
// Microsoft.NET.Build.Extensions.ConflictResolution.targets(30,5):

tests/dotnet/UnitTests/XcodeVersionTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ public void Test (ApplePlatform platform, string xcodePath, Version xcodeVersion
3636
var properties = GetDefaultProperties (runtimeIdentifiers);
3737
properties ["BundleOriginalResources"] = "true"; // this prevents a different and unrelated error message from failing to build library projects
3838

39-
var existingDeveloperDir = Environment.GetEnvironmentVariable ("MD_APPLE_SDK_ROOT");
39+
var existingDeveloperDir = Environment.GetEnvironmentVariable ("DEVELOPER_DIR");
4040
try {
41-
Environment.SetEnvironmentVariable ("MD_APPLE_SDK_ROOT", Path.GetDirectoryName (Path.GetDirectoryName (xcodePath)));
41+
Environment.SetEnvironmentVariable ("DEVELOPER_DIR", Path.GetDirectoryName (Path.GetDirectoryName (xcodePath)));
4242
var rv = DotNet.AssertBuildFailure (project_path, properties);
4343
var errors = BinLog.GetBuildLogErrors (rv.BinLogPath).ToArray ();
4444
AssertErrorMessages (errors, $"This version of .NET for {platform.AsString ()} ({Configuration.GetNuGetVersionNoMetadata (platform)}) requires Xcode {Configuration.XcodeVersion}. The current version of Xcode is {xcodeVersion}. Either install Xcode {Configuration.XcodeVersion}, or use a different version of .NET for {platform.AsString ()}. See https://aka.ms/xcode-requirement for more information.");
4545
} finally {
46-
Environment.SetEnvironmentVariable ("MD_APPLE_SDK_ROOT", existingDeveloperDir);
46+
Environment.SetEnvironmentVariable ("DEVELOPER_DIR", existingDeveloperDir);
4747
}
4848
}
4949
}

tests/msbuild/Xamarin.MacDev.Tasks.Tests/AssemblySetup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public void AssemblyInitialization ()
1717
const string msbuild_exe_path = "/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/MSBuild.dll";
1818
if (is_in_vsmac) {
1919
var env = new Dictionary<string, string> {
20-
{ "MD_APPLE_SDK_ROOT", Path.GetDirectoryName (Path.GetDirectoryName (Configuration.xcode_root)) },
20+
{ "DEVELOPER_DIR", Path.GetDirectoryName (Path.GetDirectoryName (Configuration.xcode_root)) },
2121
{ "MSBUILD_EXE_PATH", msbuild_exe_path },
2222
};
2323

tests/package-mac-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ cat test.config
1919
INCLUDE_MAC=$(grep ^INCLUDE_MAC= test.config | sed 's/.*=//')
2020
INCLUDE_MACCATALYST=$(grep ^INCLUDE_MACCATALYST= test.config | sed 's/.*=//')
2121
XCODE_DEVELOPER_ROOT=$(grep ^XCODE_DEVELOPER_ROOT= test.config | sed 's/.*=//')
22-
export MD_APPLE_SDK_ROOT="$(dirname "$(dirname "$XCODE_DEVELOPER_ROOT")")"
22+
export DEVELOPER_DIR="$(dirname "$(dirname "$XCODE_DEVELOPER_ROOT")")"
2323
export RootTestsDirectory="$(pwd)"
2424

2525
make

tests/xharness/Jenkins/TestTasks/AppleTestTask.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public override void SetEnvironmentVariables (Process process)
3535
var xcodeRoot = Jenkins.Harness.XcodeRoot;
3636

3737
process.StartInfo.EnvironmentVariables ["RootTestsDirectory"] = HarnessConfiguration.RootDirectory;
38-
process.StartInfo.EnvironmentVariables ["MD_APPLE_SDK_ROOT"] = xcodeRoot;
38+
process.StartInfo.EnvironmentVariables ["DEVELOPER_DIR"] = xcodeRoot;
3939

4040
foreach (var kvp in Environment) {
4141
if (kvp.Value is null) {

0 commit comments

Comments
 (0)