Skip to content

Commit 85fe634

Browse files
authored
Bump .NET to 6.0.100-preview.2.21114.3. (#10666)
* Bump .NET to 6.0.100-preview.2.21114.3. * [dotnet-linker] Several steps are now gone, so load our custom step before the new first step (MarkStep). * [dotnet-linker] Dump the current steps if we fail to call InsertBefore/InsertAfter. * [dotnet-linker] Load the CollectAssembliesStep as the first step, and make it load every assembly. * [dotnet] Set InvariantGlobalization=true because that's the only thing .NET supports for now. * [dotnet-linker] Use recommended workaround for linker's inability to do load assemblies in custom step. * [tests] Bump version of MSBuild.StructuredLogger to get support for new log version. Otherwise this happens in tests that read binary logs: System.NotSupportedException : Unsupported log file format. Latest supported version is 9, the log file has version 10. * [introspection] Ignore P/Invokes to QCall for LogThreadPool* P/Invokes. * [dotnet-linker] Inject a dummy implementation of mono_config_parse_memory as a temporary solution for mono's removal of the same method.
1 parent b511fce commit 85fe634

12 files changed

Lines changed: 67 additions & 31 deletions

File tree

Make.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,10 @@ DOTNET_FEED_DIR ?= $(DOTNET_DESTDIR)/nuget-feed
483483
# We're using preview versions, and there will probably be many of them, so install locally (into builds/downloads) if there's no system version to
484484
# avoid consuming a lot of disk space (since they're never automatically deleted). The system-dependencies.sh script will install locally as long
485485
# as there's a TARBALL url.
486-
DOTNET6_VERSION=6.0.100-preview.1.21103.13
486+
DOTNET6_VERSION=6.0.100-preview.2.21114.3
487487
DOTNET6_VERSION_BAND=$(firstword $(subst -, ,$(DOTNET6_VERSION)))
488-
DOTNET6_URL=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/6.0.100-preview.1.21103.13/dotnet-sdk-6.0.100-preview.1.21103.13-osx-x64.pkg
489-
DOTNET6_TARBALL=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/6.0.100-preview.1.21103.13/dotnet-sdk-6.0.100-preview.1.21103.13-osx-x64.tar.gz
488+
DOTNET6_URL=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/6.0.100-preview.2.21114.3/dotnet-sdk-6.0.100-preview.2.21114.3-osx-x64.pkg
489+
DOTNET6_TARBALL=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/6.0.100-preview.2.21114.3/dotnet-sdk-6.0.100-preview.2.21114.3-osx-x64.tar.gz
490490
DOTNET6_TARBALL_NAME=$(notdir $(DOTNET6_TARBALL))
491491
DOTNET6_DIR=$(abspath $(TOP)/builds/downloads/$(basename $(basename $(DOTNET6_TARBALL_NAME))))
492492
DOTNET6=$(DOTNET6_DIR)/dotnet

dotnet/targets/Xamarin.Shared.Sdk.targets

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@
125125
<EnableUnsafeUTF7Encoding Condition="'$(EnableUnsafeUTF7Encoding)' == ''">false</EnableUnsafeUTF7Encoding>
126126
<EventSourceSupport Condition="'$(EventSourceSupport)' == ''">false</EventSourceSupport>
127127
<HttpActivityPropagationSupport Condition="'$(HttpActivityPropagationSupport)' == ''">false</HttpActivityPropagationSupport>
128-
<InvariantGlobalization Condition="'$(InvariantGlobalization)' == ''">false</InvariantGlobalization>
128+
<!-- .NET only supports invariant globalization for Apple platforms for now: https://github.com/xamarin/xamarin-macios/issues/8906 -->
129+
<InvariantGlobalization Condition="'$(InvariantGlobalization)' == ''">true</InvariantGlobalization>
129130
<StartupHookSupport Condition="'$(StartupHookSupport)' == ''">false</StartupHookSupport>
130131
<UseSystemResourceKeys Condition="'$(UseSystemResourceKeys)' == ''">true</UseSystemResourceKeys>
131132
<UseNativeHttpHandler Condition="'$(_PlatformName)' != 'macOS' And '$(UseNativeHttpHandler)' == ''">true</UseNativeHttpHandler>
@@ -302,7 +303,7 @@
302303

303304
<!-- add a custom step which inserts any other steps we need -->
304305
<_TrimmerCustomSteps Include="$(_AdditionalTaskAssembly)">
305-
<BeforeStep>LoadReferencesStep</BeforeStep>
306+
<BeforeStep>MarkStep</BeforeStep>
306307
<Type>Xamarin.SetupStep</Type>
307308
</_TrimmerCustomSteps>
308309

msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.After.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ Copyright (C) 2011-2013 Xamarin. All rights reserved.
348348
<!-- Replace the custom steps using the remote file paths for those -->
349349
<_TrimmerCustomSteps Remove="$(_AdditionalTaskAssembly)" />
350350
<_TrimmerCustomSteps Include="$([System.String]::Copy('$(_AdditionalTaskAssembly)').Replace('$(NetCoreRoot)', '$(_RemoteDotNetDir)'))">
351-
<BeforeStep>LoadReferencesStep</BeforeStep>
351+
<BeforeStep>MarkStep</BeforeStep>
352352
<Type>Xamarin.SetupStep</Type>
353353
</_TrimmerCustomSteps>
354354
</ItemGroup>

tests/bgen/bgen-tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
1313
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
1414
<PackageReference Include="Mono.Cecil" Version="0.11.2" />
15-
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.176" />
15+
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.303" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

tests/dotnet/UnitTests/DotNetUnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
1212
<PackageReference Include="Mono.Cecil" Version="0.11.2" />
13-
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.215" />
13+
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.303" />
1414
</ItemGroup>
1515

1616
<ItemGroup>

tests/generator/generator-tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<PackageReference Include="NUnit" Version="3.12.0" />
3434
<PackageReference Include="NUnit.ConsoleRunner" Version="3.11.1" />
3535
<PackageReference Include="Mono.Cecil" Version="0.11.1" />
36-
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.176" />
36+
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.303" />
3737
</ItemGroup>
3838
<ItemGroup>
3939
<Compile Include="ErrorTests.cs" />

tests/introspection/ApiPInvokeTest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ protected void Check (Assembly a)
223223
case "libSystem.Native":
224224
path += ".dylib";
225225
break;
226+
case "QCall":
227+
if (name.StartsWith ("LogThreadPool", StringComparison.Ordinal))
228+
continue;
229+
break;
226230
#endif
227231
case "libc":
228232
// we still have some rogue/not-fully-qualified DllImport

tests/msbuild/Xamarin.MacDev.Tests/Xamarin.MacDev.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<PackageReference Include="NUnit.ConsoleRunner" Version="3.11.1" />
1212
<PackageReference Include="NUnit.Extension.NUnitV2ResultWriter" Version="3.6.0" />
1313
<PackageReference Include="Mono.Cecil" Version="0.11.1" />
14-
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.176" />
14+
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.303" />
1515
</ItemGroup>
1616
<ItemGroup>
1717
<Compile Include="..\..\mtouch\Cache.cs">

tests/mtouch/mtouch.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<PackageReference Include="NUnit" Version="3.12.0" />
2929
<PackageReference Include="NUnit.ConsoleRunner" Version="3.11.1" />
3030
<PackageReference Include="Mono.Cecil" Version="0.11.1" />
31-
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.176" />
31+
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.303" />
3232
</ItemGroup>
3333
<ItemGroup>
3434
<Compile Include="MTouch.cs" />

tools/dotnet-linker/SetupStep.cs

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ void InsertBefore (IStep step, string stepName)
3535
return;
3636
}
3737
}
38+
DumpSteps ();
3839
throw new InvalidOperationException ($"Could not insert {step} before {stepName} because {stepName} wasn't found.");
3940
}
4041

@@ -46,6 +47,7 @@ void InsertAfter (IStep step, string stepName)
4647
return;
4748
}
4849
}
50+
DumpSteps ();
4951
throw new InvalidOperationException ($"Could not insert {step} after {stepName} because {stepName} wasn't found.");
5052
}
5153

@@ -57,13 +59,13 @@ protected override void TryProcess ()
5759

5860
// Load the list of assemblies loaded by the linker.
5961
// This would not be needed of LinkContext.GetAssemblies () was exposed to us.
60-
InsertAfter (new CollectAssembliesStep (), "LoadReferencesStep");
62+
InsertBefore (new CollectAssembliesStep (), "MarkStep");
6163

6264
var pre_dynamic_dependency_lookup_substeps = new DotNetSubStepDispatcher ();
63-
InsertBefore (pre_dynamic_dependency_lookup_substeps, "DynamicDependencyLookupStep");
65+
InsertBefore (pre_dynamic_dependency_lookup_substeps, "MarkStep");
6466

6567
var prelink_substeps = new DotNetSubStepDispatcher ();
66-
InsertAfter (prelink_substeps, "RemoveSecurityStep");
68+
InsertBefore (prelink_substeps, "MarkStep");
6769

6870
var post_sweep_substeps = new DotNetSubStepDispatcher ();
6971
InsertAfter (post_sweep_substeps, "SweepStep");
@@ -100,24 +102,29 @@ protected override void TryProcess ()
100102
Configuration.Write ();
101103

102104
if (Configuration.Verbosity > 0) {
103-
Console.WriteLine ();
104-
Console.WriteLine ("Pipeline Steps:");
105-
foreach (var step in Steps) {
106-
Console.WriteLine ($" {step}");
107-
if (step is SubStepsDispatcher) {
108-
var substeps = typeof (SubStepsDispatcher).GetField ("substeps", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue (step) as IEnumerable<ISubStep>;
109-
if (substeps != null) {
110-
foreach (var substep in substeps) {
111-
Console.WriteLine ($" {substep}");
112-
}
113-
}
114-
}
115-
}
105+
DumpSteps ();
116106
}
117107

118108
ErrorHelper.Platform = Configuration.Platform;
119109
Directory.CreateDirectory (Configuration.ItemsDirectory);
120110
Directory.CreateDirectory (Configuration.CacheDirectory);
121111
}
112+
113+
void DumpSteps ()
114+
{
115+
Console.WriteLine ();
116+
Console.WriteLine ("Pipeline Steps:");
117+
foreach (var step in Steps) {
118+
Console.WriteLine ($" {step}");
119+
if (step is SubStepsDispatcher) {
120+
var substeps = typeof (SubStepsDispatcher).GetField ("substeps", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue (step) as IEnumerable<ISubStep>;
121+
if (substeps != null) {
122+
foreach (var substep in substeps) {
123+
Console.WriteLine ($" {substep}");
124+
}
125+
}
126+
}
127+
}
128+
}
122129
}
123130
}

0 commit comments

Comments
 (0)