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

Bump to mono:2018-10 #2253

Closed
wants to merge 108 commits into from
Closed

Bump to mono:2018-10 #2253

wants to merge 108 commits into from

Conversation

directhex
Copy link
Contributor

No description provided.

@directhex directhex requested a review from jonpryor as a code owner October 2, 2018 14:55
@directhex directhex added the full-mono-integration-build For PRs; run a full build (~6-10h for mono bumps), not the faster PR subset (~2h for mono bumps) label Oct 2, 2018
EgorBo added 5 commits October 4, 2018 14:49
# Conflicts:
#	.gitmodules
#	Configuration.props
#	build-tools/dependencies/dependencies.projitems
#	external/mono
@marek-safar marek-safar mentioned this pull request Oct 4, 2018
14 tasks
EgorBo and others added 19 commits October 5, 2018 17:12
# Conflicts:
#	.gitmodules
#	Configuration.props
#	build-tools/dependencies/dependencies.projitems
#	external/llvm
#	external/mono
Commit list for mono/mono:

* mono/mono@04a6e8294e3 [2018-08] Bump xunit (#11085)
* mono/mono@f001e691cac [2018-08] Bump msbuild (#11087)
* mono/mono@7001d39bb2e Always use InvariantCulture calendars in X509Certificate on Mobile

Diff: mono/mono@e257971...04a6e82
Commit list for mono/mono:

* mono/mono@7805ccc43df [sdks] Fix llvm-llvm32 build (#11117)

Diff: mono/mono@04a6e82...7805ccc
Commit list for mono/mono:

* mono/mono@657f915eb62 [2018-08] [sdks] Create archive targets for pre-building on CI (#10932)
* mono/mono@bd1f64acc3c [sdks] Add cmake toolchain file for LLVM MXE builds (#11055)

Diff: mono/mono@7805ccc...657f915
# Conflicts:
#	external/mono
Commit list for mono/mono:

* mono/mono@2712292c567 [sdks] Add Groovy script to build the SDKs archives for the products (#11192)
* mono/mono@839f49d3b2a [sdks] futimens and futimes symbols are missing on anything earlier than 10.13 (#11176)

Diff: mono/mono@657f915...2712292
Commit list for mono/mono:

* mono/mono@8890b0c6c4d Take fast path only for delegate types not Delegate/MulticastDelegate. (#11195)
* mono/mono@dcaef0b2ca0 Bump to llvm/release_60/117a508c (#11120)
* mono/mono@9ff6d8f918d [interp] Implement interpreter entry trampolines on amd64 (#10978) (#11163)
* mono/mono@e708752f140 [sdks] Add Groovy script to build the SDKs archives for the products (#11191)
* mono/mono@2a052ba0c94 [sdks] futimens and futimes symbols are missing on anything earlier than 10.13 (#11177)
* mono/mono@76be3b3bc8e Initial Mono.Native Support. (#10941)
* mono/mono@7e7efe488f2 [2018-10] [sdks] Build tests for BCL targets (#11140)
* mono/mono@72a81cc6d26 Use passwordless import in the `X509Certificate(byte[])` constructor.
* mono/mono@f00fa49bb9a [sdks] Add cmake toolchain file for LLVM MXE builds (#11054)
* mono/mono@fc9fc38926e [2018-08] Bump msbuild (#11097)
* mono/mono@d33c2133545 Always use InvariantCulture calendars in X509Certificate on Mobile
* mono/mono@8c7aca33164 [2018-10] Bump xunit (#11084)
* mono/mono@923afca8896 [2018-10] Bump cecil (#11022)
* mono/mono@3dd1602a1a2 Bump msbuild to track xplat-master
* mono/mono@edc6fc4e826 [2018-10] [interp] fixes for native type (#10999)
* mono/mono@98b85ceaec4 Bump corert
* mono/mono@7d4ca00db49 Bump corert
* mono/mono@810ced6d0ba Extract case for verifying several object array parameters to separate test method.
* mono/mono@98c33e716d4 Add unit tests to verify custom attribute ctor with object array as parameter
* mono/mono@a5016f78986 [ci] Always pass sha1 from Mac to Windows packaging build
* mono/mono@6deb114ce54 [corlib] Simplify confusing "SSPI" error message and align with corefx (#10976)
* mono/mono@ec0ae343f0d [sdks/ios] Build libMonoPosixHelper for device architectures, so that zlib-helper.o is created. (#10959)
* mono/mono@921642ea72d Put xunit tests in mcs/class/lib/PROFILE/tests too
* mono/mono@5e6ea6c806e Merge pull request #10909 from monojenkins/backport-pr-10899-to-2018-10
* mono/mono@aa3762656b1 [sdks] Ensure LLVM is cloned before trying to download (#10933)
* mono/mono@7f3b574ca75 Bump linker
* mono/mono@31b7ce52ad6 [runtime] Fix undefined pthread_main_np (#10930)
* mono/mono@be44769e177 [Reflection] Fix issue with finding types in module using an asterisk as filter criteria
* mono/mono@1bcf14ab41e [w32handle] Add coop state transitions in mono_w32handle_lock_handles (#10911)
* mono/mono@f362bfe257f [runtime] Disable stack guard for main thread on osx

Diff: mono/mono@a1c34de...8890b0c
Commit list for mono/mono:

* mono/mono@5bd3f0b5b42 fixup: Point binary-reference-assemblies back to master
* mono/mono@244c31c6be2 [2018-10] [monodroid] Fill-in reference stubs for System.Drawing types that are … (#12965)
* mono/mono@5e9f06e9c1b [sdks] Make sure to run only one build per type per node
* mono/mono@d390bb6901f [Facades] Only provide the System.Drawing.Common stubs for monodroid
* mono/mono@0065638f26f use for loop to access item values and avoid InvalidCastException which occurs because VirtualDirectoryMappingCollection enumerator returns key and it's not expected
* mono/mono@c35bd54639d Bump bockbuild for GTK fix
* mono/mono@2b6f395180b [2018-10] Cater for later glibc use of ucontext (#13052)
* mono/mono@4c3f26a9de5 Merge pull request #13013 from alexanderkyte/managed_exc_reformat-2018-10
* mono/mono@4cad1b8af0c [crash] Fix exception stack walker to consider captured_traces
* mono/mono@68fbd3eca2f [crash] Add more detailed reporting for exceptions
* mono/mono@0955247f91c [bitcode] round up value type size for slot calculation (#13009)
* mono/mono@aa0b580e85f Fix issue where togglerefs might be incorrectly pinned. (#12933)
* mono/mono@a4b5c763a1d [2018-10] [debugger] Reverting part of mono/mono#12114 (#12967)
* mono/mono@2f94cf00bbe Mono.Native: Simplify checking for min-version
* mono/mono@78f05bcfa30 [corlib] Fix CustomAttributeDataTest.MethodIncludesDllImportAttributeData() on watch/tv
* mono/mono@a5f5870b2ac [2018-10] Bump cecil submodule (#12944)

Diff: mono/mono@5ee0e28...5bd3f0b
…nto mono-2018-10"

This reverts commit edfe008, reversing
changes made to 06c387f.
…nto mono-2018-10"

This reverts commit 1ef6e35, reversing
changes made to 86dde3f.
…rin/xamarin-android into mono-2018-10"

These revert commits bring the branch back to a master commit that also made it to xamarin/monodroid (bbf15ac as of right now)

This reverts commit cdbdcb3, reversing
changes made to c988c13.
@jonathanpeppers
Copy link
Member

So downstream in monodroid, we build the SmartHotel360 app and plot build times.

This project is failing with:

error XA2006: Could not resolve reference to 'System.Drawing.Color' (defined in assembly 'Acr.UserDialogs.Interface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') with scope 'Splat, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. When the scope is different from the defining assembly, it usually means that the type is forwarded. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Drawing.Color

It seems we have a breaking change:

  • Reference an assembly using System.Drawing types, that was built by a previous version of Xamarin.Android (Mono.Android.dll contained these types)
  • Build using the mono-2018-10 branch (System.Drawing.Common.dll now contains these types). The linker fails.

I can reproduce the failure with: jonathanpeppers@069c78f

I was not able to workaround using a <Reference/> to System.Drawing.Common... 😞

@akoeplinger
Copy link
Member

The failure is caused by a missing typeforwarder for System.Drawing.Color in Mono.Android.dll, it was just overlooked (the other ones are there).

This test was originally failing to build with:

    The "LinkAssemblies" task failed unexpectedly.

    Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Could not resolve reference to 'System.Drawing.Color' (defined in assembly 'Acr.UserDialogs.Interface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') with scope 'Splat, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. When the scope is different from the defining assembly, it usually means that the type is forwarded. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Drawing.Color
    at Mono.Linker.Steps.MarkStep.HandleUnresolvedType (Mono.Cecil.TypeReference reference) [0x0001a] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Mono.Linker.Steps.MarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00055] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at MonoDroid.Tuner.MonoDroidMarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00001] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Mono.Linker.Steps.MarkStep.MarkGenericArguments (Mono.Cecil.IGenericInstance instance) [0x00018] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Mono.Linker.Steps.MarkStep.GetOriginalType (Mono.Cecil.TypeReference type) [0x00013] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Mono.Linker.Steps.MarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00010] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at MonoDroid.Tuner.MonoDroidMarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00001] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Mono.Linker.Steps.MarkStep.MarkField (Mono.Cecil.FieldReference reference) [0x00058] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Mono.Linker.Steps.MarkStep.InitializeFields (Mono.Cecil.TypeDefinition type) [0x00028] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Mono.Linker.Steps.MarkStep.InitializeType (Mono.Cecil.TypeDefinition type) [0x0006f] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Mono.Linker.Steps.MarkStep.InitializeAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00034] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Mono.Linker.Steps.MarkStep.Initialize () [0x00016] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00008] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at MonoDroid.Tuner.MonoDroidMarkStep.Process (Mono.Linker.LinkContext context) [0x0000d] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Mono.Linker.Pipeline.ProcessStep (Mono.Linker.LinkContext context, Mono.Linker.Steps.IStep step) [0x0000f] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00011] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at MonoDroid.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline, Mono.Linker.LinkContext context) [0x00001] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at MonoDroid.Tuner.Linker.Process (MonoDroid.Tuner.LinkerOptions options, Mono.Linker.ILogger logger, Mono.Linker.LinkContext& context) [0x0007c] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Xamarin.Android.Tasks.LinkAssemblies.Execute (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver res) [0x0030c] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    --- End of inner exception stack trace ---
    at Java.Interop.Tools.Diagnostics.Diagnostic.Error (System.Int32 code, System.Exception innerException, System.String message, System.Object[] args) [0x0000a] in <8df3e814509d4dc7bbff2ee4d062e14e>:0
    at Xamarin.Android.Tasks.LinkAssemblies.Execute (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver res) [0x004cf] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Xamarin.Android.Tasks.LinkAssemblies.Execute () [0x0001e] in <aa2861304e8349a69bf6f3dda2b1b5bd>:0
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <1c1ea286ad81486b85647b7901984451>:0
    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x00212] in <1c1ea286ad81486b85647b7901984451>:0

We should go ahead and add the test to catch this breakage sooner.
@directhex directhex requested a review from garuma as a code owner February 26, 2019 22:26
@jonpryor
Copy link
Member

jonpryor commented Mar 1, 2019

For eventual Squash and merge use, the Subject to use:

Bump to mono/mono/2018-10@5bd3f0b5 (#2253)

The commit body:

Bumps to mono/api-snapshot@2eeca27f
Bumps to mono/bockbuild@f59de622
Bumps to mono/cecil@e5d5fa4a
Bumps to mono/corefx@7524de00
Bumps to mono/corert@1b7d4a1e
Bumps to mono/linker@e6760e6f
Bumps to mono/NuGet.BuildTasks@99558479
Bumps to mono/NUnitLite@cff33213
Bumps to mono/reference-assemblies@9334822c

	$ git diff --shortstat b041669..5bd3f0b5      # mono
	 1428 files changed, 39690 insertions(+), 28536 deletions(-)

Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=43447
Fixes: https://github.com/mono/mono/issues/6352
Fixes: https://github.com/mono/mono/issues/7087
Fixes: https://github.com/mono/mono/issues/8486
Fixes: https://github.com/mono/mono/issues/8575
Fixes: https://github.com/mono/mono/issues/8627
Fixes: https://github.com/mono/mono/issues/8689
Fixes: https://github.com/mono/mono/issues/8766
Fixes: https://github.com/mono/mono/issues/8848
Fixes: https://github.com/mono/mono/issues/8922
Fixes: https://github.com/mono/mono/issues/9089
Fixes: https://github.com/mono/mono/issues/9262
Fixes: https://github.com/mono/mono/issues/9418
Fixes: https://github.com/mono/mono/issues/9452
Fixes: https://github.com/mono/mono/issues/9532
Fixes: https://github.com/mono/mono/issues/9532
Fixes: https://github.com/mono/mono/issues/9542
Fixes: https://github.com/mono/mono/issues/9566
Fixes: https://github.com/mono/mono/issues/9581
Fixes: https://github.com/mono/mono/issues/9753
Fixes: https://github.com/mono/mono/issues/9839
Fixes: https://github.com/mono/mono/issues/9870
Fixes: https://github.com/mono/mono/issues/9935
Fixes: https://github.com/mono/mono/issues/9943
Fixes: https://github.com/mono/mono/issues/9947
Fixes: https://github.com/mono/mono/issues/9951
Fixes: https://github.com/mono/mono/issues/9973
Fixes: https://github.com/mono/mono/issues/10031
Fixes: https://github.com/mono/mono/issues/10035
Fixes: https://github.com/mono/mono/issues/10070
Fixes: https://github.com/mono/mono/issues/10144
Fixes: https://github.com/mono/mono/issues/10227
Fixes: https://github.com/mono/mono/issues/10243
Fixes: https://github.com/mono/mono/issues/10260
Fixes: https://github.com/mono/mono/issues/10303
Fixes: https://github.com/mono/mono/issues/10412
Fixes: https://github.com/mono/mono/issues/10448
Fixes: https://github.com/mono/mono/issues/10483
Fixes: https://github.com/mono/mono/issues/10488
Fixes: https://github.com/mono/mono/issues/10506
Fixes: https://github.com/mono/mono/issues/10527
Fixes: https://github.com/mono/mono/issues/10549
Fixes: https://github.com/mono/mono/issues/10598
Fixes: https://github.com/mono/mono/issues/10603
Fixes: https://github.com/mono/mono/issues/10603
Fixes: https://github.com/mono/mono/issues/10735
Fixes: https://github.com/mono/mono/issues/10834
Fixes: https://github.com/mono/mono/issues/10863
Fixes: https://github.com/mono/mono/issues/11123
Fixes: https://github.com/mono/mono/issues/11138
Fixes: https://github.com/mono/mono/issues/11146
Fixes: https://github.com/mono/mono/issues/11202
Fixes: https://github.com/mono/mono/issues/11214
Fixes: https://github.com/mono/mono/issues/11303
Fixes: https://github.com/mono/mono/issues/11317
Fixes: https://github.com/mono/mono/issues/11378
Fixes: https://github.com/mono/mono/issues/11441
Fixes: https://github.com/mono/mono/issues/11478
Fixes: https://github.com/mono/mono/issues/11479
Fixes: https://github.com/mono/mono/issues/11489
Fixes: https://github.com/mono/mono/issues/11613
Fixes: https://github.com/mono/mono/issues/11874
Fixes: https://github.com/mono/mono/issues/11898
Fixes: https://github.com/mono/mono/issues/11965
Fixes: https://github.com/mono/mono/issues/12130
Fixes: https://github.com/mono/mono/issues/12235
Fixes: https://github.com/mono/mono/issues/12307
Fixes: https://github.com/mono/mono/issues/12344
Fixes: https://github.com/mono/mono/issues/12362
Fixes: https://github.com/mono/mono/issues/12421
Fixes: https://github.com/mono/mono/issues/12461
Fixes: https://github.com/mono/mono/issues/12747
Fixes: https://github.com/mono/mono/issues/12831
Fixes: https://github.com/mono/mono/issues/12881
Fixes: https://github.com/mono/mono/issues/17590
Fixes: https://github.com/xamarin/xamarin-macios/issues/4347
Fixes: https://github.com/xamarin/xamarin-macios/issues/4617
Fixes: https://github.com/xamarin/xamarin-macios/issues/4984
Fixes: https://github.com/xamarin/xamarin-macios/issues/5363
Fixes: https://github.com/xamarin/xamarin-macios/issues/5381

Commit message last updated for mono/mono@5bd3f0b.

@@ -41,7 +41,7 @@
[submodule "external/sqlite"]
path = external/sqlite
url = https://github.com/xamarin/sqlite.git
branch = 3.27.1
branch = 3.26.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't be reverting SQLite.

@@ -12,7 +12,7 @@
Condition=" Exists('$(MSBuildThisFileDirectory)Configuration.OperatingSystem.props') And '$(DoNotLoadOSProperties)' != 'True' "
/>
<PropertyGroup>
<ProductVersion>9.2.99</ProductVersion>
<ProductVersion>9.1.199</ProductVersion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mono bumps shouldn't be changing $(ProductVersion).

@@ -122,7 +122,7 @@
<AndroidToolPath Condition=" '$(AndroidToolPath)' == '' ">$(AndroidSdkFullPath)\tools</AndroidToolPath>
<AndroidToolsBinPath Condition=" '$(AndroidToolsBinPath)' == '' ">$(AndroidToolPath)\bin</AndroidToolsBinPath>
<AndroidToolExe Condition=" '$(AndroidToolExe)' == '' ">android</AndroidToolExe>
<EmulatorVersion Condition=" '$(EmulatorVersion)' == '' ">5264690</EmulatorVersion>
<EmulatorVersion Condition=" '$(EmulatorVersion)' == '' ">5194135</EmulatorVersion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

....why?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea about any of these, they seem like cherry-picks from master that are now conflicting? I will revert

* [Building Xamarin.Android on Linux and macOS](building/unix/instructions.md)
* [Build Dependencies for Windows](building/windows/dependencies.md)
* [Building Xamarin.Android on Windows](building/windows/instructions.md)
* [Build Dependencies](building/dependencies.md)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No; this is reverting 494fc57, and we don't want to do that.

@@ -58,11 +58,24 @@
<Compile Include="Xamarin.Android.Tools.BootstrapTasks\RunInstrumentationTests.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\external\LibZipSharp\libZipSharp.csproj">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the rationale for this block of changes?

@@ -139,11 +137,55 @@ static void CreateErrorResultsFile (string sourceFile, string destFile, string c
}
}

var message = $"Error processing `{sourceFile}`. " +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO; this is reverting f867d5d!

<AndroidResource Include="$(MSBuildThisFileDirectory)..\..\Xamarin.Android.Build.Tasks\Tests\Xamarin.ProjectTools\Resources\Base\Image.9.png">
<Link>Resources\Drawable\Image.9.png</Link>
</AndroidResource>
<Compile Include="$(MSBuildThisFileDirectory)\Resources\Resource.designer.cs" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO; this is reverting dad7be9!

Commit list for mono/mono:

* mono/mono@78e155f252d [2018-10] Fix mono conc hashtable lookup endless loop (#13293)
* mono/mono@af19147d0bb [Android] Fix runtime loading of DSOs for 64-bit processes
* mono/mono@e752907c5b8 [2018-10] [interp] mixed mode fixes for delegates (#13260)
* mono/mono@68fb0e0c9ca [mini] Inline Selector.GetHandle for tvOS and watchOS assemblies as well. (#13255)
* mono/mono@1f81468bd5d Update csproj file for System.Drawing.Common facade
* mono/mono@74cfbd2bb47 [sdks] Use throttle() instead of lock()
* mono/mono@f08a9ab1d28 Revert "[sdks] Make sure to run only one build per type per node"
* mono/mono@3151b5cea83 [Facades] Add System.Drawing.Common back to monotouch etc profiles
* mono/mono@91e8acb9245 [2018-10] [interp] compute size of generic valuetype correctly (#13227)
* mono/mono@5849bb2f221 [aot] Resolve profile against compiled assembly (#13182)
* mono/mono@f16d2d5d44b [2018-10] [aot] abort lookup early when a method isn\u0027t available in AOT image (#13179)
* mono/mono@da38bdc0e42 [ci] Use dl.internalx.com when building on private Jenkins
* mono/mono@ea3e93b191f [2018-10] AOT fixes for interp mixed mode (#13172)
* mono/mono@b4b86276a4f [System] Bump SocketTest.TestSelect1 socket timeout to 1ms (#13152)

Diff: mono/mono@5bd3f0b...78e155f
@alexischr alexischr closed this Mar 8, 2019
@akoeplinger
Copy link
Member

For the record, the merge happened in #2790 :)

jonpryor pushed a commit that referenced this pull request Mar 27, 2019
Build `src/mono-runtimes` using the [Mono Archive][0] (f970cd5), and
update `@(MonoProfileAssembly)` and `@(MonoTestAssembly)`.

A "funny" thing happened around mono archive support: it didn't work.
Specifically, mono archive support was never added to the
[mono/2018-08 branch][1].  It *was* added to the
[mono/2018-10 branch][2], but mono/mono@dc977160 altered the filename
format, preventing `src/mono-runtimes` from using it.

There was an [attempt to fix xamarin-android][3], but in the interest
of "sanity" and "not doing too much at once," it was [removed][4]
from the [mono/2018-10 bump PR][5]:

> Is it necessary to intermix the "mono archives" changes along with
> the mono/2018-10 bump changes?
> 
> I mean sure, mono/2018-10 has improved support for the mono
> archive, but I fear/suspect that the mono archive changes
> [are causing the NUnit tests to crash][6], and thus a smaller, more
> focused PR may be more desirable (and then deal with the mono
> archive changes in a separate PR).

Now that [xamarin-android is using mono/2018-10][7], it is time to
revisit mono archive support:

 1. Fix the mono archive URL that we attempt to download, so that
    we can actually *find* a mono archive.

 2. Fix `src/mono-runtimes` so that we can *build* with the archive.

 3. Fix BCL unit test resource usage.

 4. Update `@(MonoProfileAssembly)` and `@(MonoTestAssembly)`.

 5. Improve unit test name exclusion behavior


~~ Build fixes ~~

Many of the paths that `src/mono-runtimes` looked for were wrong when
using the mono archive, e.g. using `external/mono/sdks/builds` when
that directory is used for building mono, but when the archive is
used that directory is empty.  Update those paths to instead use
`external/mono/sdks/out`, which is *also* valid for mono source
builds *and* for mono archive use.

Similarly, `Consts.cs` is a generated file which is included in the
mono archive, but we needed to update our path to use it from
`external/mono/sdks/out` and not the "normal" build location.

Finally, use the `<SystemUnzip/>` task to extract the mono archive
`.zip` file.  This at least has a *plausible* chance of working on
Windows, should we wish to pursue Windows-native support of mono
archives.


~~ Unit test resources ~~

The `tests/BCL-Tests`-related projects execute mono-built unit test
assemblies, which are included in the mono archive.  When we first
added support for executing the mono-provided unit test assemblies
in e9daf5e, we also included "unit test resources" for extraction
on the Android device.  These unit test resources were files that the
unit test expected to exist as files on the filesystem.

The mono unit tests have since been fixed so that these extra
resources are now included within the unit test assemblies as
`@(EmbeddedResource)`s.  There is thus no longer a need to separately
package and extract  `@(_BclTestContent)`.  This allows us to remove
and simplify `mono-runtimes.targets`.  (Yay!)

One ramification of this change is around *satellite assemblies*:
`Xamarin.Android.Bcl-Tests.targets` previously would execute the
`<AL/>` task in order to compile certain resources into satellite
assemblies.  This is no longer necessary, as the satellite assemblies
are included in the mono archive.  However, we do need a way of
specifying what the satellite assemblies are; introduce a new
`@(MonoTestSatelliteAssembly)` item group to specify them.


~~ Update `@(MonoProfileAssembly)` and `@(MonoTestAssembly)` ~~

Once we had things building, a possible mistake was made: we updated
the `@(MonoProfileAssembly)` and `@(MonoTestAssembly)` item groups
to include what was in the mono archive.

Add a new `build-tools/scripts/gen-ProfileAssemblies.sh` script which
will generate the contents of
`src/mono-runtimes/ProfileAssemblies.projitems` based on the contents
of `external/mono/sdks/out`, which is where the mono archive is
extracted.  This will generate appropriate `@(MonoFacadeAssembly)`,
`@(MonoProfileAssembly)`, `@(MonoTestAssembly)`, and
`@(MonoTestSatelliteAssembly)` item groups:

	build-tools/scripts/gen-ProfileAssemblies.sh > src/mono-runtimes/ProfileAssemblies.projitems

On the plus side, updating these item groups needed to be done
*anyway*: if there are new unit tests, we should execute them!
(This should have been done as part of the mono bumps, but it's
easily overlooked.)


~~ Unit test exclusion ~~

Unfortunately, not all of the new unit tests pass: `System.IO.Pipes`
doesn't support Android or Linux:

	[$xUnit] Test FAILED [monodroid_System.Core_xunit-test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]
	   Test name: System.IO.Pipes.Tests.AnonymousPipeTest_CreateClient.CreateClientStreamFromStringHandle_Valid
	   Exception messages: System.PlatformNotSupportedException : Operation is not supported on this platform.
	   Exception stack traces:   at System.IO.Pipes.AnonymousPipeServerStream.Create (System.IO.Pipes.PipeDirection direction, System.IO.HandleInheritability inheritability, System.Int32 bufferSize)

The `MonoTests.System.Web.Services.Description.ServiceDescriptionTest`
unit tests also fail:

	System.TypeInitializationException : The type initializer for 'System.Web.Services.Description.ExtensionManager' threw an exception.
	  ----> System.InvalidOperationException : There was an error reflecting type 'System.Web.Services.Description.HttpAddressBinding'.
	  ----> System.InvalidOperationException : System.Web.Services.Description.HttpAddressBinding cannot be serialized because it does not have a default public constructor

Additionally, several of the added `System.Linq.Expressions` tests
are not "linker safe" and would fail in Release builds but not Debug
builds.

Finally, we discovered that our unit test name exclusion strategy in
`xunit-excluded-tests.txt` was insufficient, as when xUnit has
parameterized tests, those parameters become part of the test name:

	System.IO.Pipes.Tests.AnonymousPipeTest_Read_ServerIn_ClientOut.AsyncReadWriteChain_ReadWrite(iterations: 5000, writeBufferSize: 1, readBufferSize: 1, cancelableToken: True)

I don't want to have to repeat every one of those parameterized
variations, as it could quickly become out of date, and determining
a complete list would be harder.

Improve `XUnitTestRunner.IsIncluded()` twofold:

 1. Only require `testCase.Traits` when performing
    `XUnitFilterType.Trait` filtering.  (Some unit tests *lack*
    traits, and without this change we'd never get around to test
    name checks.)

 2. Improve `XUnitFilterType.TypeName` checking so that if a test
    name starst with an excluded name followed by a `(`, the test is
    also skipped.  This allows excluding parameterized tests by
    providing only the name before the `(`.

Exclude all of the tests which currently fail in Release builds.

[0]: https://github.com/xamarin/xamarin-android/projects/10
[1]: https://github.com/mono/mono/commits/2018-08
[2]: https://github.com/mono/mono/commits/2018-10
[3]: #2366
[4]: #2253 (comment)
[5]: #2253
[6]: #2253 (comment)
[7]: d87d00f
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
full-mono-integration-build For PRs; run a full build (~6-10h for mono bumps), not the faster PR subset (~2h for mono bumps)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants